/* checkout-modern.css — Modern checkout UI matching homepage design language
   Activated via ?newui=1 query param. Scoped under body.newui */

/* ===== RESET & BASE ===== */
body.newui {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #0E1627;
    background: #fff;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
    font-size: 15px;
}

body.newui * {
    box-sizing: border-box;
}

body.newui a {
    color: #003CC7;
    text-decoration: none;
}

body.newui a:hover {
    color: #002E9C;
    text-decoration: underline;
}

/* ===== PAGE HEADER ===== */
body.newui #page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 30px;
    border-bottom: 1px solid #D6D9DB;
    background: #fff;
}

body.newui #page-header img.checkout-logo {
    height: 38px;
    width: auto;
    margin: 0 !important;
}

body.newui #page-header ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 24px;
}

body.newui #page-header ul li {
    font-size: 13px;
    color: #999;
    float: none;
}

body.newui #page-header ul li a {
    color: #757575;
    text-decoration: none;
    font-weight: 400;
}

body.newui #page-header ul li a:hover {
    color: #0E1627;
}

/* ===== PROGRESS STEPPER ===== */
body.newui #checkout_progress {
    background: #fff;
    border-bottom: 1px solid #E8E8E8;
    padding: 0;
}

body.newui .newui-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 30px;
    max-width: 720px;
    margin: 0 auto;
    gap: 0;
}

body.newui .newui-step {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none !important;
    white-space: nowrap;
}

body.newui .newui-step-number {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
    transition: all 0.2s;
}

body.newui .newui-step-label {
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

/* Step states */
body.newui .newui-step--completed .newui-step-number {
    background: #E2EFFF;
    color: #003CC7;
}

body.newui .newui-step--completed .newui-step-label {
    color: #757575;
}

body.newui a.newui-step--completed:hover .newui-step-label {
    text-decoration: underline;
}

body.newui .newui-step--active .newui-step-number {
    background: #fff;
    color: #003CC7;
    border: 2px solid #003CC7;
}

body.newui .newui-step--active .newui-step-label {
    color: #0D2762;
    font-weight: 600;
}

body.newui .newui-step--upcoming .newui-step-number {
    background: #F8F9FA;
    color: #757575;
    border: 1.5px solid #D6D9DB;
}

body.newui .newui-step--upcoming .newui-step-label {
    color: #757575;
}

/* Connector line between steps */
body.newui .newui-step-connector {
    flex: 1;
    height: 2px;
    background: #D6D9DB;
    margin: 0 16px;
    min-width: 20px;
}

body.newui .newui-step-connector--done {
    background: #003CC7;
}

/* ===== CONTAINER & LAYOUT ===== */
body.newui .newui-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 32px 30px 60px;
}

body.newui .newui-layout {
    display: flex;
    gap: 48px;
    align-items: flex-start;
}

body.newui .newui-main {
    flex: 1;
    min-width: 0;
}

body.newui .newui-sidebar {
    width: 300px;
    flex-shrink: 0;
    background: #F8F9FA;
    border: 1px solid #D6D9DB;
    border-radius: 12px;
    padding: 24px;
    position: sticky;
    top: 24px;
}

/* ===== TYPOGRAPHY ===== */
body.newui h1.newui-title {
    font-family: 'Roboto Slab', serif;
    font-size: 28px;
    font-weight: 800;
    color: #0D2762;
    margin: 0 0 6px;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

body.newui .newui-subtitle {
    font-size: 15px;
    color: #757575;
    margin: 0 0 28px;
}

body.newui h2.newui-section-title {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #0D2762;
    margin: 32px 0 16px;
}

body.newui h2.newui-section-title:first-of-type {
    margin-top: 24px;
}

/* ===== FORM ELEMENTS ===== */
body.newui .newui-form-group {
    margin-bottom: 20px;
}

body.newui .newui-form-row {
    display: flex;
    gap: 16px;
}

body.newui .newui-form-row > .newui-form-group {
    flex: 1;
}

body.newui .newui-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #0D2762;
    margin-bottom: 6px;
}

body.newui .newui-label-hint {
    color: #757575;
    font-weight: 400;
}

body.newui .newui-input,
body.newui .newui-select {
    width: 100%;
    padding: 11px 14px;
    font-size: 16px; /* 16px minimum: smaller sizes trigger iOS Safari auto-zoom on focus */
    font-family: 'Inter', sans-serif;
    color: #0E1627;
    background: #fff;
    border: 1px solid #D6D9DB;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
}

body.newui .newui-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23757575' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

body.newui .newui-input:focus,
body.newui .newui-select:focus {
    border-color: #003CC7;
    box-shadow: 0 0 0 3px rgba(0, 60, 199, 0.1);
}

body.newui .newui-input::placeholder {
    color: #AAA;
}

