/**
 * Checkout Page Styles - Shopify-style design
 * Pixel-perfect split layout checkout experience
 */

/* Loading spinner animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================
   FULL-PAGE SPLIT LAYOUT
   ========================================== */

/* Main checkout page - full width */
.checkout-page {
    max-width: none;
    margin: 0;
    padding: 0;
}

/* Hide footer on checkout page */
body.checkout-page-body .site-footer {
    display: none !important;
}

/* Split layout container */
.checkout-split-layout {
    display: flex;
    min-height: calc(100vh - 120px);
}

/* Left side - white background */
.checkout-left {
    flex: 1 1 55%;
    background: #fff;
    display: flex;
    justify-content: flex-end;
    padding: 40px 40px 60px 40px;
}

/* Form wrapper - constrained width, positioned closer to center */
.checkout-form-wrapper {
    width: 100%;
    max-width: 540px;
    margin-right: 30px;
}

/* Right side - gray background, full height */
.checkout-right {
    flex: 0 0 45%;
    max-width: 40%;
    background: #f5f5f5;
    border-left: 1px solid #e1e1e1;
    padding: 40px 60px 60px 45px;
}

/* Order summary wrapper - sticky with proper top offset for header */
.order-summary-wrapper {
    position: sticky;
    top: 130px; /* Account for header height */
    max-width: 400px;
}

/* ==========================================
   EMPTY CART WARNING
   ========================================== */

.empty-cart-warning {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.empty-cart-warning svg {
    margin-bottom: 20px;
}

.empty-cart-warning h2 {
    font-family: 'Inter', Arial, sans-serif;
    font-size: 18px;
    font-weight: 400;
    margin-bottom: 10px;
}

.empty-cart-warning p {
    color: #707070;
    margin-bottom: 20px;
    font-size: 14px;
}

.btn-continue {
    display: inline-block;
    padding: 14px 32px;
    background: #1990c6;
    color: #fff;
    font-size: 14px;
    font-family: 'Inter', Arial, sans-serif;
    border-radius: 6px;
    transition: background 0.2s;
}

.btn-continue:hover {
    background: #1580b3;
}

/* ==========================================
   FORM SECTIONS
   ========================================== */

.form-section {
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid #e1e1e1;
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 24px;
    padding-bottom: 0;
}

.form-section h2 {
    font-family: 'Inter', Arial, sans-serif;
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #333;
}

.section-note {
    font-size: 13px;
    color: #707070;
    margin: -8px 0 16px;
    line-height: 1.5;
}

/* ==========================================
   FORM ELEMENTS
   ========================================== */

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.form-group {
    margin-bottom: 0;
}

.form-group.full-width {
    margin-bottom: 12px;
}

.form-group input,
.form-group select,
.phone-field-wrapper input {
    width: 100%;
    padding: 12px 12px;
    border: 1px solid #d1d1d1;
    border-radius: 6px;
    font-family: 'Inter', Arial, sans-serif;
    font-size: 14px;
    color: #333;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.phone-field-wrapper input:focus {
    outline: none;
    border-color: #1990c6;
    box-shadow: 0 0 0 1px #1990c6;
}

.form-group input::placeholder,
.phone-field-wrapper input::placeholder {
    color: #717171;
}

.form-group input.error,
.form-group select.error,
.phone-field-wrapper input.error {
    border-color: #c00;
}

/* Floating label for country dropdown */
.floating-label {
    display: block;
    font-size: 12px;
    color: #717171;
    margin-bottom: 6px;
}

/* Select wrapper with chevron */
.select-wrapper {
    position: relative;
}

.select-wrapper select {
    appearance: none;
    padding-right: 36px;
    cursor: pointer;
    background-color: #fff;
}

.select-wrapper select:disabled {
    background-color: #fff;
    cursor: default;
    color: #333;
}

.select-chevron {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #717171;
}

/* Phone field wrapper with info icon */
.phone-field-wrapper {
    position: relative;
    display: flex;
    align-items: center;
 
}

/* Phone country code selector */
.phone-country-code {
    position: relative;
    flex-shrink: 0;
}

.phone-country-code select {
    appearance: none;
    -webkit-appearance: none;
    background: #fff;
    border: 1px solid #d1d1d1;
    border-right: none;
    border-radius: 6px 0 0 6px;
    padding: 12px 28px 12px 12px;
    font-size: 14px;
    font-family: 'Inter', Arial, sans-serif;
    color: #333;
    cursor: pointer;
    min-width: 50px;
    max-width: 100px;
    height: auto;
    box-sizing: border-box;
}

.phone-country-code select:focus {
    outline: none;
    border-color: #1990c6;
    box-shadow: 0 0 0 1px #1990c6;
}

.phone-country-code .select-chevron {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #717171;
}

.phone-field-wrapper input[type="tel"] {
    flex: 1;
    border-radius: 0 6px 6px 0;
    padding-right: 40px;
}

.phone-field-wrapper input[type="tel"]:focus {
    border-left-color: #1990c6;
}

.phone-info-icon {
    position: absolute;
    right: 12px;
    color: #a0a0a0;
    cursor: help;
    display: flex;
    align-items: center;
    justify-content: center;
}

.phone-info-icon:hover {
    color: #707070;
}

/* Phone tooltip */
.phone-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    background: #333;
    color: #fff;
    font-size: 12px;
    padding: 8px 12px;
    border-radius: 6px;
    white-space: nowrap;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.phone-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 12px;
    border: 6px solid transparent;
    border-top-color: #333;
}

