/**
 * Seebox storefront UI — aligned with seebox-api dashboard (app.css tokens).
 * Fonts: seebox-fonts.css (Pelak + Vazirmatn).
 */
:root {
    --seebox: #0c0c0c;
    --seebox-hover: #222222;
    --seebox-page: #f9f9f9;
    --seebox-muted: #666666;
    --seebox-border: #e5e5e5;
    --seebox-text: #333333;
    --seebox-text-secondary: #555555;
    --seebox-danger: #dc3232;
    --seebox-success-text: #155724;
    --seebox-success-bg: #d4edda;
    --seebox-success-border: #c3e6cb;
    --seebox-warning-text: #856404;
    --seebox-warning-bg: #fff3cd;
    --seebox-warning-border: #ffeeba;
    --seebox-error-text: #721c24;
    --seebox-error-bg: #f8d7da;
    --seebox-error-border: #f5c6cb;
    --seebox-font: 'Pelak', 'Vazirmatn', Tahoma, Geneva, Verdana, ui-sans-serif, system-ui, sans-serif;
    --seebox-shadow-card: 0 4px 12px rgba(0, 0, 0, 0.05);
    --seebox-shadow-card-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
    --seebox-radius-card: 20px;
    --seebox-radius-btn: 10px;
    --seebox-radius-input: 24px;
    --seebox-radius-panel: 12px;
}

.seebox-ui,
.seebox-payment-table-page,
.seebox-deposit-box,
.seebox-order-pay-plan {
    direction: rtl;
    font-family: var(--seebox-font);
    color: var(--seebox-text);
}

/* —— Dashboard buttons —— */
.btn-seebox,
.seebox-payment-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    text-decoration: none;
    color: #fff;
    font-family: var(--seebox-font);
    font-size: 14px;
    font-weight: 500;
    padding: 12px 40px;
    border-radius: var(--seebox-radius-btn);
    background: linear-gradient(to bottom right, var(--seebox), var(--seebox-hover));
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.btn-seebox:hover,
.seebox-payment-btn:hover {
    color: #fff;
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.btn-seebox-sm,
.seebox-payment-btn--inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    text-decoration: none;
    color: #fff;
    font-family: var(--seebox-font);
    font-size: 12px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    background: var(--seebox);
    transition: background 0.2s ease;
}

.btn-seebox-sm:hover,
.seebox-payment-btn--inline:hover {
    background: var(--seebox-hover);
    color: #fff;
}

.btn-seebox-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dddddd;
    cursor: pointer;
    text-decoration: none;
    color: var(--seebox);
    font-family: var(--seebox-font);
    font-size: 12px;
    padding: 8px 16px;
    border-radius: 8px;
    background: #f0f0f0;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.btn-seebox-secondary:hover {
    background: #e0e0e0;
    border-color: #cccccc;
    color: var(--seebox);
}

/* —— Inputs —— */
.input-seebox,
.seebox-payment-search-input {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 0;
    padding: 15px;
    font-family: var(--seebox-font);
    font-size: 13px;
    color: var(--seebox-text);
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: var(--seebox-radius-input);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-seebox:focus,
.seebox-payment-search-input:focus {
    outline: none;
    border-color: var(--seebox);
    box-shadow: 0 0 0 2px rgba(12, 12, 12, 0.1);
}

.input-seebox::placeholder,
.seebox-payment-search-input::placeholder {
    color: #aaaaaa;
}

/* —— Cards —— */
.card-seebox,
.seebox-deposit-box,
.seebox-payment-order,
.seebox-payment-search {
    background: #ffffff;
    border: 1px solid var(--seebox-border);
    border-radius: var(--seebox-radius-card);
    box-shadow: var(--seebox-shadow-card-lg);
    padding: 24px;
    margin-bottom: 20px;
    box-sizing: border-box;
}

.seebox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.seebox-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--seebox);
    margin: 0;
}

.seebox-desc {
    font-size: 14px;
    line-height: 1.7;
    color: var(--seebox-text-secondary);
    margin: 0 0 16px;
}

.seebox-payment-plan-name {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--seebox);
}

.seebox-payment-summary {
    padding: 16px;
    margin-bottom: 16px;
    background: #fafafa;
    border: 1px solid var(--seebox-border);
    border-radius: var(--seebox-radius-panel);
}

.seebox-payment-summary p {
    margin: 6px 0;
    font-size: 14px;
    color: var(--seebox-text);
}

.seebox-payment-summary strong {
    color: var(--seebox);
    font-weight: 600;
}

/* —— Notices —— */
.notice-seebox,
.seebox-payment-notice {
    border-radius: 8px;
    border: 1px solid transparent;
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.6;
}

.notice-seebox-error,
.seebox-payment-notice--error {
    background: var(--seebox-error-bg);
    border-color: var(--seebox-error-border);
    color: var(--seebox-error-text);
    text-align: center;
}

