@import "homepage.css";
@import "dashboard.css";
@import "utilities.css";
@import "footer.css";
@import "story.css";
@import "stories.css";
@import "nfsystem.css";
@import "navbar.css";

:root {
    --ui-bg: #f6f8fb;
    --ui-surface: #ffffff;
    --ui-text: #1f2937;
    --ui-text-muted: #6b7280;
    --ui-border: rgba(31, 41, 55, .12);
    --ui-brand: #ff8a00;
    --ui-brand-soft: #fff4e6;
    --ui-accent: #0f3c8a;
    --ui-success: #0f5132;
    --ui-radius-lg: 1rem;
}

html:not(.theme-initialized) body {
    transition: none !important;
}

html.js-initializing body {
    opacity: 0;
}

html.js-initializing body.visible {
    opacity: 1;
    transition: opacity 0.2s ease-in-out;
}

.soft-shadow {
    box-shadow: 0 6px 24px rgba(16, 24, 40, .06);
    border-radius: 1rem;
}

.empty-emoji {
    font-size: 1.5rem;
}

.filter-form select {
    min-width: 12rem;
}

.pagination .page-link {
    border-radius: 999px;
}

.bg-success-subtle {
    background-color: #d1f4e0;
}

.bg-primary-subtle {
    background-color: #dbeafe;
}

.bg-secondary-subtle {
    background-color: #e9ecef;
}

.text-success-emphasis {
    color: #0f5132;
}

.text-primary-emphasis {
    color: #0f3c8a;
}

.text-secondary-emphasis {
    color: #495057;
}

.ritual-card {
    background: rgba(13, 110, 253, .04);
}

.story-card {
    background: #fff;
}

.ritual-select {
    min-width: 220px;
}


.card-accent {
    position: relative;
    border-radius: .75rem;
    border: 1px solid rgba(0,0,0,.08);
}

.card-accent::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    border-radius: .75rem 0 0 .75rem;
    background: #dee2e6;
}

.card-accent--info::before {
    background: #0d6efd;
}
.card-accent--success::before {
    background: #198754;
}
.card-accent--warning::before {
    background: #ffc107;
}


.card-header-soft {
    background: rgba(0,0,0,.02);
    border-bottom: 1px solid rgba(0,0,0,.08);
    font-weight: 600;
}

.checkout-page {
    --checkout-accent: #ff8a00;
    --checkout-accent-soft: #fff3e6;
    animation: checkoutFadeIn .25s ease-out;
}

.checkout-lead {
    max-width: 720px;
}

.checkout-steps {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.checkout-step {
    border: 1px solid rgba(0, 0, 0, .14);
    border-radius: 999px;
    padding: .35rem .75rem;
    font-size: .85rem;
    color: #4b5563;
    background: #fff;
}

.checkout-step--active {
    background: linear-gradient(135deg, var(--checkout-accent-soft), #fff);
    border-color: rgba(255, 138, 0, .35);
    color: #7a4300;
    font-weight: 600;
}

.checkout-step--done {
    border-color: rgba(25, 135, 84, .4);
    color: #12633f;
    background: rgba(25, 135, 84, .08);
}

.checkout-time-badge {
    border-radius: 999px;
    background: #eff6ff;
    color: #0f3c8a;
    font-size: .85rem;
    font-weight: 600;
    padding: .3rem .75rem;
}

.checkout-upsell {
    background: linear-gradient(140deg, rgba(255, 138, 0, .06), rgba(255, 255, 255, .96));
}

.checkout-product-card {
    border: 1px solid rgba(15, 60, 138, .12);
    border-radius: .85rem;
    padding: .9rem;
    background: #fff;
}

.checkout-pill {
    display: inline-block;
    border-radius: 999px;
    padding: .2rem .65rem;
    font-size: .75rem;
    font-weight: 600;
}

.checkout-pill--story {
    background: #e8f0ff;
    color: #0f3c8a;
}

.checkout-pill--product {
    background: #e8f9ef;
    color: #0f5132;
}

.checkout-summary-card {
    position: sticky;
    top: 1rem;
}

.checkout-summary-list .list-group-item {
    border-color: rgba(0, 0, 0, .06);
}

.checkout-summary-title {
    font-weight: 600;
    color: var(--ui-text);
    line-height: 1.35;
}

.checkout-total {
    color: #0f5132;
    font-size: 1.15rem;
}

.checkout-payment-note {
    border: 1px solid rgba(15, 60, 138, .18);
    border-radius: .75rem;
    background: rgba(15, 60, 138, .04);
    padding: .7rem .8rem;
}

.checkout-trust-list {
    margin: 0;
    padding-left: 1.1rem;
    color: #374151;
    font-size: .92rem;
}

.checkout-trust-list li + li {
    margin-top: .4rem;
}

.checkout-empty-state {
    background: linear-gradient(155deg, rgba(15, 60, 138, .04), rgba(255, 255, 255, .98));
}

@media (max-width: 991.98px) {
    .checkout-summary-card {
        position: static;
    }
}

/* --- Checkout step separator --- */
.checkout-step-sep {
    color: #9ca3af;
    font-size: 1.1rem;
    align-self: center;
    line-height: 1;
    user-select: none;
}

/* --- Basket item rows (replaces table) --- */
.checkout-item-list {
    display: flex;
    flex-direction: column;
}

.checkout-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .7rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, .06);
}

