/**
 * COD Popup Checkout Pro - Popup CSS
 * Modern Shopify-style one-page checkout redesign
 */

/* ========================================
   Animations
   ======================================== */

@keyframes codPcpFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes codPcpSlideUp {
    from { transform: translateY(24px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes codPcpSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes codPcpScaleIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

@keyframes codPcpPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ========================================
   Overlay
   ======================================== */

#cod-pcp-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    background: var(--cod-pcp-overlay, rgba(0, 0, 0, 0.5));
    backdrop-filter: blur(var(--cod-pcp-overlay-blur, 4px));
    -webkit-backdrop-filter: blur(var(--cod-pcp-overlay-blur, 4px));
    animation: codPcpFadeIn 0.25s ease;
    overflow-y: auto;
    padding: 20px;
    align-items: flex-start;
    justify-content: center;
}

/* ========================================
   Popup Container
   ======================================== */

.cod-pcp-popup {
    position: relative;
    max-width: var(--cod-pcp-width, 520px);
    width: 100%;
    margin: 0 auto;
    background: var(--cod-pcp-popup-bg, #ffffff);
    border-radius: var(--cod-pcp-radius, 16px);
    box-shadow: var(--cod-pcp-shadow, 0 8px 40px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06));
    animation: codPcpSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--cod-pcp-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
    direction: rtl;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow: hidden;
}

/* ========================================
   Header
   ======================================== */

.cod-pcp-popup-header {
    position: relative;
    padding: 24px 24px 16px;
    text-align: center;
    flex-shrink: 0;
}

.cod-pcp-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    width: auto;
    height: auto;
    border-radius: 0;
    border: 0px;
    background: #fafafa00;
    color: #ea4335;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.cod-pcp-popup-title {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
    line-height: 1.5;
    padding: 0 40px 0 0;
}

/* ========================================
   Body
   ======================================== */

.cod-pcp-popup-body {
    padding: 0 20px 20px;
    overflow-y: auto;
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
}

.cod-pcp-popup-body::-webkit-scrollbar {
    width: 4px;
}

.cod-pcp-popup-body::-webkit-scrollbar-track {
    background: transparent;
}

.cod-pcp-popup-body::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 4px;
}

/* ========================================
   Sections
   ======================================== */

.cod-pcp-section {
    margin-bottom: 20px;
}

.cod-pcp-section:last-child {
    margin-bottom: 0;
}

.cod-pcp-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ========================================
   Product Preview
   ======================================== */

.cod-pcp-product-preview {
    display: flex;
    gap: 14px;
    padding: 14px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    align-items: center;
}

.cod-pcp-product-img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
    border: 1px solid #eee;
}

.cod-pcp-product-details {
    flex: 1;
    min-width: 0;
}

.cod-pcp-product-name {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 4px;
    line-height: 1.4;
}

.cod-pcp-product-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--cod-pcp-primary, #1a73e8);
    margin: 0;
}

.cod-pcp-stock {
    font-size: 12px;
    margin-top: 4px;
    font-weight: 500;
}

.cod-pcp-stock.in-stock {
    color: #34a853;
}

.cod-pcp-stock.out-of-stock {
    color: #ea4335;
}

/* ========================================
   Offers Grid
   ======================================== */

