/* Checkout Stepper Styles - Dark Theme integration */

/* Force stepper card visibility on mobile/tablets (overrides theme.css display: none) */
#main-slider .stepper-card {
    display: block !important;
}

/* Ensure section allows scrolling on mobile if card is tall */
.page-section.background-img-slider {
    position: relative;
    background-size: cover !important;
    background-position: 50% 0 !important;
}

/* Ensure container contents sit above theme elements */
.page-section.background-img-slider>.container {
    position: relative;
    z-index: 2;
}

/* Push card down below fixed navbar on desktop */
#main-slider .div-cell {
    padding-top: 20px !important;
}

/* Compact and Wide Stepper Card - designed to fit fully in the viewport */
.stepper-card {
    max-width: 950px;
    /* Wide card */
    margin: 0 auto;
    padding: 20px 35px !important;
    /* Compact padding */
    background: #ffffff !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    text-align: left;
    border-radius: 12px;
    max-height: 85vh;
    overflow-y: auto;
}

/* Fix Back button visibility on white background */
.stepper-card .prev-btn {
    border: 2px solid #0056B3 !important;
    color: #0056B3 !important;
    background: transparent !important;
    font-weight: 600;
}

.stepper-card .prev-btn:hover {
    background: #0056B3 !important;
    color: #ffffff !important;
}

.stepper-card h3.step-title {
    color: #0d1d31;
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 5px;
    font-size: 20px;
}

.stepper-card .step-desc {
    color: #666666;
    margin-bottom: 15px;
    font-size: 13px;
}

/* Stepper Indicator */
.stepper-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
    position: relative;
    padding: 0 10px;
}

.stepper-indicator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 30px;
    right: 30px;
    height: 2px;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
    transform: translateY(-50%);
}

.stepper-indicator .step {
    background: #ffffff;
    border: 2px solid rgba(0, 0, 0, 0.15);
    color: #666666;
    border-radius: 30px;
    padding: 6px 18px;
    font-size: 12px;
    font-weight: 600;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
    font-family: 'Raleway', sans-serif;
}

.stepper-indicator .step.active {
    border-color: #0056B3;
    color: #ffffff;
    background: #0056B3;
    box-shadow: 0 0 10px rgba(0, 86, 179, 0.5);
}

.stepper-indicator .step.completed {
    background: #1abc9c;
    border-color: #1abc9c;
    color: #ffffff;
}

/* Step Content Animation */
.step-content {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.step-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form inputs styling */
.stepper-card label {
    color: #333333;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stepper-card .form-group {
    margin-bottom: 12px;
}

.stepper-card .form-control {
    background: #f8f9fa !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    color: #333333 !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
    height: auto !important;
    box-shadow: none !important;
    transition: all 0.25s ease;
    font-size: 14px !important;
}

.stepper-card .form-control.error-border {
    border-color: #ea032a !important;
    box-shadow: 0 0 0 1px #ea032a !important;
}

.stepper-card .form-control:focus {
    background: #ffffff !important;
    border-color: #0056B3 !important;
    box-shadow: 0 0 8px rgba(0, 86, 179, 0.3) !important;
}

.stepper-card .form-control::placeholder {
    color: #999999 !important;
}

/* Override browser autofill (autocomplete) styling in dark mode */
.stepper-card input:-webkit-autofill,
.stepper-card input:-webkit-autofill:hover,
.stepper-card input:-webkit-autofill:focus,
.stepper-card input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
    /* Force card background color */
    -webkit-text-fill-color: #333333 !important;
    /* Force dark text */
    transition: background-color 5000s ease-in-out 0s;
}

/* Options Container (Radio Cards) - Styled for Equal Height */
.options-container {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: stretch;
    /* Forces children to have the same height */
}

.option-card {
    flex: 1;
    cursor: pointer;
    margin: 0;
    display: flex;
    /* Flex display to pass 100% height down */
    flex-direction: column;
}

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

.option-card .card-content {
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 15px 10px;
    text-align: center;
    transition: all 0.3s ease;
    background: #f8f9fa;
    display: flex;
    /* Centered content structure */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
    /* Fills outer container height */
    height: 100%;
}

.option-card .card-content h4 {
    margin: 8px 0 0 0;
    font-weight: 600;
    color: #333333;
    font-size: 15px;
}

