/* =============================================================================
   PATH: static/css/donations.css
   CONNECTS TO: CALLED BY: CAMBIOS_LAYOUT.html, comunidades/templates/_layout_comunidades.html, templates/layout.html, templates/layout_futuristic.html
   DESCRIPTION: Recurso frontend (CSS)
   ============================================================================= */

/**
 * DONATIONS MODULE - Isolated CSS
 * All styles namespaced under .donations-module to prevent conflicts
 * Version: 1.0.0
 */

/* ============================================================================
   NAMESPACE: All styles scoped to .donations-module
   This ensures NO conflicts with other modules
   ============================================================================ */

/* === DONATION BUTTON (for menus) === */
.donations-module .donate-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 50%, #ff8e53 100%);
    border: none;
    border-radius: 25px;
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    text-decoration: none;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.donations-module .donate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.donations-module .donate-btn:hover::before {
    left: 100%;
}

.donations-module .donate-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 25px rgba(255, 107, 107, 0.5);
}

.donations-module .donate-btn:active {
    transform: translateY(0) scale(0.98);
}

.donations-module .donate-btn-icon {
    font-size: 18px;
    animation: pulse-heart 2s infinite;
}

@keyframes pulse-heart {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* === MINI BUTTON (for compact menus) === */
.donations-module .donate-btn-mini {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 20px;
}

.donations-module .donate-btn-mini .donate-btn-icon {
    font-size: 16px;
}

/* === ICON ONLY BUTTON === */
.donations-module .donate-btn-icon-only {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
}

.donations-module .donate-btn-icon-only .donate-btn-text {
    display: none;
}

/* === SIDEBAR BUTTON === */
.donations-module .donate-btn-sidebar {
    width: 100%;
    justify-content: flex-start;
    padding: 12px 16px;
    border-radius: 12px;
    margin: 8px 0;
}

/* === FLOATING BUTTON === */
.donations-module .donate-btn-floating {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    padding: 0;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 6px 30px rgba(255, 107, 107, 0.5);
}

.donations-module .donate-btn-floating .donate-btn-text {
    display: none;
}

.donations-module .donate-btn-floating .donate-btn-icon {
    font-size: 24px;
}

/* === MODAL OVERLAY === */
.donations-module .donate-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.donations-module .donate-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* === MODAL CONTAINER === */
.donations-module .donate-modal {
    background: linear-gradient(145deg, rgba(30, 30, 45, 0.95), rgba(20, 20, 35, 0.98));
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 24px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5), 0 0 60px rgba(255, 107, 107, 0.15);
}

.donations-module .donate-modal-overlay.active .donate-modal {
    transform: scale(1) translateY(0);
}

/* === MODAL HEADER === */
.donations-module .donate-modal-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.donations-module .donate-modal-title {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.donations-module .donate-modal-title-icon {
    font-size: 28px;
}

.donations-module .donate-modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #ffffff;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.donations-module .donate-modal-close:hover {
    background: rgba(255, 107, 107, 0.3);
    transform: rotate(90deg);
}

/* === MODAL BODY === */
.donations-module .donate-modal-body {
    padding: 24px;
}

/* === AMOUNT PRESETS === */
.donations-module .donate-amounts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.donations-module .donate-amount-btn {
    padding: 16px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.donations-module .donate-amount-btn:hover {
    background: rgba(255, 107, 107, 0.15);
    border-color: rgba(255, 107, 107, 0.5);
}

.donations-module .donate-amount-btn.selected {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.3), rgba(255, 142, 83, 0.3));
    border-color: #ff6b6b;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.3);
}

/* === CUSTOM AMOUNT === */
.donations-module .donate-custom-amount {
    margin-bottom: 20px;
}

.donations-module .donate-input-group {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.donations-module .donate-input-group:focus-within {
    border-color: #ff6b6b;
}

.donations-module .donate-currency {
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-weight: 600;
    font-size: 16px;
}

.donations-module .donate-input {
    flex: 1;
    padding: 14px 16px;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    outline: none;
}

.donations-module .donate-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* === STEP LABELS === */
.donations-module .donate-step-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    margin-top: 20px;
}

.donations-module .donate-step-label:first-of-type {
    margin-top: 0;
}

/* === FORM FIELDS === */
.donations-module .donate-form-group {
    margin-bottom: 16px;
}

.donations-module .donate-label {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.donations-module .donate-select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: #ffffff;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}

.donations-module .donate-select:focus {
    border-color: #ff6b6b;
}

.donations-module .donate-select option {
    background: #1e1e2d;
    color: #ffffff;
}

.donations-module .donate-textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: #ffffff;
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s;
}

.donations-module .donate-textarea:focus {
    border-color: #ff6b6b;
}

.donations-module .donate-textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* === CHECKBOXES === */
.donations-module .donate-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.donations-module .donate-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    cursor: pointer;
}

.donations-module .donate-checkbox {
    width: 20px;
    height: 20px;
    accent-color: #ff6b6b;
    cursor: pointer;
}

