@import './reset.css';

* {
    box-sizing: border-box;
}

/* Default step visibility — info active, delivery & payment pending */
#code_block_info_step_pending,
#code_block_info_step_complete,
#code_block_delivery_step_active,
#code_block_delivery_step_complete,
#code_block_payment_step_active {
    display: none;
}

html {
    width: 100%;
}

body {
    background: #eeeae6;
    color: #1a1a1a;
    font-family: "Signika Negative", serif;
    font-size: calc(15px + 0.390625vw);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

@media (min-width: 768px) {
    body {
        font-size: 16px;
    }
}

/* ── Header ── */

header {
    width: 100%;
    z-index: 60;
    background: #1a1a1a;
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    font-family: "Afacad", sans-serif;
}

.header-content {
    display: flex;
    margin: 0 auto;
    max-width: 1200px;
    padding: 20px 40px;
    justify-content: center;
    align-items: center;
}

.header-content a {
    color: #fff;
    text-decoration: none;
}

.header-content a:hover {
    color: #f58a00;
}

/* ── Breadcrumb stepper ── */

.checkout-stepper {
    background: #1a1a1a;
    border-bottom: 1px solid #333;
    padding: 0 40px 18px;
}

.checkout-stepper-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    max-width: 600px;
    margin: 0 auto;
}

.checkout-step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: #666;
    transition: color 0.2s;
}

.checkout-step.active {
    color: #fff;
}

.checkout-step.complete {
    color: #aaa;
}

.checkout-step-number {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid #444;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s;
}

.checkout-step.active .checkout-step-number {
    border-color: #fff;
    background: #fff;
    color: #1a1a1a;
}

.checkout-step.complete .checkout-step-number {
    border-color: #aaa;
    background: none;
    color: #aaa;
}

.checkout-step-divider {
    width: 40px;
    height: 1px;
    background: #444;
}

/* ── Breadcrumb ── */

.checkout-breadcrumb {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px 36px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #999;
}

.checkout-breadcrumb a {
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 600;
}

.checkout-breadcrumb a:hover {
    text-decoration: underline;
}

.checkout-breadcrumb .bc-current {
    color: #1a1a1a;
    font-weight: 600;
}

.checkout-breadcrumb .bc-sep {
    color: #bbb;
}

.checkout-breadcrumb .bc-future {
    color: #bbb;
}

/* ── Main layout ── */

main {
    flex: 1;
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
    padding: 32px 36px;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
    align-items: start;
}

/* ── Cards ── */

.checkout-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    padding: 30px;
    margin-bottom: 24px;
}

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

.checkout-card h2 {
    font-size: 0.92rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 20px 0;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkout-card h2.pending {
    color: #bbb;
}

.checkout-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #1a1a1a;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.checkout-badge.done {
    background: #2d8a4e;
}

.checkout-badge.done svg {
    width: 13px;
    height: 13px;
}

.checkout-badge.pending {
    background: #ccc;
    color: #888;
}

.checkout-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.checkout-card-header h2 {
    margin-bottom: 0;
}

.checkout-card-edit {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #888;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    border: 1px solid #ddd;
    padding: 5px 14px;
    border-radius: 4px;
    white-space: nowrap;
    transition: all 0.15s;
}

.checkout-card-edit:hover {
    border-color: #999;
    color: #333;
}

/* ── Tabs (pill-style) ── */

.checkout-tabs {
    display: flex;
    gap: 0;
    background: #f0ece8;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 20px;
}

.checkout-tab {
    flex: 1;
    padding: 10px 16px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 500;
    color: #666;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    background: none;
    font-family: inherit;
}

.checkout-tab:hover {
    color: #1a1a1a;
}

.checkout-tab.active {
    background: #fff;
    color: #1a1a1a;
    font-weight: 700;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.checkout-tab-price {
    display: block;
    font-size: 0.72rem;
    font-weight: 400;
    color: #aaa;
    margin-top: 2px;
}

.checkout-tab.active .checkout-tab-price {
    color: #666;
}

.checkout-tab.disabled {
    opacity: 0.35;
    pointer-events: none;
    cursor: default;
}

.checkout-tab-content {
    display: none;
}

.checkout-tab-content.active {
    display: block;
}

.checkout-tab-box {
    margin-top: 18px;
    padding: 18px 20px;
    background: #f9f7f5;
    border-radius: 8px;
    font-size: 0.88rem;
    line-height: 1.6;
    color: #555;
}

.checkout-tab-box strong {
    color: #1a1a1a;
    font-weight: 900;
}

.checkout-tab-box-sub {
    font-size: 0.8rem;
    color: #999;
    margin-top: 8px;
}

/* ── Payment tiles ── */

.checkout-tiles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.checkout-tile {
    border: 2px solid #e5e1dd;
    border-radius: 10px;
    padding: 18px 14px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}

.checkout-tile:hover {
    border-color: #ccc;
}

.checkout-tile.active {
    border-color: #1a1a1a;
    background: #faf8f6;
}

.checkout-tile.disabled {
    opacity: 0.35;
    pointer-events: none;
    cursor: default;
}

.checkout-tile-icon {
    width: 28px;
    height: 28px;
    margin: 0 auto 8px;
}

.checkout-tile-icon svg {
    width: 100%;
    height: 100%;
}

.checkout-tile-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: #1a1a1a;
}

