*, *::before, *::after {
    box-sizing: border-box; /* Apply box-sizing universally */
}

body { /* Apply background to the whole page */
    background-color: #f2f8ff;
}

/* Shared variables for card-style elements (sections & cart) */
:root {
    --ssc-box-padding: 35px;
    --ssc-box-radius: 12px;
}
.ssc-page-container {
    width: 100%;
    min-height: 100vh; /* Ensure it takes full height */
    display: flex;
    flex-direction: column;
}
.ssc-form-container {
    width: 100%;
    max-width: 1100px !important;
    margin: 0 auto; /* Center the form container */
    padding: 2rem 20px; /* Adjusted padding */
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
}
.ssc-checkout-column {
    flex: 3; /* Give checkout column 3x the space */
    min-width: 380px;
    width: 100%; /* Ensure takes width on small screens before wrapping */
}
.ssc-cart-column {
    flex: 1;
    min-width: 375px; /* Reduced min-width slightly */
    /* max-width: 350px; Removed fixed max-width */
    position: sticky;
    top: 20px;
    height: fit-content;
}
.ssc-section {
    margin-bottom: 30px;
    padding: var(--ssc-box-padding);
    background: #fff;
    border: 1px solid #ddd;
    border-radius: var(--ssc-box-radius);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    width: 100%; /* Make section take full column width */
}
.ssc-section-title {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 20px;
    color: #222;
}

.ssc-step-badge {
    display: inline-block;
    background-color: #e7f0ff;
    color: #3167ff;
    font-weight: 600;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.ssc-form-row {
    margin-bottom: 18px;
}
.ssc-form-row label {
    display: block;
    margin-bottom: 6px;
    font-weight: normal;
    font-size: 1rem;
    color: #333;
}
.ssc-form-row input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; /* Smooth transition */
}
.ssc-form-row input:focus {
    border-color: #3167ff;
    box-shadow: 0 0 0 0.2rem rgba(49, 103, 255, 0.25);
    outline: none;
}
.ssc-privacy-note {
    font-size: 12px;
    color: #666;
    margin-top: 8px;
}
.ssc-privacy-note a,
.ssc-terms-row label a,
.ssc-recaptcha-note a {
    color: #3167ff;
    text-decoration: none;
}
.ssc-privacy-note a:hover,
.ssc-terms-row label a:hover,
.ssc-recaptcha-note a:hover {
    text-decoration: underline;
}
.ssc-addon-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    padding: 15px;
    background: rgba(147, 176, 255, 0.249);
    border-radius: 8px;
    border: 1px solid #3167ff;
}
/* Hover effect removed */
.ssc-addon-checkbox {
    margin-right: 10px;
    margin-top: 6px;
    transform: scale(1.3);
    accent-color: #3167ff;
}
.ssc-addon-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.ssc-addon-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.ssc-addon-title {
    font-weight: 500;
}
.ssc-addon-desc {
    font-size: 14px;
    color: #555;
}
.ssc-addon-price {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
}
.ssc-original-price {
    text-decoration: line-through;
    color: #999;
}
.ssc-current-price {
}
.ssc-terms-row {
    margin-top: 25px;
}
.ssc-terms-checkbox {
    margin-right: 10px;
    transform: scale(1.5);
}
#submit-button {
    background-color: #3167ff;
    color: white;
    border: none;
    padding: 18px;
    border-radius: 30px;
    cursor: pointer;
    width: 100%;
    margin-top: 25px;
    margin-bottom: 12px; /* slight bottom spacing */
    font-size: 18px;
    font-weight: bold;
    transition: opacity 0.2s ease;
}
#submit-button:hover {
    opacity: 0.85;
}
#submit-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}
.error-message {
    color: red;
    margin-top: 8px;
    display: none;
    font-size: 14px;
}