/* === RECURRING OPTIONS === */
.donations-module .donate-recurring-options {
    display: none;
    padding: 16px;
    background: rgba(255, 107, 107, 0.1);
    border-radius: 12px;
    margin-top: 12px;
}

.donations-module .donate-recurring-options.show {
    display: block;
}

.donations-module .donate-frequency-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.donations-module .donate-frequency-btn {
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #ffffff;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.donations-module .donate-frequency-btn.selected {
    background: #ff6b6b;
    border-color: #ff6b6b;
}

/* === PAYMENT METHODS === */
.donations-module .donate-payment-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.donations-module .donate-payment-btn {
    padding: 16px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: #ffffff;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.donations-module .donate-payment-btn:hover {
    background: rgba(255, 107, 107, 0.15);
    border-color: rgba(255, 107, 107, 0.5);
}

.donations-module .donate-payment-btn.selected {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.3), rgba(255, 142, 83, 0.3));
    border-color: #ff6b6b;
}

.donations-module .donate-payment-icon {
    font-size: 24px;
}

/* === SUBMIT BUTTON === */
.donations-module .donate-submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 50%, #ff8e53 100%);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.4);
}

.donations-module .donate-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(255, 107, 107, 0.5);
}

.donations-module .donate-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.donations-module .donate-submit-btn-icon {
    font-size: 20px;
}

/* === SECURITY NOTE === */
.donations-module .donate-security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

.donations-module .donate-security-icon {
    font-size: 14px;
    color: #4ade80;
}

/* === CAMPAIGNS LIST === */
.donations-module .donate-campaigns {
    margin-bottom: 20px;
}

.donations-module .donate-campaigns-title {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 12px;
}

.donations-module .donate-campaign-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 8px;
}

.donations-module .donate-campaign-item:hover {
    background: rgba(255, 107, 107, 0.1);
}

.donations-module .donate-campaign-item.selected {
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.15);
}

.donations-module .donate-campaign-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #ff6b6b, #ff8e53);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.donations-module .donate-campaign-info {
    flex: 1;
}

.donations-module .donate-campaign-name {
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.donations-module .donate-campaign-progress {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.donations-module .donate-campaign-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #ff8e53);
    border-radius: 3px;
    transition: width 0.3s;
}

.donations-module .donate-campaign-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

/* === SUCCESS MESSAGE === */
.donations-module .donate-success {
    text-align: center;
    padding: 40px 20px;
}

.donations-module .donate-success-icon {
    font-size: 64px;
    margin-bottom: 16px;
    animation: success-bounce 0.6s ease;
}

@keyframes success-bounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.donations-module .donate-success-title {
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.donations-module .donate-success-message {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-bottom: 24px;
}

.donations-module .donate-success-btn {
    padding: 12px 32px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.donations-module .donate-success-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.donations-module .donate-success-actions {
    margin: 24px 0 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.donations-module .donate-success-btn-primary {
    background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
    border-color: #ff6b6b;
}

.donations-module .donate-success-btn-primary:hover {
    background: linear-gradient(135deg, #ff7b7b, #ee6a6a);
}

.donations-module .donate-success-redirect {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    margin: 0;
}

.donations-module .donate-success-btn-close {
    margin-top: 8px;
}

/* Stripe card element */
.donations-module .donate-card-element {
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
}

.donations-module .donate-card-errors {
    color: #ff6b6b;
    font-size: 13px;
    margin-top: 8px;
    display: none;
}

.donations-module .donate-payment-note {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    margin-top: 8px;
}

.donations-module .donate-frequency-choices .donate-frequency-grid {
    grid-template-columns: repeat(3, 1fr);
}

/* === RESPONSIVE === */
@media (max-width: 600px) {
    .donations-module .donate-modal {
        width: 95%;
        max-height: 85vh;
        margin: 10px;
    }

    .donations-module .donate-amounts {
        grid-template-columns: repeat(2, 1fr);
    }

    .donations-module .donate-payment-methods {
        grid-template-columns: repeat(2, 1fr);
    }

    .donations-module .donate-frequency-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .donations-module .donate-btn-floating {
        bottom: 80px;
        right: 16px;
    }
}

/* === DARK MODE ADJUSTMENTS (already dark by default) === */
@media (prefers-color-scheme: light) {
    /* Keep dark theme for donations modal for consistency */
}

/* === ANIMATIONS === */
.donations-module .donate-fade-in {
    animation: donate-fade-in 0.3s ease forwards;
}

@keyframes donate-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === LOADING STATE === */
.donations-module .donate-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.donations-module .donate-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: donate-spin 0.8s linear infinite;
}

@keyframes donate-spin {
    to { transform: rotate(360deg); }
}

/* === TOOLTIP === */
.donations-module .donate-tooltip {
    position: relative;
}

.donations-module .donate-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.9);
    color: #ffffff;
    font-size: 12px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    pointer-events: none;
    margin-bottom: 8px;
}

.donations-module .donate-tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}