.cod-pcp-offers-grid {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.cod-pcp-offers-grid::-webkit-scrollbar {
    display: none;
}

.cod-pcp-offer-card {
    position: relative;
    flex: 1;
    min-width: 140px;
    max-width: 180px;
    padding: 14px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    background: #fff;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.cod-pcp-offer-card:hover {
    border-color: var(--cod-pcp-primary, #1a73e8);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.1);
}

.cod-pcp-offer-card.selected {
    border-color: var(--cod-pcp-primary, #1a73e8);
    background: rgba(26, 115, 232, 0.03);
    box-shadow: 0 0 0 1px var(--cod-pcp-primary, #1a73e8), 0 4px 12px rgba(26, 115, 232, 0.12);
}

/* Radio Indicator */
.cod-pcp-offer-radio {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #d0d0d0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.cod-pcp-offer-card.selected .cod-pcp-offer-radio {
    border-color: var(--cod-pcp-primary, #1a73e8);
    background: var(--cod-pcp-primary, #1a73e8);
}

.cod-pcp-offer-radio-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s ease;
}

.cod-pcp-offer-card.selected .cod-pcp-offer-radio-dot {
    opacity: 1;
    transform: scale(1);
}

/* Offer Image */
.cod-pcp-offer-img-wrap {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid #eee;
}

.cod-pcp-offer-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Offer Content */
.cod-pcp-offer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    width: 100%;
}

.cod-pcp-offer-badge {
    background: linear-gradient(135deg, #ff6b35, #e8451a);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 20px;
    white-space: nowrap;
    line-height: 1.6;
}

.cod-pcp-offer-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-top: 2px;
    line-height: 1.3;
}

.cod-pcp-offer-qty {
    font-size: 11px;
    color: #999;
    font-weight: 500;
}

.cod-pcp-offer-old-price {
    font-size: 12px;
    color: #aaa;
    text-decoration: line-through;
    font-weight: 400;
    line-height: 1.2;
}

.cod-pcp-offer-price {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.2;
}

.cod-pcp-offer-save {
    font-size: 11px;
    color: var(--cod-pcp-secondary, #34a853);
    font-weight: 600;
    line-height: 1.2;
}

/* ========================================
   Variations
   ======================================== */

.cod-pcp-variations {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #f0f0f0;
}

.cod-pcp-variation-group {
    margin-bottom: 12px;
}

.cod-pcp-variation-group:last-child {
    margin-bottom: 0;
}

.cod-pcp-variation-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}

.cod-pcp-variation-select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    color: #333;
    background: #fff;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23666' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
    padding-left: 36px;
    font-family: inherit;
}

.cod-pcp-variation-select:focus {
    border-color: var(--cod-pcp-primary, #1a73e8);
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

/* ========================================
   Order Summary
   ======================================== */

.cod-pcp-summary-section {
    margin-bottom: 20px;
}

.cod-pcp-summary-toggle {
    cursor: pointer;
    user-select: none;
    margin-bottom: 0 !important;
}

.cod-pcp-summary-toggle .cod-pcp-summary-arrow {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #666;
    transition: transform 0.2s ease;
    margin-inline-start: 6px;
}

.cod-pcp-summary-toggle[aria-expanded="true"] .cod-pcp-summary-arrow {
    transform: rotate(180deg);
}

.cod-pcp-summary-table {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 14px 16px;
    border: 1px solid #f0f0f0;
}

.cod-pcp-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
    color: #666;
}

.cod-pcp-summary-row + .cod-pcp-summary-row {
    border-top: 1px solid #f0f0f0;
}

.cod-pcp-summary-label {
    font-weight: 500;
    color: #666;
}

.cod-pcp-summary-value {
    font-weight: 600;
    color: #333;
}

.cod-pcp-summary-total-row {
    border-top: 2px solid #e0e0e0 !important;
    padding-top: 12px;
    margin-top: 4px;
}

.cod-pcp-summary-total-label {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
}

.cod-pcp-total-value {
    color: var(--cod-pcp-primary, #1a73e8);
    font-size: 18px;
    font-weight: 700;
}

.cod-pcp-discount-value {
    color: var(--cod-pcp-secondary, #34a853);
}

/* ========================================
   Coupon
   ======================================== */

.cod-pcp-coupon-section {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
}

.cod-pcp-coupon-input-wrap {
    display: flex;
    gap: 8px;
}

.cod-pcp-coupon-input-wrap .cod-pcp-input {
    flex: 1;
}

.cod-pcp-btn-sm {
    padding: 10px 20px;
    background: var(--cod-pcp-primary, #1a73e8);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
}

.cod-pcp-btn-sm:hover {
    background: #1557b0;
}

.cod-pcp-message {
    margin-top: 8px;
    font-size: 13px;
}

.cod-pcp-message.success {
    color: #34a853;
}

.cod-pcp-message.error {
    color: #ea4335;
}

/* ========================================
   Checkout Fields
   ======================================== */

.cod-pcp-checkout-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.cod-pcp-field {
    margin-bottom: 2px;
}

.cod-pcp-field label {
    display: none;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
}

.cod-pcp-required {
    color: #ea4335;
}

.cod-pcp-input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid #e0e0e0;
    border-radius: 40px;
    font-size: 14px;
    color: #333;
    background: #fff;
    transition: all 0.2s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.cod-pcp-input:focus {
    border-color: var(--cod-pcp-primary, #1a73e8);
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.08);
}

.cod-pcp-input.error {
    border-color: #ea4335;
    box-shadow: 0 0 0 3px rgba(234, 67, 53, 0.08);
}

.cod-pcp-textarea {
    resize: vertical;
    min-height: 72px;
    height: auto;
    padding: 12px 14px;
}

.cod-pcp-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23666' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    padding-left: 36px;
    background-position: left 14px center;
    cursor: pointer;
}

/* ========================================
   Input Icons
   ======================================== */

.cod-pcp-field-icon-wrap {
    position: relative;
    display: flex;
    align-items: stretch;
}

.cod-pcp-field-icon-wrap .cod-pcp-input-icon {
    border-radius: 40px;
    padding-left: 14px;
}

.cod-pcp-field-icon {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a2e;
    color: #fff;
    border-radius: 0 40px 40px 0;
    pointer-events: none;
    z-index: 1;
}

.cod-pcp-field-icon-wrap .cod-pcp-input-icon {
    padding-right: 52px;
    border-color: #e0e0e0;
    border-left: none;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.cod-pcp-field-icon-wrap .cod-pcp-input-icon:focus {
    border-color: var(--cod-pcp-primary, #1a73e8);
}

.cod-pcp-field-icon-textarea {
    align-items: flex-start;
    padding-top: 14px;
    border-radius: 0 8px 0 0;
}

.cod-pcp-field-icon-wrap-textarea .cod-pcp-input-icon {
    border-radius: 0;
    border-top-right-radius: 0;
}

.cod-pcp-field-icon-wrap-textarea .cod-pcp-input-icon:focus {
    border-color: var(--cod-pcp-primary, #1a73e8);
}

/* ========================================
   Footer & Submit Button
   ======================================== */

.cod-pcp-popup-footer {
    padding: 12px 20px 20px;
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    background: var(--cod-pcp-popup-bg, #ffffff);
    z-index: 5;
}

.cod-pcp-btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 58px;
    padding: 0 24px;
    background: linear-gradient(135deg, var(--cod-pcp-primary, #1a73e8), #1557b0);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(26, 115, 232, 0.3);
    position: relative;
    overflow: hidden;
    font-family: inherit;
    direction: rtl;
}

.cod-pcp-btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(26, 115, 232, 0.4);
}

.cod-pcp-btn-submit:active {
    transform: translateY(0);
}

.cod-pcp-btn-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.cod-pcp-btn-cart-icon {
    flex-shrink: 0;
    opacity: 0.9;
}

.cod-pcp-btn-submit-text {
    flex: 1;
    text-align: center;
}

.cod-pcp-btn-submit-sep {
    opacity: 0.5;
    font-weight: 400;
}

.cod-pcp-btn-submit-total {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    direction: ltr;
}

.cod-pcp-btn-submit-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.cod-pcp-spinner {
    animation: codPcpSpin 0.8s linear infinite;
}

/* ========================================
   Thank You
   ======================================== */

.cod-pcp-thankyou {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    text-align: center;
    background: #fff;
    border-radius: var(--cod-pcp-radius, 16px);
    animation: codPcpSlideUp 0.4s ease;
    overflow-y: auto;
}

.cod-pcp-thankyou-icon {
    margin-bottom: 20px;
    animation: codPcpScaleIn 0.4s ease 0.15s both;
}

.cod-pcp-thankyou-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--cod-pcp-primary, #1a73e8);
    margin: 0 0 10px;
}

.cod-pcp-thankyou-msg {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    margin: 0 0 24px;
    max-width: 400px;
}

.cod-pcp-thankyou-summary {
    background: #f8f9fa;
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 24px;
    width: 100%;
    max-width: 440px;
    text-align: right;
    border: 1px solid #f0f0f0;
}

.cod-pcp-thankyou-summary-title {
    font-weight: 700;
    color: var(--cod-pcp-primary, #1a73e8);
    text-align: center;
    margin: 0 0 12px;
    font-size: 15px;
}

.cod-pcp-order-details {
    font-size: 13px;
    color: #555;
    line-height: 2.2;
}

.cod-pcp-order-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px solid #f0f0f0;
}

.cod-pcp-order-row:last-child {
    border-bottom: none;
}

.cod-pcp-order-row span:last-child {
    text-align: left;
}

.cod-pcp-order-total {
    border-top: 2px solid #e0e0e0;
    border-bottom: none;
    padding-top: 10px;
    margin-top: 4px;
    font-size: 15px;
    color: var(--cod-pcp-primary, #1a73e8);
}

.cod-pcp-thankyou-delivery {
    font-weight: 700;
    color: var(--cod-pcp-primary, #1a73e8);
    text-align: center;
    margin: 14px 0 0;
    font-size: 13px;
}

.cod-pcp-thankyou-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    max-width: 400px;
}

.cod-pcp-btn-continue {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--cod-pcp-primary, #1a73e8), #1557b0);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 160px;
    font-family: inherit;
}

.cod-pcp-btn-continue:hover {
    background: linear-gradient(135deg, #1557b0, #0d47a1);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.cod-pcp-btn-home {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    background: #f5f5f5;
    color: #333;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 160px;
    font-family: inherit;
}

.cod-pcp-btn-home:hover {
    background: #e8e8e8;
    color: #333;
    transform: translateY(-1px);
}

/* ========================================
   Exit Popup
   ======================================== */

.cod-pcp-exit-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.cod-pcp-exit-content {
    position: relative;
    max-width: 500px;
    width: 100%;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 30px;
    animation: codPcpSlideUp 0.4s ease;
    text-align: center;
    direction: rtl;
}

.cod-pcp-exit-close {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #f5f5f5;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.cod-pcp-exit-close:hover {
    background: #e8e8e8;
}

.cod-pcp-exit-header {
    margin-bottom: 20px;
}

.cod-pcp-exit-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 12px 0 8px;
}

.cod-pcp-exit-header p {
    font-size: 14px;
    color: #888;
    margin: 0;
}

.cod-pcp-exit-icon {
    margin-bottom: 12px;
}

.cod-pcp-exit-image {
    max-width: 200px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.cod-pcp-exit-offer {
    margin-bottom: 16px;
}

.cod-pcp-exit-discount {
    display: inline-block;
    font-size: 36px;
    font-weight: 800;
    color: var(--cod-pcp-accent, #ea4335);
    background: linear-gradient(135deg, #fff5f5, #ffe0e0);
    padding: 8px 24px;
    border-radius: 16px;
}

.cod-pcp-btn-exit-claim {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--cod-pcp-accent, #ea4335), #d33426);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 8px;
    font-family: inherit;
}

.cod-pcp-btn-exit-claim:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(234, 67, 53, 0.3);
}

.cod-pcp-exit-no-thanks {
    background: none;
    border: none;
    color: #888;
    font-size: 14px;
    cursor: pointer;
    padding: 8px;
}

.cod-pcp-exit-no-thanks:hover {
    color: #333;
}

/* ========================================
   Radio & Checkbox Groups
   ======================================== */

.cod-pcp-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cod-pcp-radio-label,
.cod-pcp-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
}

.cod-pcp-radio-label input[type="radio"],
.cod-pcp-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--cod-pcp-primary, #1a73e8);
}

/* ========================================
   Width Utilities
   ======================================== */

.cod-pcp-width-100 { width: 100%; }
.cod-pcp-width-50 { width: calc(50% - 6px); }
.cod-pcp-width-33 { width: calc(33.33% - 8px); }

/* ========================================
   Downsell Popup
   ======================================== */

.cod-pcp-downsell {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: codPcpFadeIn 0.3s ease;
    padding: 20px;
}

.cod-pcp-downsell-card {
    position: relative;
    max-width: 440px;
    width: 100%;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    padding: 36px 28px 28px;
    text-align: center;
    animation: codPcpSlideUp 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    direction: rtl;
    overflow: hidden;
}

.cod-pcp-downsell-close {
    position: absolute;
    top: 14px;
    left: 14px;
    width: auto;
    height: auto;
    border-radius: 8px;
    border: none;
    background: #f5f5f500;
    color: #ec0000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.cod-pcp-downsell-close:hover {
    background: #eee;
    color: #333;
}

.cod-pcp-downsell-title {
    font-size: 22px;
    font-weight: 800;
    color: #1a1a2e;
    margin: 0 0 8px;
    line-height: 1.4;
}

.cod-pcp-downsell-subtitle {
    font-size: 15px;
    font-weight: 600;
    color: var(--cod-pcp-secondary, #34a853);
    margin: 0 0 16px;
}

.cod-pcp-downsell-message {
    font-size: 14px;
    color: #666;
    line-height: 1.7;
    margin: 0 0 24px;
}

.cod-pcp-downsell-percent-badge {
    display: inline-block;
    background: var(--cod-pcp-accent, #ea4335);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 20px;
    margin-inline-start: 4px;
    vertical-align: middle;
}

.cod-pcp-downsell-success {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    margin-bottom: 16px;
    background: #f0faf4;
    border-radius: 10px;
    color: #34a853;
    font-size: 14px;
    font-weight: 600;
    animation: codPcpFadeIn 0.3s ease;
}

.cod-pcp-btn-downsell-accept {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 56px;
    padding: 0 24px;
    background: linear-gradient(135deg, var(--cod-pcp-primary, #1a73e8), #1557b0);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(26, 115, 232, 0.3);
    font-family: inherit;
    margin-bottom: 10px;
}

.cod-pcp-btn-downsell-accept:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(26, 115, 232, 0.4);
}

.cod-pcp-btn-downsell-decline {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 48px;
    padding: 0 24px;
    background: #fff;
    color: #666;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.cod-pcp-btn-downsell-decline:hover {
    border-color: #ccc;
    color: #333;
    background: #fafafa;
}

/* ========================================
   Responsive - Mobile First
   ======================================== */

@media (max-width: 768px) {
    #cod-pcp-popup-overlay {
        padding: 16px;
        align-items: center;
    }

    .cod-pcp-popup {
        margin: 0;
        border-radius: 16px;
        max-height: 90vh;
        max-width: 100%;
        animation: codPcpSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .cod-pcp-popup-header {
        padding: 20px 20px 14px;
    }

    .cod-pcp-popup-title {
        font-size: 16px;
        padding-right: 36px;
    }

    .cod-pcp-popup-body {
        padding: 0 16px 16px;
    }

    .cod-pcp-popup-footer {
        padding: 10px 16px 16px;
    }

    .cod-pcp-btn-submit {
        height: 54px;
        font-size: 15px;
        border-radius: 50px;
    }

    .cod-pcp-product-preview {
        flex-direction: row;
        align-items: center;
        text-align: right;
    }

    .cod-pcp-offers-grid {
        gap: 8px;
    }

    .cod-pcp-offer-card {
        min-width: 130px;
        padding: 12px;
    }

    .cod-pcp-width-50,
    .cod-pcp-width-33 {
        width: 100%;
    }

    .cod-pcp-checkout-fields {
        gap: 10px;
    }

    .cod-pcp-downsell {
        padding: 0;
        align-items: flex-end;
    }

    .cod-pcp-downsell-card {
        border-radius: 20px 20px 0 0;
        max-width: 100%;
        padding: 32px 20px 24px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .cod-pcp-downsell-percent-badge {
        font-size: 12px;
        padding: 1px 6px;
    }
}

@media (max-width: 380px) {
    .cod-pcp-popup-header {
        padding: 16px 16px 12px;
    }

    .cod-pcp-popup-body {
        padding: 0 14px 14px;
    }

    .cod-pcp-popup-footer {
        padding: 8px 14px 14px;
    }

    .cod-pcp-btn-submit {
        height: 52px;
        font-size: 14px;
        gap: 8px;
    }

    .cod-pcp-btn-submit-total {
        padding: 3px 10px;
        font-size: 13px;
    }
}

/* ========================================
   Desktop Wide
   ======================================== */

@media (min-width: 769px) {
    .cod-pcp-popup {
        margin: 40px auto;
    }

    .cod-pcp-popup-body {
        padding: 0 24px 24px;
    }

    .cod-pcp-popup-footer {
        padding: 12px 24px 24px;
    }
}
