/**
 * Hilanaw Sponsorship — Redemption Page
 * @package Hilanaw_Sponsorship
 * @version 1.0.0
 *
 * Reuses the exact same design tokens as sponsor-auth.css (which itself
 * mirrors chat-ui's [hilanaw_auth] page) so the entrepreneur-facing
 * redemption page feels consistent with both the sponsor pages and the
 * main platform.
 */

.hilanaw-sponsor-redeem-wrap {
    --hs-blue:         #0046a0;
    --hs-blue-light:   #0066cc;
    --hs-text:         #111827;
    --hs-text-muted:   #6b7280;
    --hs-border:       #e5e7eb;
    --hs-surface:      #ffffff;
    --hs-bg:           #f9fafb;
    --hs-radius-card:  20px;
    --hs-radius-input: 10px;
    --hs-shadow-card:
        0 2px 4px rgba(0,0,0,0.04),
        0 12px 40px rgba(0,0,0,0.10);

    position: relative;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(24px, 5vw, 48px) clamp(12px, 4vw, 24px);
    min-height: clamp(400px, 60vh, 100vh);
    background: var(--hs-bg);
}

.hilanaw-sponsor-redeem-card {
    width: 100%;
    max-width: 440px;
    background: var(--hs-surface);
    border-radius: var(--hs-radius-card);
    box-shadow: var(--hs-shadow-card);
    padding: clamp(28px, 5vw, 44px) clamp(20px, 5vw, 40px);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.hilanaw-sponsor-redeem-card--notice {
    align-items: center;
    text-align: center;
    gap: 16px;
    padding: clamp(36px, 6vw, 56px) clamp(20px, 5vw, 40px);
}

.hilanaw-sponsor-redeem-card--notice h2 {
    font-size: clamp(19px, 2.2vw, 24px);
    font-weight: 800;
    color: var(--hs-text);
    margin: 0;
}

.hilanaw-sponsor-redeem-card--notice p {
    font-size: 14px;
    color: var(--hs-text-muted);
    line-height: 1.6;
    margin: 0;
}

.hilanaw-sponsor-redeem-welcome {
    margin-bottom: 22px;
}

.hilanaw-sponsor-redeem-welcome h2 {
    font-size: clamp(19px, 2.2vw, 24px);
    font-weight: 800;
    color: var(--hs-text);
    letter-spacing: -0.4px;
    margin: 0 0 6px;
    line-height: 1.2;
}

.hilanaw-sponsor-redeem-welcome p {
    font-size: 14px;
    color: var(--hs-text-muted);
    margin: 0;
    line-height: 1.5;
}

/* ============================================================
   Field
   ============================================================ */

.hilanaw-sponsor-redeem-field {
    margin-bottom: 18px;
}

.hilanaw-sponsor-redeem-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--hs-text);
    margin-bottom: 6px;
}

.hilanaw-sponsor-redeem-field input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--hs-text);
    background: var(--hs-surface);
    border: 1.5px solid var(--hs-border);
    border-radius: var(--hs-radius-input);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.hilanaw-sponsor-redeem-field input::placeholder {
    color: #9ca3af;
    text-transform: none;
    font-weight: 400;
    letter-spacing: normal;
}

.hilanaw-sponsor-redeem-field input:focus {
    outline: none;
    border-color: var(--hs-blue);
    box-shadow:
        0 0 0 3px rgba(0, 70, 160, 0.08),
        inset 3px 0 0 var(--hs-blue);
}

/* ============================================================
   Submit button — shimmer pulse while loading
   ============================================================ */

.hilanaw-sponsor-redeem-submit {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--hs-blue) 0%, var(--hs-blue-light) 100%);
    color: #ffffff !important;
    border: none;
    border-radius: 12px;
    padding: 13px 24px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: opacity 0.2s, transform 0.15s;
}

.hilanaw-sponsor-redeem-submit:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.hilanaw-sponsor-redeem-submit:active {
    transform: translateY(0);
}

.hilanaw-sponsor-redeem-submit::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        transparent 30%,
        rgba(255,255,255,0.25) 50%,
        transparent 70%
    );
    transform: translateX(-100%);
    pointer-events: none;
}

.hilanaw-sponsor-redeem-submit.is-loading::after {
    animation: hilanaw-sponsor-redeem-shimmer 1.2s ease infinite;
}

.hilanaw-sponsor-redeem-submit.is-loading {
    pointer-events: none;
    opacity: 0.85;
}

@keyframes hilanaw-sponsor-redeem-shimmer {
    to { transform: translateX(200%); }
}

.hilanaw-sponsor-redeem-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: hilanaw-sponsor-redeem-spin 0.6s linear infinite;
    flex-shrink: 0;
}

.hilanaw-sponsor-redeem-submit.is-loading .hilanaw-sponsor-redeem-spinner {
    display: inline-block;
}

@keyframes hilanaw-sponsor-redeem-spin {
    to { transform: rotate(360deg); }
}

/* ============================================================
   Messages
   ============================================================ */

.hilanaw-sponsor-redeem-message {
    font-size: 13px;
    line-height: 1.5;
    border-radius: var(--hs-radius-input);
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease, padding 0.2s ease, margin 0.2s ease;
}

.hilanaw-sponsor-redeem-message.is-error {
    max-height: 140px;
    padding: 10px 14px;
    margin: 0 0 16px;
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    text-transform: none;
}

.hilanaw-sponsor-redeem-message.is-success {
    max-height: 100px;
    padding: 10px 14px;
    margin: 0 0 16px;
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

/* ============================================================
   Note (sponsor-visibility transparency line — spec §11)
   ============================================================ */

.hilanaw-sponsor-redeem-note {
    font-size: 12px;
    color: var(--hs-text-muted);
    line-height: 1.6;
    text-align: center;
    margin: 18px 0 0;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 400px) {
    .hilanaw-sponsor-redeem-card {
        border-radius: 12px;
    }
}
