/**
 * Gift Code Redemption Page Styles
 * =================================
 */

.gift-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.gift-container {
    width: 100%;
    max-width: 480px;
}

/* Loading State */
.gift-loading {
    text-align: center;
    padding: 4rem 2rem;
}

.gift-loading__spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-gold);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    animation: gift-spin 0.8s linear infinite;
}

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

.gift-loading p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Error State */
.gift-error {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.gift-error__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    color: #ef4444;
}

.gift-error__icon svg {
    width: 100%;
    height: 100%;
}

.gift-error h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.gift-error p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Header */
.gift-header {
    text-align: center;
    margin-bottom: 2rem;
}

.gift-header__icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--accent-gold) 0%, #c9a456 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(212, 175, 125, 0.3);
}

.gift-header__icon svg {
    width: 40px;
    height: 40px;
    color: var(--bg-primary);
}

.gift-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.gift-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Gift Card */
.gift-card {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-tertiary) 100%);
    border: 1px solid var(--accent-gold);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.gift-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-gold), #c9a456, var(--accent-gold));
}

.gift-card__badge {
    display: inline-block;
    background: var(--accent-gold);
    color: var(--bg-primary);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    margin-bottom: 1rem;
}

.gift-card__plan {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.gift-card__duration {
    color: var(--accent-gold);
    font-size: 0.95rem;
    font-weight: 500;
}

.gift-card__message {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.95rem;
}

/* Form */
.gift-form {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
}

.gift-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.gift-form__field {
    margin-bottom: 1.25rem;
}

.gift-form__label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.gift-form__input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.gift-form__input:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 125, 0.15);
}

.gift-form__input::placeholder {
    color: var(--text-muted);
}

.gift-form__password-wrapper {
    position: relative;
}

.gift-form__password-wrapper .gift-form__input {
    padding-right: 3rem;
}

.gift-form__password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.gift-form__password-toggle:hover {
    color: var(--text-primary);
}

.gift-form__password-toggle svg {
    width: 20px;
    height: 20px;
}

.gift-form__error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    padding: 0.875rem 1rem;
    color: #ef4444;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}

.gift-form__login-link {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.gift-form__login-link a {
    color: var(--accent-gold);
    text-decoration: none;
    font-weight: 500;
}

.gift-form__login-link a:hover {
    text-decoration: underline;
}

/* Buttons */
.gift-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    border: none;
}

.gift-btn svg {
    width: 20px;
    height: 20px;
}

.gift-btn--primary {
    background: linear-gradient(135deg, var(--accent-gold) 0%, #c9a456 100%);
    color: var(--bg-primary);
}

.gift-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(212, 175, 125, 0.3);
}

.gift-btn--primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.gift-btn--full {
    width: 100%;
}

.gift-btn__spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(13, 11, 9, 0.3);
    border-top-color: var(--bg-primary);
    border-radius: 50%;
    animation: gift-spin 0.6s linear infinite;
}

/* Success State */
.gift-success {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.gift-success__icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gift-success__icon svg {
    width: 40px;
    height: 40px;
    color: white;
}

.gift-success h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.gift-success p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.gift-success__details {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 2rem;
}

.gift-success__detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gift-success__label {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.gift-success__value {
    color: var(--accent-gold);
    font-weight: 600;
}

/* Responsive */
@media (max-width: 640px) {
    .gift-page {
        padding: 1rem;
    }

    .gift-form__row {
        grid-template-columns: 1fr;
    }

    .gift-header h1 {
        font-size: 1.5rem;
    }

    .gift-form {
        padding: 1.5rem;
    }
}
