/**
 * Flipside Tickets - Frontend Styles
 * Color palette inspired by the website's earthy, zen aesthetic
 */

:root {
    --fst-bg: #faf7f2;
    --fst-card: #ffffff;
    --fst-dark: #1a1a1a;
    --fst-accent: #c89968;
    --fst-accent-dark: #a87a4d;
    --fst-text: #2a2a2a;
    --fst-muted: #8a8a8a;
    --fst-border: #e8e3db;
    --fst-success: #4a7c59;
    --fst-warning: #d4823a;
    --fst-error: #c44545;
    --fst-radius: 12px;
    --fst-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.fst-wrapper {
    max-width: 640px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    color: var(--fst-text);
    line-height: 1.6;
}

.fst-wrapper *,
.fst-wrapper *::before,
.fst-wrapper *::after {
    box-sizing: border-box;
}

/* === STATUS CARD === */
.fst-status-card {
    background: var(--fst-card);
    border-radius: var(--fst-radius);
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--fst-shadow);
    border: 1px solid var(--fst-border);
}

.fst-status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.fst-status-label {
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--fst-muted);
    font-weight: 600;
}

.fst-current-tier {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    background: rgba(74, 124, 89, 0.1);
    color: var(--fst-success);
}

.fst-current-tier.tier-regular {
    background: rgba(212, 130, 58, 0.12);
    color: var(--fst-warning);
}

.fst-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: fst-pulse 2s ease infinite;
}

@keyframes fst-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* Price */
.fst-price-display {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 20px;
}

.fst-price-currency {
    font-size: 24px;
    color: var(--fst-muted);
    font-weight: 300;
}

.fst-price-amount {
    font-size: 56px;
    font-weight: 200;
    color: var(--fst-dark);
    letter-spacing: -2px;
    line-height: 1;
}

.fst-price-suffix {
    font-size: 14px;
    color: var(--fst-muted);
    margin-left: 8px;
}

/* Urgency banner */
.fst-urgency-banner {
    background: linear-gradient(135deg, #fff5e6, #fff0d6);
    border-left: 3px solid var(--fst-accent);
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--fst-text);
    margin-bottom: 24px;
    line-height: 1.5;
}

.fst-urgency-banner.regular {
    background: linear-gradient(135deg, #fde8e8, #fdd9d9);
    border-left-color: var(--fst-error);
}

.fst-urgency-banner strong {
    color: var(--fst-dark);
    font-weight: 700;
}

/* Progress */
.fst-progress-wrap {
    margin-top: 8px;
}

.fst-progress-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--fst-muted);
    margin-bottom: 8px;
}

.fst-progress-meta strong {
    color: var(--fst-dark);
    font-weight: 600;
}

.fst-progress-bar {
    height: 10px;
    background: var(--fst-border);
    border-radius: 100px;
    overflow: hidden;
    position: relative;
}

.fst-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--fst-accent), var(--fst-accent-dark));
    border-radius: 100px;
    transition: width 0.6s ease;
    position: relative;
    overflow: hidden;
}

.fst-progress-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: fst-shimmer 2s ease-in-out infinite;
}

@keyframes fst-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* === FORM CARD === */
.fst-form-card {
    background: var(--fst-card);
    border-radius: var(--fst-radius);
    padding: 32px;
    box-shadow: var(--fst-shadow);
    border: 1px solid var(--fst-border);
}

.fst-form-title {
    font-size: 22px;
    font-weight: 500;
    color: var(--fst-dark);
    margin: 0 0 4px;
    letter-spacing: -0.3px;
}

.fst-form-sub {
    font-size: 14px;
    color: var(--fst-muted);
    margin: 0 0 24px;
}

.fst-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.fst-field {
    display: flex;
    flex-direction: column;
}

.fst-field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--fst-text);
    margin-bottom: 6px;
    letter-spacing: 0.2px;
}

.fst-field label span {
    color: var(--fst-error);
}

.fst-field input {
    padding: 12px 14px;
    border: 1.5px solid var(--fst-border);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    color: var(--fst-text);
    background: #fafaf8;
    transition: all 0.2s;
    width: 100%;
}

.fst-field input:focus {
    outline: none;
    border-color: var(--fst-accent);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(200, 153, 104, 0.15);
}

.fst-field small {
    font-size: 12px;
    color: var(--fst-muted);
    margin-top: 4px;
}

#fst-payment-element {
    padding: 14px;
    border: 1.5px solid var(--fst-border);
    border-radius: 8px;
    background: #fafaf8;
    min-height: 48px;
}

/* Error */
.fst-error {
    background: #fdecec;
    color: var(--fst-error);
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 14px;
    border-left: 3px solid var(--fst-error);
}

/* Submit */
.fst-submit-btn {
    background: var(--fst-dark);
    color: #fff;
    border: none;
    padding: 16px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

.fst-submit-btn:hover:not(:disabled) {
    background: #2a2a2a;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.fst-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.fst-btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: fst-spin 0.8s linear infinite;
}

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

.fst-secure-note {
    font-size: 12px;
    color: var(--fst-muted);
    text-align: center;
    margin: 12px 0 0;
}

/* === SUCCESS STATE === */
.fst-success {
    text-align: center;
    padding: 20px 0;
}

.fst-success-icon {
    width: 72px;
    height: 72px;
    background: var(--fst-success);
    color: #fff;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 300;
    animation: fst-pop 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes fst-pop {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

.fst-success h3 {
    font-size: 24px;
    color: var(--fst-dark);
    margin: 0 0 8px;
    font-weight: 500;
}

.fst-success-msg {
    color: var(--fst-muted);
    margin: 0 0 28px;
    font-size: 15px;
}

.fst-ticket-card {
    background: var(--fst-bg);
    border: 2px dashed var(--fst-accent);
    border-radius: var(--fst-radius);
    padding: 28px 20px;
    margin: 0 auto;
    max-width: 360px;
}

.fst-ticket-label {
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--fst-muted);
    margin-bottom: 8px;
    font-weight: 600;
}

.fst-ticket-number {
    font-family: 'Courier New', Courier, monospace;
    font-size: 26px;
    font-weight: 700;
    color: var(--fst-dark);
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.fst-ticket-note {
    font-size: 12px;
    color: var(--fst-muted);
}

/* === CLOSED === */
.fst-closed-notice {
    background: var(--fst-card);
    padding: 48px 32px;
    border-radius: var(--fst-radius);
    text-align: center;
    border: 1px solid var(--fst-border);
}

.fst-closed-notice h3 {
    font-size: 28px;
    color: var(--fst-dark);
    margin: 0 0 12px;
    font-weight: 400;
}

.fst-closed-notice p {
    color: var(--fst-muted);
    margin: 0;
}

/* === STATUS MINI === */
.fst-status-mini {
    background: var(--fst-card);
    padding: 16px 20px;
    border-radius: 8px;
    border: 1px solid var(--fst-border);
    margin: 12px 0;
}

.fst-status-mini-row {
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--fst-text);
}

/* === RESPONSIVE === */
@media (max-width: 480px) {
    .fst-status-card,
    .fst-form-card {
        padding: 22px;
    }
    .fst-price-amount {
        font-size: 44px;
    }
    .fst-form-title {
        font-size: 19px;
    }
    .fst-status-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
