/**
 * Nosolorol Gift Cards - Estilos frontales
 * Tema oscuro gaming adaptado al estilo Nosolorol
 */

/* ============================================
   PÁGINA DE COMPRA
   ============================================ */

.gc-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

.gc-intro {
    text-align: center;
    margin-bottom: 30px;
}

.gc-description {
    font-size: 1.1rem;
    color: #ccc;
    line-height: 1.6;
}

/* ============================================
   PASOS
   ============================================ */

.gc-step {
    margin-bottom: 30px;
    animation: gcFadeIn 0.4s ease-out;
}

@keyframes gcFadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.gc-step-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.gc-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6c5ce7, #a855f7);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.gc-step-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #e0e0e0;
    margin: 0;
}

.gc-step-title small {
    font-weight: 400;
    color: #888;
    font-size: 0.85rem;
}

/* ============================================
   GRID DE IMPORTES
   ============================================ */

.gc-amounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

.gc-amount-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    border: 2px solid #333;
    border-radius: 12px;
    background: #1a1a2e;
    cursor: pointer;
    transition: all 0.25s ease;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.gc-amount-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #6c5ce7, #a855f7);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.gc-amount-card:hover {
    border-color: #6c5ce7;
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(108, 92, 231, 0.2);
}

.gc-amount-card:hover::before {
    opacity: 1;
}

.gc-amount-card.selected {
    border-color: #a855f7;
    background: #16213e;
    box-shadow: 0 0 0 1px #a855f7, 0 8px 24px rgba(168, 85, 247, 0.25);
}

.gc-amount-card.selected::before {
    opacity: 1;
}

.gc-amount-icon {
    font-size: 2rem;
    line-height: 1;
}

.gc-amount-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.gc-amount-label {
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   FORMULARIO
   ============================================ */

.gc-form-card {
    background: #1a1a2e;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 24px;
}

.gc-form-group {
    margin-bottom: 20px;
}

.gc-form-group:last-child {
    margin-bottom: 0;
}

.gc-form-group label {
    display: block;
    font-weight: 600;
    color: #e0e0e0;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.gc-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #333;
    border-radius: 8px;
    background: #0f0f23;
    color: #e0e0e0;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.gc-input:focus {
    outline: none;
    border-color: #6c5ce7;
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

.gc-input::placeholder {
    color: #555;
}

.gc-textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.gc-input-help {
    display: block;
    margin-top: 6px;
    font-size: 0.82rem;
    color: #888;
}

.gc-input.gc-input-error {
    border-color: #e74c3c;
}

.gc-error-text {
    color: #e74c3c;
    font-size: 0.82rem;
    margin-top: 4px;
}

.gc-char-counter {
    text-align: right;
    font-size: 0.82rem;
    color: #666;
    margin-top: 4px;
}

/* ============================================
   RESUMEN
   ============================================ */

.gc-summary-card {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 2px solid #6c5ce7;
    border-radius: 16px;
    padding: 28px;
    position: relative;
    overflow: hidden;
}

.gc-summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #6c5ce7, #a855f7, #ec4899);
}

.gc-summary-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.gc-summary-icon {
    font-size: 2rem;
}

.gc-summary-header h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #e0e0e0;
    margin: 0;
}

.gc-summary-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.gc-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.gc-summary-row:last-child {
    border-bottom: none;
}

.gc-summary-label {
    font-weight: 600;
    color: #999;
    font-size: 0.9rem;
    min-width: 80px;
}

.gc-summary-value {
    color: #e0e0e0;
    text-align: right;
    font-size: 0.95rem;
}

.gc-summary-row:first-child .gc-summary-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #a855f7;
}

.gc-summary-message {
    font-style: italic;
    color: #aaa;
    max-width: 400px;
    word-break: break-word;
}

.gc-summary-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* ============================================
   BOTONES
   ============================================ */

.gc-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1.4;
}

.gc-btn i.material-icons {
    font-size: 1.1rem;
}

.gc-btn-primary {
    background: linear-gradient(135deg, #6c5ce7, #a855f7);
    color: #fff;
}

.gc-btn-primary:hover {
    background: linear-gradient(135deg, #5a4bd1, #9333ea);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(108, 92, 231, 0.35);
    color: #fff;
}

.gc-btn-primary:active {
    transform: translateY(0);
}

.gc-btn-secondary {
    background: #2a2a3e;
    color: #ccc;
    border: 1px solid #444;
}

.gc-btn-secondary:hover {
    background: #333350;
    color: #fff;
}

.gc-btn-outline {
    background: transparent;
    color: #a855f7;
    border: 2px solid #a855f7;
}

.gc-btn-outline:hover {
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
}

.gc-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ============================================
   NAVEGACIÓN
   ============================================ */

.gc-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 20px;
    border-top: 1px solid #222;
}

/* ============================================
   MENSAJE DE ÉXITO
   ============================================ */

.gc-success-card {
    text-align: center;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 2px solid #27ae60;
    border-radius: 16px;
    padding: 40px 28px;
    animation: gcFadeIn 0.4s ease-out;
}

.gc-success-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 16px;
}

.gc-success-card h3 {
    font-size: 1.15rem;
    font-weight: 500;
    color: #e0e0e0;
    margin: 0 0 24px;
    line-height: 1.5;
}