.checkout-item-row:last-child {
    border-bottom: none;
}

.checkout-item-meta {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex: 1;
    min-width: 0;
}

.checkout-item-text {
    min-width: 0;
}

.checkout-item-title {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.checkout-item-qty {
    font-size: .85rem;
    color: #6b7280;
    white-space: nowrap;
    flex-shrink: 0;
}

.checkout-item-price {
    font-weight: 600;
    white-space: nowrap;
    color: #0f5132;
    flex-shrink: 0;
}

.checkout-item-breakdown {
    margin-top: .15rem;
}

/* --- Company fields / shipping fields toggle --- */
.checkout-collapsible {
    overflow: hidden;
    transition: max-height .28s ease, opacity .28s ease;
}

.checkout-collapsible.is-open {
    opacity: 1;
}

.checkout-collapsible:not(.is-open) {
    max-height: 0 !important;
    opacity: 0;
    pointer-events: none;
}

.checkout-form-state {
    min-height: 1.25rem;
}

.checkout-form-state.is-valid {
    color: #166534;
}

.checkout-form-state.is-invalid {
    color: #b91c1c;
}

/* --- Copy button --- */
.copy-btn {
    padding: .1rem .45rem;
    font-size: .75rem;
    line-height: 1.5;
    vertical-align: middle;
    transition: color .15s, border-color .15s;
}

.copy-btn.copied {
    border-color: #198754;
    color: #198754;
}

/* --- QR success card --- */
.checkout-qr-card {
    background: linear-gradient(155deg, rgba(13, 110, 253, .04), rgba(255, 255, 255, .98));
    border: 1px solid rgba(13, 110, 253, .15) !important;
}

.checkout-qr-img {
    max-width: 260px;
    width: 100%;
    height: auto;
    border-radius: .85rem;
    border: 2px solid rgba(0, 0, 0, .08);
    display: block;
    margin: 0 auto;
}

/* --- Pending payment details highlight --- */
.checkout-payment-details {
    background: rgba(13, 110, 253, .03);
    border: 1px solid rgba(13, 110, 253, .12);
    border-radius: .85rem;
    overflow: hidden;
}

.checkout-payment-details .list-group-item {
    background: transparent;
    border-color: rgba(13, 110, 253, .1);
    padding-left: .85rem;
    padding-right: .85rem;
}

.story-buy-btn {
    min-width: 220px;
}

.stories-library .story-card {
    transition: transform .18s ease, box-shadow .18s ease;
}

.stories-library .story-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(15, 23, 42, .09);
}

@keyframes checkoutFadeIn {
    from {
        opacity: .4;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 991.98px) {
    .story-buy-btn {
        min-width: 0;
    }
}

@media (max-width: 576px) {
    .checkout-item-row {
        align-items: flex-start;
    }

    .checkout-item-price {
        font-size: .95rem;
    }
}

/* =============================================
   BASKET — bk-* namespace
   ============================================= */

.bk-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #6b7280;
}

.bk-empty-icon {
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 1rem;
}

.bk-empty-state h2 {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.35rem;
    color: #111827;
    margin-bottom: .5rem;
}

.bk-empty-state p {
    font-size: .95rem;
    max-width: 340px;
    margin: 0 auto;
}

.bk-remove-btn {
    background: none;
    border: 1px solid transparent;
    border-radius: .5rem;
    color: #d1d5db;
    padding: .3rem .45rem;
    line-height: 1;
    font-size: 1rem;
    transition: color .15s, border-color .15s, background .15s;
    cursor: pointer;
}

.bk-remove-btn:hover {
    color: #ef4444;
    border-color: rgba(239, 68, 68, .2);
    background: rgba(239, 68, 68, .05);
}

.bk-qty-input {
    width: 72px !important;
}

.checkout-product-card--active {
    border-color: rgba(25, 135, 84, .3) !important;
    background: rgba(25, 135, 84, .03) !important;
}