/* Logged-in user email notice */
.ssc-logged-in-notice {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    font-size: 14px;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
}
#email-badge {
    display: none;
    background-color: #4CAF50;
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    margin-top: 5px;
}
#payment-element {
    margin-top: 20px;
}
.ssc-cart {
    margin-bottom: 30px;
    padding: var(--ssc-box-padding);
    background: #fff;
    border: 1px solid #ddd;
    border-radius: var(--ssc-box-radius);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.ssc-cart-title {
    font-size: 1.5rem;
    font-weight: 500;
    color: #222;
    margin-bottom: 10px;
}
.ssc-cart-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    font-size: 1rem;
    font-weight: 300;
}
.ssc-cart-total {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    margin-top: 15px;
    border-top: 1px solid #ddd; /* Thinner border */
    font-weight: bold;
    font-size: 20px; /* Larger font size */
    color: #111; /* Darker text color */
}
.ssc-cart-item-subtitle {
    font-size: 0.875rem;
    color: #6B7280; /* Blue-gray color */
    margin-top: 4px;
    max-width: 220px; /* Smaller width for the subtitle */
    line-height: 1.3;
}
.ssc-spring-sale-item {
    background: #F0FDF4; /* Light green background */
    margin: 10px -15px; /* Negative margin to extend background */
    padding: 12px 15px;
}
.ssc-spring-sale-desc {
    font-size: 0.875rem;
    color: #16A34A; /* Green color */
    margin-top: 2px;
}
.ssc-spring-sale-discount {
    color: #16A34A; /* Green color */
}
.ssc-coupon-desc {
    font-size: 0.875rem;
    color: #6B7280;
    margin-top: 2px;
}
.ssc-coupon-discount {
    color: #3167ff; /* Blue color for coupon discount */
}
.ssc-spring-sale-notice {
    color: #000000;
    font-size: 1rem;
    margin-bottom: 20px;
    line-height: 1.4;
}
.ssc-guarantee {
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    background: #f0f8ff;
    border-radius: 4px;
    font-weight: bold;
    color: #0073aa;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-decoration: underline;
}
.ssc-guarantee:hover {
    background-color: #e1f1ff;
}
.ssc-coupon-link {
    text-align: center;
    margin-top: 10px;
    font-size: 14px;
    color: #3167ff;
    cursor: pointer;
    text-decoration: underline;
    transition: opacity 0.2s ease;
}
.ssc-coupon-link:hover {
    opacity: 0.8;
}
.ssc-cart-coupon-section {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}
.ssc-cart-coupon-section .ssc-coupon-row {
    display: flex;
    gap: 10px;
}
.ssc-cart-coupon-section #coupon-code {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}
.ssc-cart-coupon-section .ssc-coupon-button {
    padding: 10px 20px;
    background: #3167ff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: opacity 0.2s ease;
}
.ssc-cart-coupon-section .ssc-coupon-button:hover {
    opacity: 0.85;
}
.ssc-cart-coupon-section .ssc-coupon-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}
.ssc-cart-coupon-section .ssc-coupon-message {
    margin-top: 10px;
    font-size: 13px;
    padding: 8px;
    border-radius: 4px;
}
.ssc-cart-coupon-section .ssc-coupon-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.ssc-cart-coupon-section .ssc-coupon-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
.ssc-guarantee-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}
.ssc-guarantee-popup-content {
    background-color: white;
    padding: 30px;
    border-radius: 5px;
    max-width: 500px;
    width: 90%;
    position: relative;
}
.ssc-guarantee-popup-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}
.ssc-guarantee-popup-title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #222;
}
.ssc-recaptcha-note {
    font-size: 11px;
    color: #999;
    text-align: center;
    margin-top: 20px;
}
.ssc-optional-text {
    font-size: 1.125rem;
    font-weight: normal;
    color: #666;
}
.ssc-question-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    background-color: #888;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 16px;
    font-size: 12px;
    margin-left: 5px;
    cursor: help;
    position: relative;
    vertical-align: middle;
}
.ssc-question-icon:hover .ssc-popover {
    display: block;
}
.ssc-popover {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    padding: 10px 15px;
    background-color: #333;
    color: white;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.4;
    width: 280px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 1000;
}
.ssc-popover::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
}
.ssc-stripe-logo { /* Desktop Stripe Logo (below cart) */
    text-align: center;
    margin-top: 30px;
    margin-bottom: 20px;
    display: block; /* Show by default */
}
.ssc-stripe-logo img {
    height: 24px;
    width: auto;
}
.ssc-mobile-stripe-logo { /* Mobile Stripe Logo (below submit) */
    display: none; /* Hide by default */
    text-align: center;
    margin-top: 20px;
}
.ssc-mobile-stripe-logo img {
    height: 24px;
    width: auto;
}