body.newui .newui-textarea {
    width: 100%;
    padding: 11px 14px;
    font-size: 16px; /* 16px minimum: smaller sizes trigger iOS Safari auto-zoom on focus */
    font-family: 'Inter', sans-serif;
    color: #0E1627;
    background: #fff;
    border: 1px solid #D6D9DB;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    resize: vertical;
    min-height: 80px;
}

body.newui .newui-textarea:focus {
    border-color: #003CC7;
    box-shadow: 0 0 0 3px rgba(0, 60, 199, 0.1);
}

/* ===== BUTTONS ===== */
body.newui .newui-btn-primary {
    display: inline-block;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    color: #fff;
    background: #003CC7;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    text-decoration: none !important;
    text-align: center;
    transition: background-color 0.2s;
    line-height: 1.2;
    -webkit-appearance: none;
}

body.newui .newui-btn-primary:hover {
    background: #002E9C;
    color: #fff;
}

body.newui .newui-btn-primary:active {
    background: #00257A;
}

body.newui .newui-btn-secondary {
    display: inline-block;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    color: #0D2762;
    background: #fff;
    border: 1px solid #D6D9DB;
    border-radius: 100px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s;
}

body.newui .newui-btn-secondary:hover {
    border-color: #0D2762;
    background: #F8F9FA;
}

body.newui .newui-link {
    color: #003CC7;
    text-decoration: none;
    font-weight: 500;
}

body.newui .newui-link:hover {
    color: #002E9C;
    text-decoration: underline;
}

/* ===== RADIO OPTIONS (Delivery, Dimensions) ===== */
body.newui .newui-radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

body.newui .newui-radio-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1.5px solid #D6D9DB;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

body.newui .newui-radio-option:hover {
    border-color: #003CC7;
    background: rgba(0, 60, 199, 0.02);
}

body.newui .newui-radio-option input[type="radio"] {
    accent-color: #003CC7;
    width: 18px;
    height: 18px;
    margin: 0;
    flex-shrink: 0;
}

body.newui .newui-radio-option input[type="radio"]:checked {
    accent-color: #003CC7;
}

body.newui .newui-radio-option--selected,
body.newui .newui-radio-option:has(input:checked) {
    border-color: #003CC7;
    background: rgba(0, 60, 199, 0.03);
}

body.newui .newui-radio-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

body.newui .newui-radio-label {
    font-size: 15px;
    color: #0E1627;
    font-weight: 500;
}

body.newui .newui-radio-detail {
    font-size: 14px;
    color: #757575;
    white-space: nowrap;
}

body.newui .newui-radio-badge {
    display: inline-block;
    background: #E2EFFF;
    color: #003CC7;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 100px;
    margin-left: 8px;
}

/* ===== CHECKBOX ===== */
body.newui .newui-checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #0E1627;
    margin: 8px 0;
}

body.newui .newui-checkbox-row input[type="checkbox"] {
    accent-color: #003CC7;
    width: 16px;
    height: 16px;
    margin: 0;
    flex-shrink: 0;
}

/* ===== QUANTITY INPUTS (Summary) ===== */
body.newui .newui-product-card {
    background: #F8F9FA;
    border: 1px solid #D6D9DB;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

body.newui .newui-product-header {
    font-size: 15px;
    font-weight: 600;
    color: #0D2762;
    margin-bottom: 4px;
}

body.newui .newui-product-count {
    font-size: 13px;
    color: #757575;
    margin-bottom: 14px;
}

body.newui .newui-qty-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

body.newui .newui-qty-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

body.newui .newui-qty-label {
    font-size: 12px;
    font-weight: 600;
    color: #757575;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

body.newui .newui-qty-input {
    width: 48px;
    height: 40px;
    text-align: center;
    font-size: 16px; /* 16px minimum: smaller sizes trigger iOS Safari auto-zoom on focus */
    font-family: 'Inter', sans-serif;
    color: #0E1627;
    border: 1px solid #D6D9DB;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s;
    -webkit-appearance: none;
}

body.newui .newui-qty-input:focus {
    border-color: #003CC7;
    box-shadow: 0 0 0 3px rgba(0, 60, 199, 0.1);
}

/* Hide Print & Design section on desktop (shown in sidebar) */
body.newui .newui-print-design-mobile {
    display: none;
}

/* ===== DESIGN PREVIEWS ===== */
body.newui .newui-design-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

body.newui .newui-design-grid img {
    border: 1px solid #E8E8E8;
    border-radius: 8px;
    max-width: 170px;
}

body.newui .newui-design-label {
    font-size: 13px;
    color: #757575;
    margin-bottom: 4px;
}

/* ===== PRICING ===== */
body.newui .newui-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 14px;
}

body.newui .newui-price-label {
    color: #757575;
}

body.newui .newui-price-value {
    font-weight: 500;
    color: #0E1627;
}

body.newui .newui-price-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0 0;
    margin-top: 8px;
    border-top: 1px solid #D6D9DB;
}

