/**
 * Estilos del Frontend - Sistema de Puntos y Recompensas
 * WC Rewards
 */

/* ===================================
   Widget de Puntos en el Carrito
   =================================== */

.wc-rewards-cart-widget {
    background: #f7f7f7;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.wc-rewards-cart-widget h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    color: #333;
    border-bottom: 2px solid #2c3e50;
    padding-bottom: 10px;
}

/* Balance de puntos */
.wc-rewards-balance {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    padding: 12px;
    background: #fff;
    border-radius: 5px;
    border-left: 4px solid #27ae60;
}

.wc-rewards-balance .wc-rewards-label {
    font-weight: 600;
    color: #555;
}

.wc-rewards-balance .wc-rewards-points {
    font-size: 24px;
    font-weight: bold;
    color: #27ae60;
}

.wc-rewards-balance .wc-rewards-value {
    color: #777;
    font-size: 14px;
}

/* Puntos aplicados */
.wc-rewards-applied {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 5px;
    padding: 15px;
    margin-top: 15px;
}

.wc-rewards-applied p {
    margin: 0 0 10px;
    color: #155724;
    font-weight: 500;
}

/* Formulario */
.wc-rewards-form {
    margin-top: 15px;
}

.wc-rewards-input-group {
    margin-bottom: 15px;
}

.wc-rewards-input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

/* Slider de puntos */
.wc-rewards-slider-container {
    margin: 15px 0;
}

.wc-rewards-slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #d3d3d3;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.wc-rewards-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #27ae60;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.wc-rewards-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #27ae60;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.wc-rewards-slider:hover::-webkit-slider-thumb {
    background: #229954;
}

.wc-rewards-slider:hover::-moz-range-thumb {
    background: #229954;
}

/* Input de puntos */
.wc-rewards-points-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    margin-top: 10px;
}

.wc-rewards-points-input:focus {
    border-color: #27ae60;
    outline: none;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

/* Previsualización del descuento */
.wc-rewards-preview {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding: 12px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 5px;
}

.wc-rewards-preview-label {
    font-weight: 600;
    color: #856404;
}

.wc-rewards-preview-value {
    font-size: 18px;
    font-weight: bold;
    color: #27ae60;
}

/* Hint text */
.wc-rewards-hint {
    display: block;
    margin-top: 8px;
    color: #777;
    font-size: 13px;
}

/* Botones */
.wc-rewards-apply-btn,
.wc-rewards-remove-btn {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wc-rewards-apply-btn {
    background: #27ae60;
    color: #fff;
}

.wc-rewards-apply-btn:hover {
    background: #229954;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(39, 174, 96, 0.3);
}

.wc-rewards-remove-btn {
    background: #e74c3c;
    color: #fff;
}

.wc-rewards-remove-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

/* ===================================
   Checkout - Información de Puntos
   =================================== */

.wc-rewards-checkout-info {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 20px;
}

.wc-rewards-checkout-info p {
    margin: 0 0 10px;
    color: #155724;
    font-weight: 500;
}

.wc-rewards-checkout-info p:last-child {
    margin-bottom: 0;
}

.wc-rewards-checkout-info a {
    color: #155724;
    text-decoration: underline;
    font-weight: 600;
}

.wc-rewards-checkout-info a:hover {
    color: #0d3d1f;
}

.wc-rewards-checkout-notice {
    background: #e3f2fd;
    border: 1px solid #90caf9;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.wc-rewards-checkout-notice p {
    margin: 0 0 10px;
    color: #1565c0;
}

.wc-rewards-checkout-notice p:last-child {
    margin-bottom: 0;
}

.wc-rewards-checkout-notice .button {
    background: #2196f3;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.wc-rewards-checkout-notice .button:hover {
    background: #1976d2;
    color: #fff;
}

.wc-rewards-points-to-earn td {
    color: #27ae60;
    font-weight: 600;
}

/* ===================================
   Aviso de puntos en el carrito
   =================================== */

.wc-rewards-cart-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    margin-bottom: 15px;
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    border-radius: 4px;
}

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

@media (max-width: 768px) {
    .wc-rewards-cart-widget {
        padding: 15px;
    }

    .wc-rewards-cart-widget h3 {
        font-size: 16px;
    }

    .wc-rewards-balance {
        flex-wrap: wrap;
    }

    .wc-rewards-balance .wc-rewards-points {
        font-size: 20px;
    }

    .wc-rewards-preview {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}
