/**
 * Inflationomics Donation Modal Styles
 *
 * Branding: White background, black text, dark green (#0a5a1a) accents
 * Typography: Georgia/serif headings, system sans-serif body
 *
 * Created: 2025-02-02
 */

/* DONATION MODAL */
.donate-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: donateModalFadeIn 0.3s ease;
}

.donate-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.donate-modal-content {
    background-color: #ffffff;
    padding: 20px 25px;
    border: 2px solid #0a5a1a;
    border-radius: 8px;
    max-width: 450px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: donateModalSlideIn 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.donate-modal-header {
    color: #0a5a1a;
    font-size: 22px;
    font-family: Georgia, serif;
    margin-bottom: 12px;
    border-bottom: 2px solid #0a5a1a;
    padding-bottom: 8px;
    padding-right: 30px;
    line-height: 1.2;
}

.donate-modal-subtitle {
    font-size: 18px;
    font-weight: normal;
}

.donate-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #0a5a1a;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
}

.donate-modal-close:hover {
    color: #0d7322;
}

.donate-modal-close:focus {
    outline: 2px solid #0a5a1a;
    outline-offset: 2px;
}

/* FORM STYLES */
.donate-form label {
    display: block;
    margin-top: 15px;
    margin-bottom: 5px;
    font-family: Georgia, serif;
    color: #000000;
    font-weight: bold;
    font-size: 14px;
}

.donate-form label .required {
    color: #c00;
}

.donate-form input[type="text"],
.donate-form input[type="email"],
.donate-form input[type="tel"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #0a5a1a;
    border-radius: 4px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.donate-form input:focus {
    outline: none;
    border-color: #0d7322;
    box-shadow: 0 0 0 3px rgba(10, 90, 26, 0.15);
}

.donate-form input::placeholder {
    color: #999;
}

/* CITY/STATE/ZIP ROW */
.donate-form-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.donate-form-row .form-group {
    flex: 1;
    min-width: 100px;
}

.donate-form-row .form-group.city {
    flex: 2;
}

.donate-form-row .form-group.state {
    flex: 1;
}

.donate-form-row .form-group.zip {
    flex: 1;
}

/* AMOUNT FIELD */
.donate-form .amount-wrapper {
    position: relative;
}

.donate-form .amount-wrapper::before {
    content: '$';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 14px;
    pointer-events: none;
}

.donate-form .amount-wrapper input {
    padding-left: 25px;
}

/* SUBMIT BUTTON */
.donate-form button[type="submit"] {
    background: #0a5a1a;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-family: Georgia, serif;
    font-size: 16px;
    cursor: pointer;
    margin-top: 20px;
    width: 100%;
    transition: background 0.3s ease;
}

.donate-form button[type="submit"]:hover {
    background: #0d7322;
}

.donate-form button[type="submit"]:focus {
    outline: 2px solid #0a5a1a;
    outline-offset: 2px;
}

.donate-form button[type="submit"]:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* FOOTER NOTE */
.donate-form-footer {
    margin-top: 10px;
    padding-top: 0;
    border-top: none;
    font-size: 13px;
    color: #666;
    font-style: italic;
    text-align: center;
    line-height: 1.4;
}

/* CONTACT INFO VERSION */
.donate-contact-info {
    text-align: center;
    padding: 5px 0;
}

.donate-intro {
    font-size: 15px;
    margin-bottom: 12px;
    color: #333;
}

.donate-section {
    margin-bottom: 8px;
    font-size: 15px;
}

.donate-section a {
    color: #0a5a1a;
    text-decoration: none;
}

.donate-section a:hover {
    text-decoration: underline;
}

.donate-include {
    margin-top: 8px;
    margin-bottom: 5px;
    font-style: italic;
}

.donate-list {
    list-style: none;
    padding: 0;
    margin: 0 0 8px 0;
    text-align: left;
    display: inline-block;
}

.donate-list li {
    padding: 1px 0;
    padding-left: 18px;
    position: relative;
}

.donate-list li::before {
    content: "\2022";
    color: #0a5a1a;
    position: absolute;
    left: 5px;
}

.donate-staff-note {
    margin-top: 12px;
    font-size: 14px;
    font-style: italic;
    color: #444;
    line-height: 1.4;
}

.donate-divider {
    margin: 10px 0;
    font-style: italic;
    color: #666;
}

.donate-thankyou {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #ddd;
}

.donate-thankyou .checkmark {
    font-size: 28px;
    color: #0a5a1a;
    margin-bottom: 5px;
}

.donate-thankyou p {
    font-weight: bold;
    color: #0a5a1a;
    font-size: 15px;
    margin: 0;
}

/* SUCCESS MESSAGE */
.donate-success-message {
    display: none;
    text-align: center;
    padding: 40px 20px;
}

.donate-success-message.active {
    display: block;
}

.donate-success-message h3 {
    color: #0a5a1a;
    font-family: Georgia, serif;
    font-size: 24px;
    margin-bottom: 15px;
}

.donate-success-message p {
    color: #333;
    font-size: 16px;
    line-height: 1.6;
}

.donate-success-message .checkmark {
    font-size: 48px;
    color: #0a5a1a;
    margin-bottom: 15px;
}

/* ERROR MESSAGE */
.donate-error-message {
    background: #ffebee;
    border: 1px solid #c00;
    border-radius: 4px;
    padding: 10px 15px;
    margin-bottom: 15px;
    color: #c00;
    font-size: 14px;
    display: none;
}

.donate-error-message.active {
    display: block;
}

/* HONEYPOT (Anti-spam hidden field) */
.donate-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

/* ANIMATIONS */
@keyframes donateModalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes donateModalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* RESPONSIVE */
@media (max-width: 600px) {
    .donate-modal-content {
        padding: 20px;
        margin: 10px;
        max-height: calc(100vh - 20px);
    }

    .donate-modal-header {
        font-size: 20px;
    }

    .donate-modal-subtitle {
        font-size: 16px;
    }

    .donate-form-row {
        flex-direction: column;
        gap: 0;
    }

    .donate-form-row .form-group {
        min-width: 100%;
    }

    .donate-form button[type="submit"] {
        padding: 14px 20px;
    }
}

/* ACCESSIBILITY - REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
    .donate-modal,
    .donate-modal-content {
        animation: none;
    }

    .donate-form input,
    .donate-form button {
        transition: none;
    }
}