.phone-info-icon.show-tooltip .phone-tooltip {
    display: block;
}

/* ==========================================
   CHECKBOX STYLING
   ========================================== */

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    margin-top: 14px;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: #1990c6;
    flex-shrink: 0;
}

.checkbox-custom {
    display: none;
}

.checkbox-text {
    line-height: 1.4;
    padding-top: 1px;
}

/* ==========================================
   SHIPPING OPTIONS - RADIO BUTTONS
   ========================================== */

.shipping-options {
    border: 1px solid #d1d1d1;
    border-radius: 6px;
    overflow: hidden;
}

.shipping-option {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    cursor: pointer;
    border-bottom: 1px solid #e5e5e5;
    transition: background 0.15s;
    background: #fff;
}

.shipping-option:last-child {
    border-bottom: none;
}

.shipping-option:hover {
    background: #fafafa;
}

.shipping-option.selected {
    background: #f0f9fc;
}

.shipping-option input[type="radio"] {
    display: none;
}

/* Radio button - solid blue fill when selected */
.radio-custom {
    width: 18px;
    height: 18px;
    border: 1px solid #d1d1d1;
    border-radius: 50%;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
    background: #fff;
}

.shipping-option.selected .radio-custom {
    border-color: #1990c6;
    background: #1990c6;
}

.shipping-option.selected .radio-custom::after {
    content: '';
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
}

