/**
 * Estilos Frontend Marca Blanca - HuepaStore Direct Recharge (Motor HG)
 * Cero mención a proveedores, estética moderna, Billetera Exprés 1-Clic,
 * widgets de historial y componentes de Mi Cuenta.
 */

/* Contenedor del formulario de recarga en ficha de producto */
.huepa-direct-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    margin: 15px 0 20px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.huepa-direct-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.huepa-direct-header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
}

.huepa-direct-fields-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

@media (min-width: 600px) {
    .huepa-direct-fields-grid.two-cols {
        grid-template-columns: 1fr 1fr;
    }
}

.huepa-direct-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 4px;
}

.huepa-direct-field input,
.huepa-direct-field select {
    width: 100%;
    padding: 9px 12px;
    font-size: 14px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #f8fafc;
    color: #0f172a;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.huepa-direct-field input:focus,
.huepa-direct-field select:focus {
    border-color: #2563eb;
    background: #ffffff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.huepa-direct-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.huepa-btn-validate-id {
    background: #2563eb;
    color: #ffffff;
    border: none;
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.huepa-btn-validate-id:hover:not(:disabled) {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.huepa-btn-validate-id:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.huepa-direct-validation-result {
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 6px;
    margin-top: 10px;
    display: none;
}

.huepa-direct-validation-result.success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.huepa-direct-validation-result.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

/* Spinner animado */
.huepa-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: huepa-spin 0.8s linear infinite;
    display: inline-block;
}

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

/* --- BILLETERA EXPRÉS 1-CLIC --- */
.huepa-wallet-btn-wrapper {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed #e2e8f0;
}

.huepa-btn-express-wallet {
    width: 100%;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff !important;
    background: linear-gradient(135deg, #059669 0%, #0d9488 100%) !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.huepa-btn-express-wallet:hover:not(:disabled) {
    background: linear-gradient(135deg, #047857 0%, #0f766e 100%) !important;
    box-shadow: 0 6px 16px rgba(13, 148, 136, 0.35);
    transform: translateY(-1px);
}

.huepa-btn-express-wallet:disabled {
    background: #94a3b8 !important;
    opacity: 0.65;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.huepa-wallet-info-msg {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.4;
}

/* --- WIDGET HISTORIAL DE RECARGAS RECIENTES --- */
.huepa-recent-history-wrapper {
    margin-top: 16px;
    border-top: 1px solid #e2e8f0;
    padding-top: 12px;
}

.huepa-history-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 10px 12px;
}

.huepa-history-title {
    font-size: 12px;
    color: #334155;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.huepa-history-chips-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.huepa-history-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 12px;
    transition: border-color 0.15s, background-color 0.15s;
    cursor: pointer;
}

.huepa-history-chip:hover {
    border-color: #2563eb;
    background-color: #eff6ff;
}

.huepa-chip-info {
    color: #0f172a;
}

.huepa-chip-date {
    font-size: 11px;
    color: #64748b;
    margin-left: auto;
    margin-right: 10px;
}

.huepa-chip-use-btn {
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.huepa-chip-use-btn:hover {
    background: #1d4ed8;
}

/* Tarjeta visual en Carrito, Checkout y Pedidos */
.huepa-player-inline-card {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 4px 10px;
    margin: 4px 0;
    font-size: 12px;
    color: #1e293b;
}

.huepa-badge-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    display: inline-block;
}

.huepa-uid-group {
    display: inline-flex;
    gap: 4px;
}

.huepa-player-label {
    font-weight: 700;
    color: #64748b;
}

.huepa-player-uid {
    font-weight: 600;
    color: #0f172a;
}

.huepa-vertical-divider {
    width: 1px;
    height: 14px;
    background: #cbd5e1;
}

.huepa-player-name {
    font-weight: 700;
    color: #0284c7;
}

/* Insignias en Mi Cuenta */
.huepa-myaccount-item-status {
    transition: background-color 0.2s;
}

.huepa-btn-client-retry:hover {
    background: #1d4ed8 !important;
}