.notice-seebox-success {
    background: var(--seebox-success-bg);
    border-color: var(--seebox-success-border);
    color: var(--seebox-success-text);
}

.notice-seebox-warning {
    background: var(--seebox-warning-bg);
    border-color: var(--seebox-warning-border);
    color: var(--seebox-warning-text);
}

.seebox-payment-notice-inline {
    margin: 10px 0 0;
    font-size: 14px;
    color: var(--seebox-muted);
}

/* —— Payment table page —— */
.seebox-payment-table-page {
    max-width: 720px;
    margin: 30px auto;
    padding: 0 16px;
    background: var(--seebox-page);
}

.seebox-payment-search-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* —— Plan steps —— */
.seebox-steps,
.seebox-plan-steps {
    margin-top: 12px;
    position: relative;
    padding-right: 10px;
}

.seebox-plan-steps {
    padding: 16px;
    background: #fafafa;
    border: 1px solid var(--seebox-border);
    border-radius: var(--seebox-radius-panel);
}

.seebox-step {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 8px;
    position: relative;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.seebox-progress-circle {
    position: relative;
    width: 24px;
    height: 24px;
    margin-left: 10px;
    flex-shrink: 0;
}

.seebox-progress-circle::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #ffffff;
    z-index: 1;
}

.seebox-progress-circle::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(var(--seebox) 0deg, var(--seebox) var(--progress, 0deg), #eeeeee var(--progress, 0deg));
    z-index: 2;
    -webkit-mask: radial-gradient(circle 10px at center, transparent 10px, black 10.1px);
    mask: radial-gradient(circle 10px at center, transparent 9px, black 10.1px);
}

.seebox-step:not(:last-child)::after {
    content: "";
    position: absolute;
    right: 19px;
    top: 36px;
    width: 2px;
    height: 44px;
    background: var(--seebox-border);
    z-index: 0;
}

.seebox-step-details {
    flex: 1;
    text-align: right;
}

.seebox-step-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--seebox);
}

.seebox-step-percent {
    display: inline-block;
    margin-right: 6px;
    padding: 1px 8px;
    font-size: 11px;
    font-weight: 500;
    color: var(--seebox-muted);
    background: #f0f0f0;
    border-radius: 999px;
}

.seebox-step-desc,
.seebox-step-status {
    font-size: 12px;
    color: var(--seebox-muted);
    margin-top: 4px;
    line-height: 1.6;
}

.seebox-step-amount {
    font-size: 13px;
    font-weight: 700;
    color: var(--seebox);
    min-width: 100px;
    text-align: left;
}

.seebox-next-payment {
    font-size: 11px;
    font-weight: 500;
    color: var(--seebox-muted);
    text-align: left;
    margin-top: 4px;
}

.seebox-step--shipping .seebox-step-desc {
    max-width: 28em;
}

.seebox-step.is-current {
    background: #f0f0f0;
    border: 1px solid var(--seebox-border);
}

.seebox-step.is-current .seebox-step-title {
    color: var(--seebox);
}

.seebox-step.is-paid .seebox-step-title {
    color: var(--seebox-success-text);
}