.option-card .card-content i {
    font-size: 2em !important;
    color: rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

.option-card .card-content .price-badge,
.option-card .card-content .price-tag {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    color: #1abc9c;
    font-weight: bold;
}

.option-card .card-content .price-tag {
    font-size: 15px;
    margin-top: 5px;
}

.option-card input[type="radio"]:checked+.card-content {
    border-color: #0056B3;
    background: rgba(0, 86, 179, 0.15);
    box-shadow: 0 4px 12px rgba(0, 86, 179, 0.25);
}

.option-card input[type="radio"]:checked+.card-content i {
    color: #0056B3;
}

/* Preventa Ribbon Badge (similar to 'BEST' badge) */
.option-card .card-content.is-preventa {
    position: relative;
    overflow: hidden;
}

/* Real HTML Ribbon Badge */
.option-card .card-content .price-ribbon {
    position: absolute;
    top: 20px;
    right: -55px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 200px;
    height: 42px;
    background-color: #0056B3;
    color: #ffffff;
    text-align: center;
    transform: rotate(45deg);
    -webkit-transform: rotate(45deg);
    -moz-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    -o-transform: rotate(45deg);
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.option-card .card-content .price-ribbon span {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1.1;
    letter-spacing: 0.5px;
}

.option-card .card-content .price-ribbon small {
    font-size: 10.5px; /* Larger date text */
    font-weight: 800;
    display: block;
    line-height: 1.1;
    margin-top: 2px;
}

.step-actions {
    margin-top: 20px;
}

.flex-between {
    display: flex;
    justify-content: space-between;
}

/* Checkout Summary Box */
.summary-box {
    background: #f8f9fa;
    padding: 12px 15px;
    /* Shrunk spacing */
    border-radius: 8px;
    margin-bottom: 15px;
    /* Shrunk spacing */
    border-left: 4px solid #1abc9c;
}

.summary-box h4 {
    margin: 0;
    color: #333333;
    font-size: 15px;
}

.summary-box h4 span {
    color: #1abc9c;
    font-weight: bold;
    font-size: 19px;
}

.summary-box p {
    margin: 3px 0 0 0;
    color: #666666;
    font-size: 11px;
}

/* Conekta Form Styling */
.payment-form {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 15px;
    /* Shrunk spacing */
}

/* Responsive Overrides for Tablets and Mobile */
@media (max-width: 991px) {

    /* Prevent the fixed absolute slide styling from cutting off card scroll */
    #main-slider .item {
        height: auto !important;
        min-height: 100vh !important;
        padding-top: 100px !important;
        padding-bottom: 60px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    #main-slider .caption {
        position: relative !important;
        height: auto !important;
        width: 100% !important;
        top: 0 !important;
        left: 0 !important;
        padding: 0 !important;
    }

    #main-slider .caption>.container,
    #main-slider .div-table,
    #main-slider .div-cell {
        display: block !important;
        height: auto !important;
        width: 100% !important;
        padding: 0 !important;
    }
}

@media (max-width: 767px) {

    /* Horizontal round circle indicators for mobile instead of vertical stacking */
    .stepper-indicator {
        flex-direction: row !important;
        justify-content: space-around;
        gap: 0;
        margin-bottom: 20px;
    }

    .stepper-indicator::before {
        display: block;
        /* Draw the line horizontally */
        left: 20px;
        right: 20px;
    }

    .stepper-indicator .step {
        border-radius: 50% !important;
        width: 32px !important;
        height: 32px !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 13px !important;
    }

    .stepper-indicator .step .step-text {
        display: none !important;
        /* Hide label text on mobile screen sizes */
    }

    /* Layout options vertical on small devices */
    .options-container {
        flex-direction: column;
        gap: 10px;
    }

    .stepper-card {
        padding: 15px 20px !important;
        margin: 0 15px;
        /* Add margin so it doesn't touch screen edges */
    }
}

/* Custom Floating Toast Alert */
#floating-toast {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: #ea032a;
    color: #ffffff;
    padding: 15px 30px;
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(234, 3, 42, 0.4);
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    font-size: 15px;
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: none;
}

#floating-toast.show {
    top: 40px;
}

/* =========================================
   Print Ticket Styles 
   (Formats window.print() to look like a real ticket)
   ========================================= */
@media print {
    body, html {
        background: #fff !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Hide everything on the page except the printable ticket container */
    body:not(.printing-oxxo) > *:not(#printable-ticket) {
        display: none !important;
        visibility: hidden !important;
    }
    
    body.printing-oxxo > *:not(#printable-oxxo) {
        display: none !important;
        visibility: hidden !important;
    }
    
    /* Show the printable ticket container */
    #printable-ticket, #printable-oxxo {
        display: block !important;
        visibility: visible !important;
        width: 100% !important;
        max-width: 480px !important;
        margin: 0 auto !important;
        padding: 10px !important;
    }
    
    #printable-ticket *, #printable-oxxo * {
        visibility: visible !important;
    }

    .ticket-container {
        border: 1px solid #e1e8ed !important;
        box-shadow: none !important;
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
    }
    
    /* Force background colors and icons to print */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}