.bk-product-added-badge {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    font-size: .72rem;
    font-weight: 700;
    color: #0f5132;
    background: rgba(25, 135, 84, .1);
    border-radius: 999px;
    padding: .15rem .6rem;
    margin-bottom: .5rem;
}

/* Upsell nudge (STATE B: 1 package in basket) */
.bk-upsell-nudge {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, rgba(255,138,0,.07), rgba(255,255,255,.97));
    border: 1.5px dashed rgba(255, 138, 0, .4);
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    flex-wrap: wrap;
}

.bk-upsell-nudge-icon {
    font-size: 1.75rem;
    line-height: 1;
    flex-shrink: 0;
}

.bk-upsell-nudge-body {
    flex: 1;
    min-width: 0;
}

.bk-upsell-nudge-title {
    font-weight: 700;
    font-size: .92rem;
    color: #111827;
    margin-bottom: .2rem;
}

.bk-upsell-nudge-sub {
    font-size: .78rem;
    color: #6b7280;
    line-height: 1.4;
}

.bk-upsell-nudge-btn {
    background: #ff8a00;
    color: #fff;
    border: none;
    border-radius: .625rem;
    font-weight: 700;
    font-size: .82rem;
    padding: .5rem 1rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
    flex-shrink: 0;
}

.bk-upsell-nudge-btn:hover {
    background: #e07a00;
}

/* Info o množstevní slevě */
.bk-discount-info {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .85rem 1rem;
    border-radius: .75rem;
    background: rgba(16, 185, 129, .08);
    border: 1px solid rgba(16, 185, 129, .25);
}

.bk-discount-info-icon {
    color: #059669;
    font-size: 1.1rem;
    line-height: 1.4;
    flex-shrink: 0;
}

.bk-discount-info-body {
    min-width: 0;
}

.bk-discount-info-title {
    font-weight: 700;
    font-size: .9rem;
    color: #065f46;
    margin-bottom: .15rem;
}

.bk-discount-info-sub {
    font-size: .8rem;
    color: #047857;
    line-height: 1.4;
}

/* Stepper množství u produktu */
.bk-qty-stepper {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-top: .25rem;
}

.bk-qty-btn {
    width: 1.6rem;
    height: 1.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, .15);
    border-radius: .45rem;
    background: #fff;
    color: #374151;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

.bk-qty-btn:hover:not(:disabled) {
    background: #f3f4f6;
    border-color: rgba(0, 0, 0, .3);
}

.bk-qty-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.bk-qty-value {
    min-width: 1.4rem;
    text-align: center;
    font-weight: 600;
    color: #111827;
}

.bk-qty-unit {
    color: #6b7280;
}

.bk-line-saving {
    margin-top: .25rem;
    font-size: .78rem;
    font-weight: 600;
    color: #059669;
}

.bk-trust-row {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding-top: .5rem;
    border-top: 1px solid rgba(0,0,0,.06);
}

.bk-trust-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .8rem;
    color: #6b7280;
}

.bk-trust-item i {
    font-size: .9rem;
    flex-shrink: 0;
}

/* =============================================
   CHECKOUT FORM — co-* namespace
   ============================================= */

.co-section-head {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: 1rem;
}

.co-section-icon {
    width: 2rem;
    height: 2rem;
    border-radius: .5rem;
    background: rgba(255, 138, 0, .1);
    color: #ff8a00;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
    flex-shrink: 0;
}

.co-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.co-payment-option {
    display: flex;
    align-items: flex-start;
    gap: .85rem;
    border: 2px solid #ff8a00;
    border-radius: .875rem;
    padding: 1rem;
    background: rgba(255, 138, 0, .04);
}

.co-payment-option-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: .625rem;
    background: rgba(255, 138, 0, .12);
    color: #ff8a00;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.co-payment-option-title {
    font-weight: 700;
    font-size: .95rem;
    color: #111827;
    margin-bottom: .2rem;
}

.co-payment-option-desc {
    font-size: .82rem;
    color: #6b7280;
    line-height: 1.5;
}

.co-payment-option-check {
    color: #22c55e;
    font-size: 1.15rem;
    flex-shrink: 0;
    margin-left: auto;
    margin-top: .15rem;
}

.co-summary-trust,
.co-trust-item {
    display: flex;
    flex-direction: column;
    gap: .45rem;
}

.co-trust-item {
    flex-direction: row;
    align-items: center;
    gap: .5rem;
    font-size: .8rem;
    color: #6b7280;
    padding-top: .5rem;
}

.co-trust-item:first-child {
    border-top: 1px solid rgba(0,0,0,.06);
    padding-top: .75rem;
    margin-top: .25rem;
}