.seebox-step.is-paid .seebox-progress-circle::after {
    background: conic-gradient(var(--seebox-success-text) 0deg, var(--seebox-success-text) var(--progress, 360deg), #eeeeee var(--progress, 360deg));
}

.seebox-plan-shipping-note {
    font-size: 12px;
    color: var(--seebox-muted);
    margin: 12px 0 0;
    text-align: right;
}

/* —— Checkout payment selector —— */
.seebox-deposit-box .seebox-options {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

		.seebox-deposit-box .seebox-option {
    flex: 1;
    position: relative;
    text-align: center;
    background: #fff;
    border: 1px solid var(--seebox-border);
    border-radius: var(--seebox-radius-panel);
    padding: 12px 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--seebox) !important;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
    line-height: 1.4;
    user-select: none;
}

.seebox-deposit-box .seebox-option input[name="deposit-radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.seebox-deposit-box .seebox-option span {
    display: block;
    font-size: 11px;
    color: var(--seebox-muted);
    margin-top: 4px;
    font-weight: normal;
}

.seebox-deposit-box .seebox-option.active {
    background: #f0f0f0;
    border-color: var(--seebox);
    color: var(--seebox) !important;
}

.seebox-deposit-box .seebox-option--disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

.seebox-deposit-box .woocommerce-Price-amount {
    color: var(--seebox) !important;
    font-weight: 700 !important;
}

.seebox-mode-panel {
    margin-top: 4px;
}

.seebox-mode-panel[hidden] {
    display: none !important;
}

.seebox-suspended-banner,
.seebox-insufficient-hint {
    margin: 0 0 12px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.6;
}

.seebox-suspended-banner {
    background: var(--seebox-warning-bg);
    border: 1px solid var(--seebox-warning-border);
    color: var(--seebox-warning-text);
}

.seebox-suspended-banner strong {
    display: block;
    margin-bottom: 4px;
}

.seebox-insufficient-hint {
    background: var(--seebox-error-bg);
    border: 1px solid var(--seebox-error-border);
    color: var(--seebox-error-text);
}

.seebox-deposit-box--suspended .seebox-options,
.seebox-deposit-box--insufficient .seebox-option[for],
.seebox-deposit-box--insufficient .seebox-option:first-child {
    opacity: 1;
}

.seebox-powered {
    font-size: 10px;
    color: var(--seebox-muted);
    opacity: 0.7;
}

.seebox-order-total-note {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    font-weight: normal;
    color: var(--seebox-muted);
}

/* —— Checkout popups —— */
.wc-popup-modal {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 16px;
    box-sizing: border-box;
    background-color: rgba(12, 12, 12, 0.48);
    display: flex !important;
    justify-content: center;
    align-items: center;
    z-index: 999999 !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.wc-popup-modal[hidden] {
    display: none !important;
}

.wc-popup-modal.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.wc-popup-content {
    background: #fff;
    padding: 28px 24px 24px;
    border: 1px solid var(--seebox-border);
    border-radius: var(--seebox-radius-card);
    max-width: 450px;
    width: min(92vw, 450px);
    max-height: min(88vh, 640px);
    overflow-y: auto;
    position: relative;
    box-shadow: var(--seebox-shadow-card-lg);
    transform: scale(0.97);
    transition: transform 0.25s ease;
    font-family: var(--seebox-font);
    color: var(--seebox-text);
    box-sizing: border-box;
}

.wc-popup-modal.is-visible .wc-popup-content {
    transform: scale(1);
}

.wc-popup-content h3 {
    margin: 0 0 4px;
    padding-inline: 36px;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--seebox-text);
    text-align: center;
}

.wc-popup-close {
    position: absolute;
    top: 8px;
    left: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--seebox-muted);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

.wc-popup-close:hover {
    color: var(--seebox);
    background: var(--seebox-page);
}

.wc-popup-close:focus-visible {
    outline: 2px solid var(--seebox);
    outline-offset: 2px;
}

.wc-popup-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 8px auto 16px;
    border-radius: 50%;
    background: var(--seebox-page);
    border: 1px solid var(--seebox-border);
    color: var(--seebox);
}

.wc-popup-content .seebox-inner-box {
    background: var(--seebox-page);
    border: 1px solid var(--seebox-border);
    border-radius: var(--seebox-radius-panel);
    padding: 16px;
    text-align: right;
    margin-top: 16px;
    color: var(--seebox-text-secondary);
    font-size: 14px;
    line-height: 1.7;
    max-height: 240px;
    overflow-y: auto;
}

.wc-popup-content .seebox-inner-box ul {
    margin: 0;
    padding-inline-start: 1.25em;
}

.wc-popup-content .seebox-inner-box li + li {
    margin-top: 0.5em;
}

.wc-popup-buttons {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.wc-popup-buttons .button,
.wc-popup-buttons .btn-seebox,
.wc-popup-buttons .btn-seebox-secondary {
    flex: 1 1 140px;
    min-height: 44px;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
    cursor: pointer;
    transition: box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.wc-popup-buttons .btn-seebox-secondary {
    font-size: 15px;
    padding: 12px 16px;
    border-radius: var(--seebox-radius-btn);
}

.wc-popup-buttons .btn-seebox:focus-visible,
.wc-popup-buttons .btn-seebox-secondary:focus-visible {
    outline: 2px solid var(--seebox);
    outline-offset: 2px;
}

.wc-popup-buttons .btn-seebox:active,
.wc-popup-buttons .btn-seebox-secondary:active {
    transform: scale(0.98);
}

.wc-popup-footer {
    margin-top: 16px;
    font-size: 12px;
    color: var(--seebox-muted);
    text-align: center;
}

.wc-popup-content.guest-content {
    text-align: center;
    padding: 36px 28px 28px;
}

.wc-popup-content.guest-content .seebox-inner-box {
    text-align: center;
    max-height: none;
    overflow: visible;
}

.wc-popup-content.guest-content .wc-popup-buttons .button {
    flex: 1 1 100%;
}

@media (prefers-reduced-motion: reduce) {
    .wc-popup-modal,
    .wc-popup-content,
    .wc-popup-close,
    .wc-popup-buttons .button,
    .wc-popup-buttons .btn-seebox,
    .wc-popup-buttons .btn-seebox-secondary {
        transition: none;
    }

    .wc-popup-content {
        transform: none;
    }

    .wc-popup-modal.is-visible .wc-popup-content {
        transform: none;
    }

    .wc-popup-buttons .btn-seebox:active,
    .wc-popup-buttons .btn-seebox-secondary:active {
        transform: none;
    }
}