.gc-success-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   LOADING
   ============================================ */

.gc-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    gap: 16px;
}

.gc-loading-overlay p {
    color: #ccc;
    font-size: 1rem;
}

.gc-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #333;
    border-top-color: #a855f7;
    border-radius: 50%;
    animation: gcSpin 0.8s linear infinite;
}

@keyframes gcSpin {
    to { transform: rotate(360deg); }
}

/* ============================================
   HOOK: CARRITO
   ============================================ */

.gc-cart-notice {
    background: #16213e;
    border: 1px solid #6c5ce7;
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
}

.gc-cart-notice h4 {
    color: #a855f7;
    margin: 0 0 8px;
    font-size: 0.95rem;
}

.gc-cart-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.9rem;
    color: #ccc;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.gc-cart-item:last-child {
    border-bottom: none;
}

/* ============================================
   HOOK: CONFIRMACIÓN PEDIDO
   ============================================ */

.gc-order-confirmation {
    background: #16213e;
    border: 2px solid #27ae60;
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
}

.gc-order-confirmation h3 {
    color: #27ae60;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gc-order-gc-item {
    background: #1a1a2e;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

.gc-order-gc-item:last-child {
    margin-bottom: 0;
}

.gc-order-gc-item p {
    margin: 4px 0;
    color: #ccc;
    font-size: 0.9rem;
}

.gc-order-gc-item strong {
    color: #e0e0e0;
}

/* ============================================
   ADMIN: PANEL EN PEDIDO
   ============================================ */

.gc-admin-panel .gc-admin-item {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 10px;
}

.gc-admin-item p {
    margin: 3px 0;
    font-size: 0.9rem;
}

.gc-admin-item .gc-voucher-code {
    font-family: monospace;
    font-weight: 700;
    color: #6c5ce7;
    font-size: 1.1rem;
}

/* ============================================
   EMPTY STATE
   ============================================ */

.gc-empty {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

/* ============================================
   PÁGINA DE CANJE (REDEEM)
   ============================================ */

.gc-redeem-page {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px 0;
}

.gc-redeem-card {
    text-align: center;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 16px;
    padding: 40px 28px;
    position: relative;
    overflow: hidden;
    animation: gcFadeIn 0.4s ease-out;
}

.gc-redeem-success {
    border: 2px solid #27ae60;
}

.gc-redeem-pending {
    border: 2px solid #6c5ce7;
}

.gc-redeem-error {
    border: 2px solid #e74c3c;
}

.gc-redeem-icon {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 16px;
}

.gc-redeem-card h2 {
    color: #e0e0e0;
    font-size: 1.4rem;
    margin: 0 0 16px;
}

.gc-redeem-subtitle {
    color: #ccc;
    font-size: 1.05rem;
    line-height: 1.6;
    margin: 0 0 24px;
}

.gc-redeem-amount {
    color: #a855f7;
    font-weight: 700;
    font-size: 1.2em;
}

.gc-redeem-message {
    color: #ccc;
    font-size: 1rem;
    margin: 0 0 24px;
}

/* Mensaje personal */
.gc-redeem-personal-message {
    text-align: left;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 20px;
    border-left: 3px solid #6c5ce7;
    margin: 0 0 28px;
}

.gc-redeem-msg-label {
    color: #888;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 8px;
}

.gc-redeem-msg-text {
    color: #e0e0e0;
    font-size: 0.95rem;
    line-height: 1.6;
    font-style: italic;
    margin: 0;
}

/* Voucher code box */
.gc-redeem-voucher-box {
    background: #0f0f23;
    border: 2px dashed #6c5ce7;
    border-radius: 12px;
    padding: 24px;
    margin: 0 0 24px;
}

.gc-redeem-voucher-label {
    color: #888;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 8px;
}

.gc-redeem-voucher-code {
    color: #fff;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 3px;
    font-family: 'Courier New', monospace;
    margin: 0 0 16px;
    word-break: break-all;
}

.gc-btn-copy {
    font-size: 0.85rem;
    padding: 8px 20px;
}

.gc-redeem-instructions {
    color: #999;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0 0 28px;
}

/* CTA para login/registro */
.gc-redeem-cta-section {
    margin-top: 8px;
}

.gc-redeem-cta-text {
    color: #ccc;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 0 24px;
}

.gc-redeem-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 380px;
    margin: 0 auto 20px;
}

.gc-btn-large {
    padding: 16px 24px;
    font-size: 1rem;
    justify-content: center;
    text-align: center;
}

.gc-redeem-small-note {
    color: #666;
    font-size: 0.82rem;
    margin: 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .gc-page {
        padding: 10px 0;
    }

    .gc-amounts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .gc-amount-card {
        padding: 20px 12px;
    }

    .gc-amount-value {
        font-size: 1.3rem;
    }

    .gc-form-card {
        padding: 16px;
    }

    .gc-summary-card {
        padding: 20px;
    }

    .gc-summary-actions {
        flex-direction: column;
    }

    .gc-summary-actions .gc-btn {
        justify-content: center;
    }

    .gc-navigation {
        flex-direction: column;
        gap: 10px;
    }

    .gc-navigation .gc-btn {
        width: 100%;
        justify-content: center;
    }

    .gc-success-actions {
        flex-direction: column;
    }

    .gc-success-actions .gc-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .gc-amounts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