body.newui .newui-price-total .newui-price-label {
    font-size: 16px;
    font-weight: 700;
    color: #0D2762;
}

body.newui .newui-price-total .newui-price-value {
    font-size: 22px;
    font-weight: 700;
    color: #0D2762;
}

/* ===== SIDEBAR ===== */
body.newui .newui-sidebar h3 {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #0D2762;
    margin: 0 0 16px;
}

body.newui .newui-sidebar-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 16px;
}

body.newui .newui-sidebar-images img {
    width: 100%;
    border: 1px solid #E8E8E8;
    border-radius: 6px;
    display: block;
}

body.newui .newui-sidebar-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 5px 0;
    color: #757575;
}

body.newui .newui-sidebar-row strong {
    color: #0E1627;
    font-weight: 600;
}

body.newui .newui-sidebar-divider {
    height: 1px;
    background: #D6D9DB;
    margin: 10px 0;
}

/* ===== COLOR PICKER (Instructions) ===== */
body.newui .newui-color-columns {
    display: flex;
    gap: 32px;
    margin-bottom: 16px;
}

body.newui .newui-color-column {
    flex: 1;
}

body.newui .newui-color-column-title {
    font-size: 14px;
    font-weight: 600;
    color: #0D2762;
    margin-bottom: 10px;
}

body.newui .newui-color-swatch {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
}

body.newui .newui-color-box {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid #D6D9DB;
    flex-shrink: 0;
}

body.newui .newui-color-name {
    font-size: 14px;
    color: #0E1627;
    flex: 1;
}

body.newui .newui-color-delete {
    font-size: 12px;
    color: #AAA;
    text-decoration: none;
}

body.newui .newui-color-delete:hover {
    color: #e74c3c;
    text-decoration: none;
}

body.newui .newui-color-add {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

body.newui .newui-color-add select {
    flex: 1;
}

/* ===== ALERTS & MESSAGES ===== */
body.newui .newui-error {
    color: #e74c3c;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 8px;
}

body.newui .newui-info-box {
    background: #F0F4FF;
    border: 1px solid #B8CCFF;
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 14px;
    color: #0D2762;
    margin: 12px 0;
}

body.newui .newui-warning-box {
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 14px;
    color: #92400E;
    margin: 16px 0;
}

/* ===== COUPON ===== */
body.newui .newui-coupon-trigger {
    font-size: 14px;
    color: #003CC7;
    cursor: pointer;
    margin-top: 8px;
    display: inline-block;
}

body.newui .newui-coupon-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

body.newui .newui-coupon-row input[type="text"] {
    flex: 1;
    padding: 10px 14px;
    font-size: 16px; /* 16px minimum: smaller sizes trigger iOS Safari auto-zoom on focus */
    font-family: 'Inter', sans-serif;
    border: 1px solid #D6D9DB;
    border-radius: 8px;
    outline: none;
}

body.newui .newui-coupon-row input[type="text"]:focus {
    border-color: #003CC7;
}

body.newui .newui-coupon-row input[type="submit"] {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    color: #0D2762;
    background: #F8F9FA;
    border: 1px solid #D6D9DB;
    border-radius: 8px;
    cursor: pointer;
}

body.newui .newui-coupon-row input[type="submit"]:hover {
    background: #ECEDEF;
}

/* ===== COMPLETION PAGE ===== */
body.newui .newui-success-banner {
    text-align: center;
    padding: 40px 0 30px;
}

body.newui .newui-success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #003CC7;
    color: #fff;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

body.newui .newui-success-banner h1 {
    font-family: 'Roboto Slab', serif;
    font-size: 28px;
    font-weight: 800;
    color: #0D2762;
    margin: 0 0 8px;
}

body.newui .newui-success-banner p {
    font-size: 15px;
    color: #757575;
    margin: 0 0 4px;
}

body.newui .newui-card {
    background: #F8F9FA;
    border: 1px solid #D6D9DB;
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 20px;
}

body.newui .newui-card h2 {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #0D2762;
    margin: 0 0 20px;
    border: none;
    padding: 0;
}

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

body.newui .newui-timeline-step {
    flex: 1;
    text-align: center;
}

body.newui .newui-timeline-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    line-height: 36px;
    margin: 0 auto 10px;
    background: #D6D9DB;
}

body.newui .newui-timeline-dot--active {
    background: #003CC7;
}

body.newui .newui-timeline-label {
    font-size: 13px;
    font-weight: 600;
    color: #0D2762;
}