/* Header Bar Styles */
.ssc-header-bar {
    background-color: #fff;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: relative; /* Changed from sticky to relative */
    z-index: 900;     /* Ensure above other content */
}
.ssc-header-left a.ssc-header-back {
    color: #555; /* Changed to gray */
    text-decoration: none;
    font-size: 1rem;
}
.ssc-header-left a.ssc-header-back:hover {
    text-decoration: underline;
}
.ssc-header-center {
    text-align: center;
}
.ssc-header-logo {
    display: block;
    max-height: 30px; /* Set max height */
    width: auto;
    margin: 0 auto 5px auto; /* Center logo and add space below */
}
.ssc-header-text {
    font-size: 0.875rem; /* 14px */
    color: #555;
    display: block;
}
.ssc-header-right .ssc-header-license {
    font-size: 0.875rem; /* 14px */
    color: #555;
}

/* Footer Bar Styles */
.ssc-footer-bar {
    /* background-color: #fff; Removed background */
    /* padding: 2rem; Removed padding */
    margin: 2rem auto; /* Center footer and add vertical space */
    /* border-top: 1px solid #ddd; Removed border */
    max-width: 1100px; /* Match form container width */
    width: 100%; /* Ensure it takes available width up to max */
    padding: 0 20px; /* Add horizontal padding similar to form container */
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* Align items to top */
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    gap: 20px;
}
.ssc-footer-left .ssc-footer-logo {
    height: 30px; /* Adjust as needed */
    width: auto;
}
.ssc-footer-right {
    display: flex;
    gap: 30px; /* Space between columns */
    flex-wrap: wrap; /* Allow columns to wrap */
}
.ssc-footer-column {
    font-size: 0.875rem; /* 14px */
    line-height: 1.6;
    color: #555;
}
.ssc-footer-column strong {
    color: #333;
    margin-bottom: 8px;
    display: block;
}
.ssc-footer-column a {
    color: #0073aa;
    text-decoration: none;
}
.ssc-footer-column a:hover {
    text-decoration: underline;
}

/* Tablet styles – ensure cart appears first when columns wrap */
@media screen and (max-width: 850px) {
    .ssc-cart-column {
        order: -1;          /* Move cart above checkout */
        position: static;   /* Disable sticky while stacked */
    }
}

/* Mobile styles */
@media screen and (max-width: 768px) {
    .ssc-page-container {
        padding-top: 0; /* Remove padding if header is sticky */
        padding-bottom: 0;
    }
    .ssc-header-bar {
        padding: 0.75rem 1.125rem;
        position: relative; /* Keep consistent with desktop non-sticky behavior */
    }
    .ssc-header-logo {
        max-height: 25px; /* Adjust logo size for mobile */
    }
    .ssc-header-text {
        font-size: 0.75rem;
    }
    .ssc-header-left a.ssc-header-back {
        font-size: 1rem; /* Keep arrow size reasonable */
    }
    .ssc-header-left a.ssc-header-back .ssc-back-text {
        display: none; /* Hide "Back" text */
    }
    .ssc-header-right .ssc-header-license {
        font-size: 0.75rem;
    }
    .ssc-header-right .ssc-header-license .ssc-license-prefix {
        display: none; /* Hide "TDLR " */
    }

    .ssc-form-container {
        padding: 1rem 1rem; /* Adjust mobile padding */
        gap: 15px;
    }
    .ssc-checkout-column,
    .ssc-cart-column {
        flex: 1 0 100%; /* Make columns full width */
        min-width: 100%;
        width: 100%;
        margin-bottom: 0; /* Remove extra bottom margin */
    }
    .ssc-cart-column {
        order: -1; /* Cart appears first */
        position: static; /* Remove sticky on mobile */
    }
    .ssc-cart {
        margin-bottom: 15px; /* Reduce margin on mobile */
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        padding: 20px; /* Match section padding on mobile */
    }
    .ssc-section {
        padding: 20px; /* Adjust section padding */
        margin-bottom: 15px;
    }
    .ssc-stripe-logo {
        display: none; /* Hide desktop logo (below cart) */
    }
    .ssc-mobile-stripe-logo {
        display: block; /* Show mobile logo (below submit) */
    }

    .ssc-footer-bar {
        flex-direction: column; /* Stack footer items vertically */
        align-items: center; /* Center items */
        padding: 1.5rem 1rem; /* Adjust padding */
        margin-top: 1rem; /* Reduce top margin */
        text-align: center;
        max-width: 100%; /* Footer takes full width on mobile */
    }
    .ssc-footer-left {
        margin-bottom: 1.5rem; /* Space below logo */
    }
    .ssc-footer-right {
        flex-direction: column; /* Stack columns vertically */
        gap: 15px; /* Reduce gap between columns */
        width: 100%; /* Ensure columns take full width */
        align-items: center; /* Center column content */
    }
    .ssc-footer-column {
        width: 100%;
    }
}