.shipping-option-label {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.shipping-option-price {
    font-size: 14px;
    color: #333;
    font-family: 'Inter', Arial, sans-serif;
}

/* ==========================================
   PAYMENT BOX
   ========================================== */

.payment-box {
    border: 1px solid #d1d1d1;
    border-radius: 6px;
    padding: 14px 16px;
    background: #fafafa;
}

.payment-method-text {
    font-size: 14px;
    color: #333;
}

/* Payment options radio buttons (reuses shipping-options pattern) */
.payment-options {
    border: 1px solid #d1d1d1;
    border-radius: 6px;
    overflow: hidden;
}

.payment-note {
    margin-top: 12px;
    font-size: 14px;
    color: #666;
}

/* ==========================================
   ERROR MESSAGES
   ========================================== */

.checkout-errors {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 20px;
}

.checkout-errors p {
    margin: 0 0 8px;
    font-size: 14px;
    color: #b91c1c;
}

.checkout-errors p:last-child {
    margin-bottom: 0;
}

.checkout-errors .error-title {
    font-family: 'Inter', Arial, sans-serif;
    margin-bottom: 12px;
}

/* ==========================================
   PLACE ORDER BUTTON
   ========================================== */

.place-order-btn {
    width: 100%;
    padding: 16px 32px;
    background: #333;
    color: #fff;
    font-family: 'Inter', Arial, sans-serif;
    font-size: 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.place-order-btn:hover:not(:disabled) {
    background: #1580b3;
}

.place-order-btn:disabled {
    background: #a8d4eb;
    cursor: not-allowed;
}

.place-order-btn .btn-loading {
    display: flex;
    align-items: center;
    gap: 10px;
}

.place-order-btn .spinner {
    animation: spin 1s linear infinite;
}

/* ==========================================
   FOOTER LINKS
   ========================================== */

.checkout-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 28px;
}

.checkout-footer-links a {
    font-size: 12px;
    color: #1990c6;
    text-decoration: underline;
}

.checkout-footer-links a:hover {
    color: #1580b3;
}

/* ==========================================
   ORDER SUMMARY - RIGHT COLUMN
   ========================================== */

/* Checkout items container */
.checkout-items {
    margin-bottom: 20px;
}

.loading-state {
    text-align: center;
    padding: 40px 20px;
}

.loading-spinner {
    width: 30px;
    height: 30px;
    border: 2px solid #e5e5e5;
    border-top-color: #1990c6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

.loading-state p {
    color: #707070;
    font-size: 14px;
}

/* ==========================================
   CART ITEM IN CHECKOUT
   ========================================== */

.checkout-item {
    display: flex;
    gap: 14px;
    padding: 10px 0;
    align-items: flex-start;
}

.checkout-item:first-child {
    padding-top: 0;
}

/* Product image container - FIXED: overflow visible for badge */
.checkout-item-image {
    width: 64px;
    height: 64px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    position: relative;
    overflow: visible; /* CRITICAL: Allow badge to extend outside */
    flex-shrink: 0;
}

.checkout-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 7px; /* Slightly smaller to account for border */
}

/* Quantity badge - positioned outside image bounds */
.checkout-item-qty {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    font-size: 12px;
    font-family: 'Inter', Arial, sans-serif;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.checkout-item-details {
    flex: 1;
    min-width: 0;
    padding-top: 2px;
}

.checkout-item-title {
    font-size: 14px;
    color: #333;
    line-height: 1.4;
    margin-bottom: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.checkout-item-variant {
    font-size: 12px;
    color: #717171;
}

.checkout-item-price {
    font-size: 14px;
    color: #333;
    white-space: nowrap;
    text-align: right;
    padding-top: 2px;
}

/* ==========================================
   PROMO CODE SECTION
   ========================================== */

.promo-code-section {
    padding: 20px 0;
    border-top: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
}

.promo-input-wrapper {
    display: flex;
    gap: 8px;
}

.promo-code-section input {
    flex: 1;
    padding: 12px 14px;
    border: 1px solid #d1d1d1;
    border-radius: 6px;
    font-family: 'Inter', Arial, sans-serif;
    font-size: 14px;
    color: #333;
    background: #fff;
    box-sizing: border-box;
}

.promo-code-section input:focus {
    outline: none;
    border-color: #1990c6;
    box-shadow: 0 0 0 1px #1990c6;
}

.promo-code-section input::placeholder {
    color: #717171;
}

.promo-code-section button {
    padding: 12px 20px;
    background: #fafafa;
    border: 1px solid #d1d1d1;
    border-radius: 6px;
    font-family: 'Inter', Arial, sans-serif;
    font-size: 14px;
    color: #717171;
    cursor: pointer;
    transition: all 0.2s;
}

.promo-code-section button:hover {
    background: #f0f0f0;
    color: #333;
}

.promo-code-section button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.promo-message {
    font-size: 12px;
    margin: 8px 0 0;
    display: none;
}

.promo-message.success {
    color: #22c55e;
}

.promo-message.error {
    color: #c00;
}

.promo-message.info {
    color: #717171;
}

/* ==========================================
   SUMMARY TOTALS
   ========================================== */

.summary-totals {
    padding-top: 20px;
}

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

.summary-row.subtotal-row {
    padding-bottom: 6px;
}

.item-count {
    color: #717171;
}

.summary-row.total {
    padding-top: 18px;
    margin-top: 12px;
    border-top: 1px solid #e5e5e5;
    font-size: 14px;
    align-items: baseline;
}

.summary-row.total > span:first-child {
    font-family: 'Inter', Arial, sans-serif;
    font-weight: 600;
}

#summary-total {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.currency-code {
    font-size: 12px;
    color: #717171;
    font-family: 'Inter', Arial, sans-serif;
}

.total-amount {
    font-size: 22px;
    font-family: 'Inter', Arial, sans-serif;
    font-weight: 400;
    color: #333;
}

.summary-row.discount {
    color: #16a34a;
}

.summary-row.discount .discount-amount {
    color: #16a34a;
}

/* ==========================================
   MOBILE ORDER SUMMARY - COLLAPSIBLE
   ========================================== */

/* Hide mobile elements on desktop - IMPORTANT: These must stay hidden */
.mobile-order-summary-toggle,
.mobile-order-summary,
.mobile-add-discount,
.mobile-inline-summary {
    display: none !important;
}

/* Mobile toggle button styles (applied when visible on mobile) */
.summary-toggle-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    font-family: 'Inter', Arial, sans-serif;
    font-size: 14px;
    color: #1990c6;
    cursor: pointer;
    padding: 0;
}

.toggle-chevron {
    color: #1990c6;
    transition: transform 0.3s ease;
}

.mobile-order-summary-toggle.expanded .toggle-chevron {
    transform: rotate(180deg);
}

.toggle-total {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

/* Mobile summary content styles */
.mobile-summary-content {
    padding: 12px 20px 20px;
}

.mobile-items {
    margin-bottom: 16px;
    padding-top: 25px;
}

.mobile-promo {
    border-top: none;
    padding-top: 0;
    margin-bottom: 16px;
}

.mobile-totals {
    padding-top: 16px;
    border-top: 1px solid #e5e5e5;
}

.mobile-summary-total {
    font-weight: 600;
}

/* Mobile add discount button */
.add-discount-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    font-family: 'Inter', Arial, sans-serif;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    padding: 0;
}

.add-discount-btn svg {
    color: #717171;
}

.add-discount-btn:hover {
    color: #1990c6;
}

.add-discount-btn:hover svg {
    color: #1990c6;
}

/* Mobile bottom total bar styles */
.bottom-total-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bag-icon {
    color: #333;
}

.total-text {
    display: flex;
    flex-direction: column;
}

.total-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.total-items {
    font-size: 12px;
    color: #717171;
}

.bottom-total-amount {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    font-family: 'Inter', Arial, sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    padding: 0;
}

.total-chevron {
    color: #717171;
    transition: transform 0.3s ease;
}

/* ==========================================
   RESPONSIVE STYLES
   ========================================== */

@media (max-width: 1100px) {
    .checkout-left {
        padding: 40px 30px 60px 30px;
    }

    .checkout-form-wrapper {
        margin-right: 20px;
    }

    .checkout-right {
        padding: 40px 30px 60px 30px;
    }
}

@media (max-width: 960px) {
    /* Hide desktop order summary */
    .checkout-right {
        display: none !important;
    }

    /* Show mobile order summary elements */
    .mobile-order-summary-toggle {
        display: flex !important;
        background: #f5f5f5;
        border-bottom: 1px solid #e1e1e1;
        padding: 16px 20px;
        justify-content: space-between;
        align-items: center;
    }

    .mobile-order-summary {
        display: block !important;
        background: #f5f5f5;
        border-bottom: 1px solid #e1e1e1;
        overflow: hidden;
        transition: max-height 0.3s ease;
        max-height: 0; /* Closed by default */
    }

    .mobile-order-summary.expanded {
        max-height: 1000px;
    }

    .mobile-add-discount {
        display: flex !important;
        margin: 20px 0;
    }

    /* Mobile Inline Summary (expandable in place) */
    .mobile-inline-summary {
        display: block !important;
        margin: 20px 0;
    }

    .inline-summary-toggle {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0;
    }

    .inline-toggle-left {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .inline-toggle-left .bag-icon {
        color: #333;
    }

    .inline-toggle-text {
        display: flex;
        flex-direction: column;
    }

    .inline-toggle-label {
        font-size: 14px;
        font-weight: 600;
        color: #333;
    }

    .inline-toggle-items {
        font-size: 12px;
        color: #717171;
    }

    .inline-toggle-btn {
        display: flex;
        align-items: center;
        gap: 6px;
        background: none;
        border: none;
        font-family: 'Inter', Arial, sans-serif;
        font-size: 16px;
        font-weight: 600;
        color: #333;
        cursor: pointer;
        padding: 0;
    }

    .inline-chevron {
        color: #717171;
        transition: transform 0.3s ease;
        transform: rotate(180deg); /* Points up when closed */
    }

    .mobile-inline-summary.expanded .inline-chevron {
        transform: rotate(0deg); /* Points down when open */
    }

    /* Hide toggle when expanded, show content */
    .mobile-inline-summary.expanded .inline-summary-toggle {
        display: none;
    }

    /* Expanded content */
    .inline-summary-content {
        display: none;
    }

    .mobile-inline-summary.expanded .inline-summary-content {
        display: block;
    }

    .inline-summary-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-bottom: 16px;
        cursor: pointer;
    }

    .inline-summary-title {
        font-family: 'Inter', Arial, sans-serif;
        font-size: 16px;
        font-weight: 600;
        color: #333;
    }

    .inline-header-chevron {
        color: #717171;
        transform: rotate(0deg); /* Points down when expanded (can collapse) */
    }

    .inline-summary-items {
        padding-bottom: 16px;
        border-bottom: 1px solid #e5e5e5;
        padding-top: 15px;
    }

    .inline-promo-section {
        padding: 16px 0;
        border-bottom: 1px solid #e5e5e5;
    }

    .inline-promo-section .promo-input-wrapper {
        display: flex;
        gap: 8px;
    }

    .inline-promo-section input {
        flex: 1;
        padding: 12px 14px;
        border: 1px solid #d1d1d1;
        border-radius: 6px;
        font-family: 'Inter', Arial, sans-serif;
        font-size: 14px;
        color: #333;
        background: #fff;
        box-sizing: border-box;
    }

    .inline-promo-section input:focus {
        outline: none;
        border-color: #1990c6;
        box-shadow: 0 0 0 1px #1990c6;
    }

    .inline-promo-section input::placeholder {
        color: #717171;
    }

    .inline-promo-section button {
        padding: 12px 20px;
        background: #fff;
        border: 1px solid #d1d1d1;
        border-radius: 6px;
        font-family: 'Inter', Arial, sans-serif;
        font-size: 14px;
        color: #333;
        cursor: pointer;
        transition: all 0.2s;
    }

    .inline-promo-section button:hover {
        background: #f5f5f5;
    }

    .inline-promo-section button:disabled {
        cursor: not-allowed;
        opacity: 0.6;
    }

    .inline-summary-totals {
        padding-top: 16px;
    }

    .inline-total-row {
        padding-top: 16px;
        margin-top: 8px;
        border-top: 1px solid #e5e5e5;
    }

    .inline-total-row .total-amount {
        font-size: 18px;
    }

    .checkout-split-layout {
        flex-direction: column;
        min-height: auto;
    }

    .checkout-left {
        flex: none;
        justify-content: center;
        padding: 24px 20px 40px;
    }

    .checkout-form-wrapper {
        max-width: 100%;
        margin-right: 0;
    }

    .order-summary-wrapper {
        position: static;
        max-width: none;
    }
}

@media (max-width: 600px) {
    .checkout-left {
        padding: 20px 16px 40px;
    }

    .mobile-order-summary-toggle {
        padding: 14px 16px;
    }

    .mobile-summary-content {
        padding: 0 16px 16px;
    }

    .form-section h2 {
        font-size: 18px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .checkout-item-image {
        width: 56px;
        height: 56px;
    }

    .checkout-footer-links {
        gap: 16px;
    }

    .shipping-option {
        padding: 12px 14px;
    }

    .total-amount {
        font-size: 20px;
    }

    .place-order-btn {
        background: #333;
    }
}

/* ==========================================
   READY-TO-SHIP SHIPPING UI
   ========================================== */

/* RTS Destination Wrapper (in Delivery section) */
#rts-destination-wrapper {
    margin-bottom: 12px;
}

#rts-destination-wrapper .select-wrapper select {
    background-color: #fff;
    cursor: pointer;
}