.checkout-tile-sub {
    font-size: 0.7rem;
    color: #888;
    margin-top: 2px;
}

/* ── Form inputs (floating label) ── */

.checkout-field {
    position: relative;
    margin-bottom: 14px;
}

.checkout-field label {
    position: relative;
    display: block;
}

.checkout-field input {
    width: 100%;
    padding: 18px 14px 6px;
    font-size: 0.9rem;
    font-family: inherit;
    border: 2px solid #e5e1dd;
    border-radius: 8px;
    background: #fff;
    color: #1a1a1a;
    outline: none;
    transition: border-color 0.2s;
}

.checkout-field input:focus {
    border-color: #1a1a1a;
}

.checkout-field input.alert {
    border-color: #c44;
}

.checkout-field span {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    font-size: 0.9rem;
    color: #999;
    pointer-events: none;
    transition: all 0.2s;
}

.checkout-field input:focus + span,
.checkout-field input:not(:placeholder-shown) + span {
    top: 10px;
    transform: none;
    font-size: 0.65rem;
    color: #888;
}

.checkout-field-row {
    display: flex;
    gap: 12px;
}

.checkout-field-row .checkout-field {
    flex: 1;
}

.checkout-field-row .checkout-field.small {
    flex: 0 0 35%;
}

/* ── Buttons ── */

.checkout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.checkout-btn-primary {
    background: #1a1a1a;
    color: #fff;
}

.checkout-btn-primary:hover {
    background: #333;
}

.checkout-btn-primary:disabled {
    background: #999;
    cursor: not-allowed;
}

.checkout-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
}

.checkout-row-right {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}

.checkout-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #1a1a1a;
    text-decoration: none;
    font-size: 0.85rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.checkout-link:hover {
    opacity: 1;
}

.checkout-link svg {
    width: 14px;
    height: 14px;
    fill: #1a1a1a;
}

/* ── Info chips (completed step summary) ── */

.checkout-info-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.checkout-info-chip {
    background: #f7f5f3;
    border-radius: 8px;
    padding: 10px 16px;
    flex: 1;
    min-width: 140px;
    overflow: hidden;
}

.checkout-info-chip-label {
    font-size: 0.65rem;
    color: #888;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.checkout-info-chip-value {
    font-size: 0.85rem;
    color: #1a1a1a;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Alert / output ── */

.checkout-alert {
    background: #fdf2f1;
    color: #944;
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 0.84rem;
    line-height: 1.5;
    margin-top: 10px;
}

.checkout-alert:empty {
    display: none;
}

#code_block_account_password { display: none; }
#code_block_account_password_code { display: none; }
#code_block_account_password_reset { display: none; }
#code_block_account_signup_code { display: none; }

/* ── Sub-section headings (password reset, signup confirmation) ── */

.checkout-subsection {
    background: #f9f7f5;
    border-radius: 8px;
    padding: 18px 20px;
    margin-bottom: 18px;
    line-height: 1.6;
}

.checkout-subsection h3 {
    font-size: 0.88rem;
    font-weight: 700;
    color: #555;
    margin: 0 0 8px 0;
}

.checkout-subsection p {
    font-size: 0.8rem;
    color: #999;
    margin: 0;
    line-height: 1.6;
}

.checkout-info-box {
    background: #f7f5f3;
    border-radius: 8px;
    padding: 14px 18px;
    font-size: 0.85rem;
    color: #555;
    margin-top: 10px;
}

.checkout-info-box a {
    color: #1a1a1a;
    font-weight: 500;
}

/* ── Type toggle (company/private) ── */

.checkout-type-toggle {
    display: flex;
    background: #f0ece8;
    border-radius: 6px;
    padding: 3px;
    margin-bottom: 18px;
    width: fit-content;
}

.checkout-type-toggle-btn {
    padding: 6px 16px;
    font-size: 0.78rem;
    font-weight: 500;
    color: #888;
    border-radius: 5px;
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    transition: all 0.15s;
}

.checkout-type-toggle-btn.active {
    background: #fff;
    color: #1a1a1a;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* ── Summary sidebar ── */

.checkout-summary {
    position: sticky;
    top: 30px;
    background: #1a1a1a;
    color: #fff;
    border-radius: 10px;
    padding: 28px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.checkout-summary h3 {
    font-size: 0.92rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 18px 0;
    color: #fff;
}

.checkout-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 0;
    font-size: 0.8rem;
}

.checkout-summary-item + .checkout-summary-item {
    border-top: 1px solid #333;
}



.checkout-summary-item-name {
    color: #ccc;
    flex: 1;
}

.checkout-summary-item-name a {
    color: #ccc;
    text-decoration: none;
}

.checkout-summary-item-name a:hover {
    color: #fff;
}

.checkout-summary-item-detail {
    color: #888;
    font-size: 0.7rem;
}

.checkout-summary-item-qty {
    color: #888;
    margin: 0 12px;
    white-space: nowrap;
}

.checkout-summary-item-price {
    color: #fff;
    white-space: nowrap;
    font-weight: 500;
}

.checkout-summary-fee {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #333;
    padding: 8px 0;
    font-size: 0.8rem;
    color: #999;
}

.checkout-summary-fee-label {
    color: #888;
}

.checkout-summary-fee-price {
    color: #ccc;
}

.checkout-summary-total {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #333;
    padding: 12px 0 4px;
    font-size: 1rem;
    font-weight: 600;
}

.checkout-summary-total-label {
    color: #fff;
}

.checkout-summary-total-price {
    color: #fff;
}

.checkout-summary-vat {
    text-align: right;
    font-size: 0.7rem;
    color: #666;
    margin-bottom: 16px;
}

.checkout-summary-secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.checkout-summary-secure svg {
    width: 12px;
    height: 12px;
    stroke: rgba(255, 255, 255, 0.6);
    fill: none;
}

/* ── Stripe form area ── */

.checkout-payment-content {
    margin-top: 4px;
    padding: 20px;
    background: #faf8f6;
    border-radius: 10px;
}

.checkout-payment-content .checkout-stripe-wrapper,
.checkout-payment-content .checkout-tab-box {
    margin-top: 0;
}

.checkout-stripe-wrapper {
    margin-top: 16px;
}

#payment-element {
    margin-bottom: 16px;
}

.button_stripe {
    width: 100%;
    padding: 14px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
}

.button_stripe:hover {
    background: #333;
}

.button_stripe:disabled {
    background: #999;
    cursor: not-allowed;
}

.code_stripe_payment_text {
    font-size: 0.75rem;
    color: #888;
    text-align: center;
    margin-top: 10px;
}

.code_stripe_payment_text a {
    color: #1a1a1a;
    font-weight: 500;
}

.checkout-tab-box .code_local_payment_button {
    margin-top: 16px;
}

.code_local_payment_button {
    width: 100%;
    padding: 14px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-align: center;
    transition: background 0.2s;
}

.code_local_payment_button:hover {
    background: #333;
}

#payment-message {
    background: #fdf2f1;
    color: #944;
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 0.84rem;
    line-height: 1.5;
    margin-top: 10px;
}