/* Styles for Thank You Page Message - Base container */
.ssc-thank-you-container {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 40px;
    margin: 30px auto;
    max-width: 600px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.ssc-thank-you-container .ssc-thank-you-logo {
    max-height: 40px;
    width: auto;
    margin-bottom: 25px;
}

.ssc-thank-you-container .ssc-thank-you-title {
    font-size: 28px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
}

.ssc-thank-you-container .ssc-thank-you-details p {
    font-size: 16px;
    color: #555;
    line-height: 1.7;
    margin-bottom: 10px;
}

/* Password Set Form Styles */
#ssc-set-password-form {
    margin-top: 25px;
    border-top: 1px solid #eee;
    padding-top: 20px;
    text-align: left; /* Align form elements left */
}

#ssc-set-password-form p {
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

#ssc-new-password {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

#ssc-set-password-button {
    width: 100%;
    padding: 12px;
    background-color: #3167ff; /* Use main button color */
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#ssc-set-password-button:hover {
    background-color: #2554cc; /* Darker shade on hover */
}

#ssc-set-password-button:disabled {
    background-color: #a0b8ff;
    cursor: not-allowed;
}

#ssc-password-error {
    color: #dc3545; /* Bootstrap danger color */
    margin-top: 8px;
    display: none; /* Hidden by default */
    font-size: 14px;
    font-weight: 500;
}

.ssc-thank-you-details strong {
    color: #333;
}

.ssc-thank-you-details a {
    color: #3167ff; /* Use button color */
    text-decoration: none;
    font-weight: 600;
}

.ssc-thank-you-details a:hover {
    text-decoration: underline;
}

/* Notice/error modifiers for thank-you container */
.ssc-payment-notice {
    background-color: #fffbeb;
    border-color: #ffcc00;
    padding: 30px;
}
.ssc-payment-notice .ssc-thank-you-title {
    color: #d9a300;
}

.ssc-payment-error {
    background-color: #ffebeb;
    border-color: #cc0000;
    padding: 30px;
}
.ssc-payment-error .ssc-thank-you-title {
    color: #b30000;
}

/* ------------------------------------------------------------------
   Animated success checkmark (Thank-You page)
   ------------------------------------------------------------------ */
.ssc-checkmark{
    width:48px;
    height:48px;
    margin:0 auto 20px auto;
    /* Entrance animation */
    opacity:0;
    transform:scale(.7);
    animation:ssc-checkmark-in .45s cubic-bezier(.21,1.02,.73,1) .1s forwards;
}
.ssc-checkmark svg{
    width:100%;
    height:100%;
    display:block;
}
.ssc-checkmark-path{
    stroke-dasharray:20;
    stroke-dashoffset:20;
    animation:ssc-checkmark-draw .3s cubic-bezier(.65,0,.45,1) .25s forwards;
}

@keyframes ssc-checkmark-in{
    to{opacity:1;transform:scale(1);}
}
@keyframes ssc-checkmark-draw{
    to{stroke-dashoffset:0;}
}