.co-trust-item i {
    font-size: .85rem;
    flex-shrink: 0;
}

/* =============================================
   SUCCESS / ORDER CONFIRM — sv-* namespace
   ============================================= */

/* Status hero */
.sv-status-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem 1.5rem;
    border-radius: 1.25rem;
    margin-bottom: 1.5rem;
}

.sv-status-hero--paid {
    background: linear-gradient(135deg, rgba(34,197,94,.08), rgba(255,255,255,.97));
    border: 1px solid rgba(34,197,94,.2);
}

.sv-status-hero--pending {
    background: linear-gradient(135deg, rgba(255,138,0,.08), rgba(255,255,255,.97));
    border: 1px solid rgba(255,138,0,.18);
}

.sv-status-hero--cancelled {
    background: #f9fafb;
    border: 1px solid rgba(0,0,0,.08);
}

.sv-status-icon {
    font-size: 2.75rem;
    line-height: 1;
    margin-bottom: .75rem;
}

.sv-status-hero--paid .sv-status-icon { color: #22c55e; }
.sv-status-hero--pending .sv-status-icon { color: #ff8a00; }
.sv-status-hero--cancelled .sv-status-icon { color: #9ca3af; }

.sv-status-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: clamp(1.35rem, 3vw, 1.85rem);
    font-weight: 800;
    color: #111827;
    letter-spacing: -.02em;
    margin-bottom: .5rem;
}

.sv-status-sub {
    font-size: .95rem;
    color: #6b7280;
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Order meta strip */
.sv-order-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(0,0,0,.07);
}

.sv-order-meta-item {
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

.sv-order-meta-label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #9ca3af;
}

.sv-order-meta-value {
    font-size: .95rem;
    font-weight: 600;
    color: #111827;
}

/* Status badges */
.sv-status-badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    border-radius: 999px;
    padding: .15rem .65rem;
    font-size: .8rem;
    font-weight: 700;
}

.sv-status-badge--paid { background: rgba(34,197,94,.1); color: #14532d; }
.sv-status-badge--pending_payment { background: rgba(255,138,0,.1); color: #7a4300; }
.sv-status-badge--cancelled { background: #f3f4f6; color: #6b7280; }

/* Block title */
.sv-block-title {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #9ca3af;
    margin-bottom: .85rem;
}

/* Activation codes */
.sv-codes-list {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin-bottom: 1rem;
}

.sv-code-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    background: #f9fafb;
    border: 1px solid rgba(0,0,0,.07);
    border-radius: .75rem;
    padding: .75rem 1rem;
    flex-wrap: wrap;
}

.sv-code-value {
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    letter-spacing: .08em;
}

.sv-code-story {
    margin-top: .15rem;
}

.sv-code-badge {
    font-size: .72rem;
    font-weight: 700;
    border-radius: 999px;
    padding: .2rem .65rem;
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    white-space: nowrap;
}

.sv-code-badge--ready { background: rgba(255,138,0,.1); color: #7a4300; }
.sv-code-badge--redeemed { background: rgba(34,197,94,.1); color: #14532d; }

/* Payment details rows */
.sv-payment-details {
    background: rgba(255,138,0,.04);
    border: 1px solid rgba(255,138,0,.15);
    border-radius: .875rem;
    padding: 1rem;
    margin-bottom: 1.25rem;
}

.sv-payment-rows {
    display: flex;
    flex-direction: column;
    gap: .65rem;
}

.sv-payment-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}

.sv-payment-label {
    font-size: .78rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: .05em;
    white-space: nowrap;
}

.sv-payment-value {
    font-weight: 600;
    color: #111827;
    word-break: break-all;
}

/* QR card */
.sv-qr-card {
    background: linear-gradient(160deg, rgba(255,138,0,.04), rgba(255,255,255,.98));
    border: 1px solid rgba(255,138,0,.12) !important;
}

.sv-qr-steps {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    text-align: left;
    margin-bottom: .5rem;
}

.sv-qr-step {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: .875rem;
    color: #374151;
}

.sv-qr-step-num {
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    background: #ff8a00;
    color: #fff;
    font-size: .72rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sv-amount-display {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 2rem;
    font-weight: 800;
    color: #111827;
    letter-spacing: -.03em;
}

.sv-pending-note {
    background: rgba(13,110,253,.05);
    border: 1px solid rgba(13,110,253,.12);
    border-radius: .875rem;
    padding: .85rem 1rem;
    font-size: .82rem;
    color: #374151;
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    line-height: 1.5;
}

.sv-pending-note i {
    color: #0d6efd;
    font-size: .95rem;
    flex-shrink: 0;
    margin-top: .1rem;
}
