/**
 * Estilos para el frontend del plugin Donaciones Movimental
 */

/* Contenedor principal */
.donaciones-container {
    max-width: 600px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Tarjeta de donación */
.donaciones-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #e1e5e9;
    transition: box-shadow 0.3s ease;
}

.donaciones-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Imagen */
.donaciones-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: #f8f9fa;
}

.donaciones-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.donaciones-image:hover img {
    transform: scale(1.05);
}

/* Contenido */
.donaciones-content {
    padding: 30px;
}

.donaciones-title {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.donaciones-description {
    color: #5a6c7d;
    line-height: 1.6;
    margin-bottom: 25px;
}

.donaciones-description p {
    margin: 0 0 10px 0;
}

/* Rango de donación */
.donaciones-range {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    border-left: 4px solid #3498db;
}

.donaciones-range p {
    margin: 0 0 8px 0;
    color: #2c3e50;
}

.donaciones-amounts {
    font-size: 20px;
    font-weight: 600;
    color: #27ae60;
}

/* Formulario */
.donaciones-form {
    margin-top: 25px;
}

.donaciones-amount-section {
    margin-bottom: 25px;
}

.donaciones-label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
}

/* Input de monto */
.donaciones-amount-input {
    position: relative;
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    padding: 0;
    margin-bottom: 15px;
    transition: border-color 0.3s ease;
}

.donaciones-amount-input:focus-within {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.donaciones-currency {
    padding: 15px 0 15px 15px;
    font-size: 18px;
    font-weight: 600;
    color: #7f8c8d;
}

.donaciones-monto-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 15px 10px;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    background: transparent;
}

.donaciones-currency-suffix {
    padding: 15px 15px 15px 0;
    font-size: 14px;
    font-weight: 500;
    color: #7f8c8d;
}

/* Slider */
.donaciones-range-slider {
    margin: 20px 0;
}

.donaciones-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e1e5e9;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.donaciones-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
    border: 3px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.donaciones-slider::-webkit-slider-thumb:hover {
    background: #2980b9;
    transform: scale(1.1);
}

.donaciones-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
    border: 3px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

/* Montos rápidos */
.donaciones-quick-amounts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin: 20px 0;
}

.donaciones-quick-amount {
    background: #ffffff;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.donaciones-quick-amount:hover {
    border-color: #3498db;
    background: #f8f9fa;
    transform: translateY(-2px);
}

.donaciones-quick-amount.active {
    background: #3498db;
    border-color: #3498db;
    color: #ffffff;
}

/* Botón de envío */
.donaciones-submit-section {
    margin-top: 30px;
}

.donaciones-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 18px 24px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.donaciones-submit-btn:hover {
    background: linear-gradient(135deg, #2980b9, #21618c);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
}

.donaciones-submit-btn:active {
    transform: translateY(0);
}

.donaciones-submit-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.donaciones-btn-loading {
    display: none;
}

.donaciones-submit-btn.loading .donaciones-btn-text {
    display: none;
}

.donaciones-submit-btn.loading .donaciones-btn-loading {
    display: inline-block;
}

/* Mensajes */
.donaciones-messages {
    margin-top: 20px;
}

.donaciones-message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.donaciones-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.donaciones-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.donaciones-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Spinner de carga */
.donaciones-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: donaciones-spin 1s linear infinite;
}

@keyframes donaciones-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Estados de carga */
.donaciones-loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
    .donaciones-container {
        margin: 10px;
        max-width: none;
    }
    
    .donaciones-content {
        padding: 20px;
    }
    
    .donaciones-title {
        font-size: 20px;
    }
    
    .donaciones-quick-amounts {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .donaciones-monto-input {
        font-size: 16px;
    }
    
    .donaciones-submit-btn {
        font-size: 16px;
        padding: 16px 20px;
    }
}

@media (max-width: 480px) {
    .donaciones-image {
        height: 200px;
    }
    
    .donaciones-content {
        padding: 15px;
    }
    
    .donaciones-title {
        font-size: 18px;
    }
    
    .donaciones-range {
        padding: 15px;
    }
    
    .donaciones-quick-amounts {
        grid-template-columns: 1fr;
    }
}

/* Animaciones */
@keyframes donaciones-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.donaciones-card {
    animation: donaciones-fadeIn 0.6s ease-out;
}

/* Accesibilidad */
.donaciones-submit-btn:focus,
.donaciones-quick-amount:focus,
.donaciones-monto-input:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Modo oscuro (opcional) */
@media (prefers-color-scheme: dark) {
    .donaciones-card {
        background: #2c3e50;
        border-color: #34495e;
        color: #ecf0f1;
    }
    
    .donaciones-title {
        color: #ecf0f1;
    }
    
    .donaciones-description {
        color: #bdc3c7;
    }
    
    .donaciones-range {
        background: #34495e;
        color: #ecf0f1;
    }
    
    .donaciones-amount-input {
        background: #34495e;
        border-color: #4a5f7a;
    }
    
    .donaciones-monto-input {
        color: #ecf0f1;
    }
    
    .donaciones-quick-amount {
        background: #34495e;
        border-color: #4a5f7a;
        color: #ecf0f1;
    }
}