#rts-destination-wrapper .select-wrapper select:focus {
    outline: none;
    border-color: #1990c6;
    box-shadow: 0 0 0 1px #1990c6;
}

/* International Fields (State and Zip Code) */
.international-fields {
    margin-bottom: 12px;
}

.international-fields .form-row {
    display: flex;
    gap: 12px;
}

.international-fields .form-group {
    flex: 1;
}

.international-fields input {
    width: 100%;
}

/* RTS Shipping Section */
.rts-shipping-section {
    margin-top: 0;
}

.rts-shipping-section .form-group.full-width {
    margin-bottom: 16px;
}

.rts-shipping-section .select-wrapper select {
    background-color: #fff;
    cursor: pointer;
}

.rts-shipping-section .select-wrapper select:focus {
    outline: none;
    border-color: #1990c6;
    box-shadow: 0 0 0 1px #1990c6;
}

/* Tier Section */
.rts-tier-section {
    margin-top: 16px;
}

.tier-label {
    font-size: 13px;
    color: #717171;
    margin-bottom: 10px;
}

#rts-tier-options {
    margin-top: 8px;
}

/* Shipping Breakdown */
.rts-shipping-breakdown {
    margin-top: 16px;
    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    overflow: hidden;
}

.breakdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    background: #f5f5f5;
}

