/*
 * Plugin Name: PLAG Donation Module
 * File: css/modal-style.css
 */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    /* Dark overlay */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100000;
    /* High z-index to ensure it's on top */
    opacity: 1;
    /* Initial state for animation */
    transition: opacity 0.3s ease-in-out;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    /* Disables interaction when hidden */
}

.modal-content {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    max-width: 90%;
    /* Max width relative to viewport */
    max-height: 90vh;
    /* Max height relative to viewport height */
    overflow-y: auto;
    /* Enable scrolling for content if it overflows */
    transform: translateY(0);
    /* Initial state for animation */
    transition: transform 0.3s ease-in-out;
    padding: 20px;
    /* Add padding to prevent content touching edges */
}

/* Animation for modal entry */
.modal-overlay.hidden .modal-content {
    transform: translateY(-50px);
    /* Move slightly up when hidden */
}

.modal-close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #4a5568;
    /* Gray-700 */
    line-height: 1;
    padding: 0;
    z-index: 10;
    /* Ensure button is above modal content */
    transition: color 0.2s ease;
}

.modal-close-button:hover {
    color: #e53e3e;
    /* Red-600 */
}

/* Style for the trigger button if you use the default class */
.plag-donation-modal-trigger-btn {
    display: inline-block;
    padding: 17px 34px;
    border-radius: 50px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-family: 'Inter', sans-serif;

    border-style: solid;
    border-width: 2px;
    border-color: var(--ast-global-color-0);
    background-color: var(--ast-global-color-0);
    color: var(--ast-global-color-2);
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    line-height: 1em;
    text-transform: uppercase;
    letter-spacing: 0;
    font-size: 15px;
    font-size: 0.9375rem;
}

.plag-donation-modal-trigger-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments for modal content */
@media (max-width: 600px) {
    .modal-content {
        max-width: 95%;
        margin: 10px;
        padding: 15px;
    }

    .modal-close-button {
        top: 10px;
        right: 10px;
        font-size: 1.8rem;
    }
}