/**
 * Voucher Claims - Frontend Styles
 * Landing page for customers to claim vouchers
 */

/* Container */
.thb-voucher-container {
    max-width: 560px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Card */
.thb-voucher-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 36px 32px;
    text-align: center;
}

.thb-voucher-card h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.thb-voucher-subtitle {
    font-size: 14px;
    color: #888;
    margin: 0 0 24px 0;
}

.thb-voucher-instruction {
    font-size: 15px;
    color: #555;
    margin: 0 0 20px 0;
}

/* Urgency notice */
.thb-voucher-urgency {
    display: inline-block;
    background: #fff3cd;
    color: #856404;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
}

/* Icon for status pages */
.thb-voucher-icon {
    font-size: 48px;
    margin-bottom: 16px;
    line-height: 1;
}

/* Reason buttons */
.thb-voucher-reasons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 8px;
}

.thb-voucher-reason-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 20px 12px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-family: inherit;
}

.thb-voucher-reason-btn:hover {
    border-color: #4a7c59;
    background: #f0f7f2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 124, 89, 0.15);
}

.thb-voucher-reason-btn:active {
    transform: translateY(0);
}

.thb-voucher-reason-btn.selected {
    border-color: #4a7c59;
    background: #e8f5e9;
    box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.15);
}

.thb-voucher-reason-icon {
    font-size: 32px;
    line-height: 1;
}

.thb-voucher-reason-text {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.thb-voucher-reason-desc {
    font-size: 12px;
    color: #888;
    line-height: 1.3;
}

/* Intro text */
.thb-voucher-intro {
    font-size: 15px;
    color: #555;
    line-height: 1.6;
    margin: 0 0 16px 0;
}

/* Confirmation step */
.thb-voucher-confirm {
    margin-top: 24px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    animation: thb-voucher-fade-in 0.3s ease;
}

.thb-voucher-confirm-text {
    font-size: 15px;
    color: #333;
    margin: 0 0 8px 0;
}

.thb-voucher-confirm-details {
    font-size: 13px;
    color: #666;
    margin: 0 0 16px 0;
    line-height: 1.5;
}

.thb-voucher-confirm-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* Buttons */
.thb-voucher-btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-family: inherit;
    line-height: 1.4;
}

.thb-voucher-btn-primary {
    background: #4a7c59;
    color: #fff;
}

.thb-voucher-btn-primary:hover {
    background: #3d6a4b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 124, 89, 0.3);
    color: #fff;
}

.thb-voucher-btn-secondary {
    background: #e9ecef;
    color: #555;
}

.thb-voucher-btn-secondary:hover {
    background: #dee2e6;
    color: #333;
}

.thb-voucher-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Loading state */
.thb-voucher-loading {
    margin-top: 24px;
    padding: 30px;
    text-align: center;
    animation: thb-voucher-fade-in 0.3s ease;
}

.thb-voucher-loading p {
    font-size: 14px;
    color: #888;
    margin: 12px 0 0 0;
}

.thb-voucher-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e9ecef;
    border-top-color: #4a7c59;
    border-radius: 50%;
    margin: 0 auto;
    animation: thb-voucher-spin 0.8s linear infinite;
}

/* Result / success */
.thb-voucher-result {
    margin-top: 24px;
    animation: thb-voucher-fade-in 0.4s ease;
}

.thb-voucher-result-box {
    background: #f0f7f2;
    border: 2px solid #c8e6c9;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 20px;
}

.thb-voucher-success-icon {
    width: 44px;
    height: 44px;
    background: #4a7c59;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    margin: 0 auto 12px auto;
    line-height: 1;
}

.thb-voucher-reason-badge {
    display: inline-block;
    background: #e0e0e0;
    color: #555;
    padding: 3px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.thb-voucher-code-label {
    font-size: 13px;
    color: #888;
    margin: 0 0 6px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.thb-voucher-code {
    font-size: 28px;
    font-weight: 800;
    color: #4a7c59;
    letter-spacing: 2px;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    margin: 0 0 12px 0;
    user-select: all;
    word-break: break-all;
}

.thb-voucher-copy-btn {
    display: inline-block;
    padding: 6px 20px;
    background: #fff;
    border: 1px solid #c8e6c9;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #4a7c59;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.thb-voucher-copy-btn:hover {
    background: #e8f5e9;
    border-color: #4a7c59;
}

.thb-voucher-details {
    font-size: 13px;
    color: #888;
    margin: 12px 0 0 0;
}

/* Error messages */
.thb-voucher-error-msg {
    margin-top: 20px;
    padding: 14px 18px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #dc2626;
    font-size: 14px;
    text-align: center;
    animation: thb-voucher-fade-in 0.3s ease;
}

/* Animations */
@keyframes thb-voucher-fade-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Mobile */
@media (max-width: 520px) {
    .thb-voucher-container {
        margin: 20px auto;
        padding: 0 12px;
    }

    .thb-voucher-card {
        padding: 24px 20px;
    }

    .thb-voucher-card h2 {
        font-size: 20px;
    }

    .thb-voucher-reasons {
        grid-template-columns: 1fr;
    }

    .thb-voucher-reason-btn {
        padding: 16px 12px;
    }

    .thb-voucher-code {
        font-size: 22px;
    }

    .thb-voucher-confirm-actions {
        flex-direction: column;
    }
}