.breakdown-toggle {
    display: flex;
    align-items: center;
    color: #717171;
    transition: transform 0.3s ease;
}

.rts-shipping-breakdown.expanded .breakdown-toggle {
    transform: rotate(180deg);
}

.breakdown-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 14px;
}

.rts-shipping-breakdown.expanded .breakdown-content {
    max-height: 500px;
    padding: 12px 14px;
    border-top: 1px solid #e5e5e5;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 13px;
    color: #555;
}

.breakdown-label {
    flex: 1;
}

.breakdown-price {
    white-space: nowrap;
}

.breakdown-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    background: #f0f0f0;
    border-top: 1px solid #e5e5e5;
}

/* Shipping Loading State */
.rts-shipping-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 0;
    font-size: 14px;
    color: #717171;
}

.loading-spinner.small {
    width: 18px;
    height: 18px;
    border-width: 2px;
    margin: 0;
}

/* Tier price display */
.shipping-option-price {
    min-width: 80px;
    text-align: right;
}

/* Optgroup styling for destination dropdown */
.rts-shipping-section select optgroup {
    font-weight: 600;
    font-size: 13px;
    color: #333;
    background: #f5f5f5;
}

.rts-shipping-section select option {
    font-weight: 400;
    font-size: 14px;
    padding: 8px 12px;
}