#payment-message:empty {
    padding: 0;
    background: none;
}

.hidden {
    display: none !important;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── Delivery complete text ── */

.checkout-delivery-summary {
    font-size: 0.85rem;
    line-height: 1.6;
    color: #555;
}

.checkout-delivery-summary p {
    margin: 0;
}

.checkout-delivery-title {
    font-weight: 600;
    margin-bottom: 8px !important;
}

.checkout-delivery-highlight {
    font-weight: 900;
    color: #1a1a1a;
}

.checkout-delivery-detail {
    font-size: 0.8rem;
    color: #999;
    line-height: 1.7;
}

/* ── Mobile summary toggle ── */

.checkout-summary-toggle {
    display: none;
}

/* ── Footer ── */

footer {
    margin-top: auto;
    max-width: 100%;
    min-height: 40px;
    background-color: #1a1a1a;
    border-top: 1px solid #333;
    align-content: center;
    text-align: center;
    font-size: 0.75rem;
    color: #666;
}

footer > div {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

footer a {
    color: #888;
    text-decoration: none;
}

footer a:hover {
    color: #bbb;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 20px 20px 0;
}

/* ── Responsive ── */

@media (max-width: 900px) {
    main {
        max-width: 600px;
        padding: 16px;
    }

    .checkout-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .checkout-summary-column {
        order: -1;
    }

    .checkout-summary {
        position: static;
        margin-bottom: 0;
    }

    .checkout-summary-body {
        display: none;
    }

    .checkout-summary-body.open {
        display: block;
    }

    .checkout-summary-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        cursor: pointer;
        padding: 4px 0;
        margin-bottom: 4px;
    }

    .checkout-summary-toggle-text {
        font-size: 0.72rem;
        color: rgba(255, 255, 255, 0.45);
        text-transform: uppercase;
    }

    .checkout-summary-toggle svg {
        width: 16px;
        height: 16px;
        fill: #888;
        transition: transform 0.2s;
    }

    .checkout-summary-toggle.open svg {
        transform: rotate(180deg);
    }

    .checkout-summary-total-mobile {
        display: flex;
        justify-content: space-between;
        font-size: 1.1rem;
        font-weight: 700;
        margin-top: 4px;
    }

    .checkout-breadcrumb {
        padding: 14px 16px 0;
    }

    .header-content {
        padding: 14px 16px;
    }

    .checkout-card {
        padding: 22px;
    }
}

/* ── Info block (pickup-only warning) ── */

.checkout-info-block {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #fff8f0;
    border: 1px solid #f0dcc8;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 18px;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #6b4f2e;
}

.checkout-info-block-icon {
    flex-shrink: 0;
    margin-top: 1px;
    opacity: 0.8;
}

.checkout-info-block-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.checkout-info-block-text strong {
    color: #4a3520;
}

.checkout-info-block-text span {
    opacity: 0.8;
    font-size: 0.78rem;
}