body.newui .newui-timeline-sublabel {
    font-size: 12px;
    color: #757575;
    margin-top: 2px;
}

body.newui .newui-order-detail {
    display: flex;
    gap: 30px;
}

body.newui .newui-order-images {
    flex-shrink: 0;
}

body.newui .newui-order-info {
    flex: 1;
}

body.newui .newui-order-info table {
    width: 100%;
    font-size: 14px;
}

body.newui .newui-order-info td {
    padding: 4px 0;
}

body.newui .newui-order-info td:first-child {
    color: #757575;
}

body.newui .newui-order-info td:last-child {
    text-align: right;
    color: #0E1627;
}

body.newui .newui-quick-links {
    display: flex;
}

body.newui .newui-quick-link {
    flex: 1;
    text-align: center;
    padding: 8px 12px;
}

body.newui .newui-quick-link + .newui-quick-link {
    border-left: 1px solid #D6D9DB;
}

body.newui .newui-quick-link a {
    font-size: 14px;
    font-weight: 600;
    color: #003CC7;
}

body.newui .newui-quick-link .newui-quick-sub {
    font-size: 12px;
    color: #757575;
    margin-top: 2px;
}

/* ===== PAYMENT PAGE ===== */
body.newui .newui-stripe-container {
    margin-top: 24px;
    max-width: 500px;
}

body.newui .newui-agreement {
    margin: 20px 0;
    font-size: 14px;
    color: #757575;
}

body.newui .newui-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
    color: #757575;
    font-size: 15px;
}

body.newui .newui-trust-signals {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
    padding: 14px 16px;
    background: #F8F9FA;
    border-radius: 8px;
    font-size: 13px;
    color: #757575;
}

body.newui .newui-trust-signals svg {
    flex-shrink: 0;
}

/* ===== REFERRAL CARD (Completion) ===== */
body.newui .newui-referral-card {
    background: #F0F4FF;
    border: 1px solid #B8CCFF;
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 20px;
}

body.newui .newui-referral-card h2 {
    color: #0D2762;
    margin: 0 0 8px;
    border: none;
    padding: 0;
}

body.newui .newui-referral-input-row {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

body.newui .newui-referral-input-row input {
    flex: 1;
    background: #fff;
    border: 1px solid #D6D9DB;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    font-family: monospace;
    color: #0E1627;
}

body.newui .newui-referral-input-row button {
    background: #003CC7;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

body.newui .newui-referral-input-row button:hover {
    background: #002E9C;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    body.newui #olark-wrapper,
    body.newui #habla_window_div,
    body.newui #habla_beta_container_do_not_rely_on_div_id {
        display: none !important;
    }

    body.newui .newui-stepper {
        padding: 16px;
    }

    body.newui .newui-step-label {
        display: none;
    }

    body.newui .newui-step-connector {
        min-width: 12px;
        margin: 0 6px;
    }

    body.newui .newui-container {
        padding: 20px 16px 40px;
    }

    body.newui .newui-layout {
        flex-direction: column;
        gap: 24px;
    }

    body.newui .newui-sidebar {
        display: none;
    }

    body.newui .newui-print-design-mobile {
        display: block;
    }

    body.newui .newui-main {
        width: 100%;
    }

    body.newui .newui-form-row {
        flex-direction: column;
        gap: 0;
    }

    body.newui .newui-form-row--inline {
        flex-direction: row;
        gap: 12px;
    }

    body.newui h1.newui-title {
        font-size: 24px;
    }

    body.newui .newui-btn-primary {
        width: 100%;
        padding: 16px;
    }

    body.newui .newui-color-columns {
        flex-direction: column;
        gap: 20px;
    }

    body.newui .newui-price-total .newui-price-value {
        font-size: 20px;
    }

    body.newui #page-header {
        padding: 12px 16px;
    }

    body.newui #page-header img.checkout-logo {
        height: 32px;
    }

    body.newui .newui-order-detail {
        flex-direction: column;
    }

    body.newui .newui-timeline {
        flex-direction: column;
        gap: 12px;
    }

    body.newui .newui-timeline-step {
        display: flex;
        align-items: center;
        gap: 12px;
        text-align: left;
    }

    body.newui .newui-timeline-dot {
        margin: 0;
        flex-shrink: 0;
    }

    body.newui .newui-quick-links {
        flex-direction: column;
    }

    body.newui .newui-quick-link + .newui-quick-link {
        border-left: none;
        border-top: 1px solid #D6D9DB;
    }
}

@media (max-width: 480px) {
    body.newui .newui-step-number {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    body.newui .newui-qty-grid {
        gap: 6px;
    }

    body.newui .newui-qty-input {
        width: 42px;
        height: 36px;
        font-size: 13px;
    }

    body.newui .newui-success-banner h1 {
        font-size: 24px;
    }
}