/* Mobile adjustments for RTS */
@media (max-width: 960px) {
    .rts-shipping-breakdown {
        margin-top: 12px;
    }

    .rts-shipping-breakdown.expanded .breakdown-content {
        padding: 10px 12px;
    }

    .breakdown-header,
    .breakdown-total {
        padding: 10px 12px;
    }
}

@media (max-width: 600px) {
    .breakdown-item {
        font-size: 12px;
    }

    .breakdown-total {
        font-size: 13px;
    }
}

/* ==========================================
   USER ACCOUNT INTEGRATION
   ========================================== */

/* Logged-in user info */
.logged-in-user-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #f9f9f9;
    border-radius: 6px;
    margin-bottom: 16px;
}

.logged-in-user-info .user-email {
    font-size: 14px;
    color: #1a1a1a;
}

.logged-in-user-info .logout-link {
    font-size: 13px;
    color: #666;
    text-decoration: underline;
}

.logged-in-user-info .logout-link:hover {
    color: #1a1a1a;
}

/* Account opt-in section */
.account-optin-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.account-checkbox {
    margin-bottom: 0;
}

.account-password-fields {
    margin-top: 16px;
    padding-left: 28px;
}

.account-password-fields .form-group {
    margin-bottom: 0;
}

.account-password-fields input {
    background: #fafafa;
    border: 1px solid #e0e0e0;
}

.account-password-fields input:focus {
    background: #fff;
    border-color: #1a1a1a;
}

#checkout-password-strength {
    font-size: 11px;
    margin-top: 6px;
    min-height: 16px;
}

#checkout-password-strength.weak {
    color: #c62828;
}

#checkout-password-strength.medium {
    color: #e65100;
}

#checkout-password-strength.strong {
    color: #2e7d32;
}

/* Saved addresses section */
.saved-addresses-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.saved-address-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.saved-addresses-section .select-wrapper select {
    background: #fafafa;
    font-size: 14px;
}

.saved-addresses-section .select-wrapper select:focus {
    background: #fff;
}

/* Mobile adjustments */
@media (max-width: 600px) {
    .logged-in-user-info {
        padding: 12px 14px;
    }

    .account-password-fields {
        padding-left: 0;
    }

    .saved-addresses-section {
        margin-bottom: 16px;
        padding-bottom: 12px;
    }
}
