/* Adalo Tools Popup Styles */
:root {
    --at-popup-overlay-bg: rgba(0, 0, 0, 0.7);
    --at-popup-bg: #ffffff;
    --at-popup-text: #333333;
    --at-popup-title: #111111;
    --at-popup-btn1-bg: #0073aa;
    --at-popup-btn1-bg-hover: #006799;
    --at-popup-btn1-text: #ffffff;
    --at-popup-btn1-text-hover: #ffffff;
    --at-popup-btn1-radius: 4px;
    --at-popup-btn1-border-width: 0px;
    --at-popup-btn1-border-color: #0073aa;
    --at-popup-btn2-bg: #f0f0f1;
    --at-popup-btn2-bg-hover: #e0e0e1;
    --at-popup-btn2-text: #0073aa;
    --at-popup-btn2-text-hover: #0073aa;
    --at-popup-btn2-radius: 4px;
    --at-popup-btn2-border-width: 0px;
    --at-popup-btn2-border-color: #0073aa;
    --at-popup-radius: 8px;
    --at-popup-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.at-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--at-popup-overlay-bg);
    display: flex;
    /* Removed center alignment to allow scrolling */
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 20px;
    overflow-y: auto; /* Enable page-level scrolling */
}

.at-popup-overlay.at-open {
    opacity: 1;
    visibility: visible;
}

.at-popup-container {
    background: var(--at-popup-bg);
    color: var(--at-popup-text);
    width: 100%;
    max-width: 620px;
    padding: 30px;
    border-radius: var(--at-popup-radius);
    box-shadow: var(--at-popup-shadow);
    text-align: left;
    position: relative;
    /* Transform removed to avoid complications with scrolling flow */
    transform: translateY(20px); 
    transition: transform 0.3s ease;
    /* max-height removed to allow full height expansion */
    max-height: none; 
    overflow-y: visible; /* Disable internal scroll */
    margin: auto; /* Center vertically and horizontally in flex container */
}

.at-popup-overlay.at-open .at-popup-container {
    transform: translateY(0);
}

.at-popup-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--at-popup-title);
    line-height: 1.3;
}

.at-popup-content {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 30px;
    text-align: left; /* Or center, depending on preference, usually left reads better for text */
}

.at-popup-content p {
    margin-bottom: 1em;
}

.at-popup-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.at-popup-btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px; /* Fallback */
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-align: center;
}

.at-popup-btn-confirm {
    background-color: var(--at-popup-btn1-bg);
    color: var(--at-popup-btn1-text);
    border-radius: var(--at-popup-btn1-radius);
    border: var(--at-popup-btn1-border-width) solid var(--at-popup-btn1-border-color);
}

.at-popup-btn-confirm:hover {
    background-color: var(--at-popup-btn1-bg-hover);
    color: var(--at-popup-btn1-text-hover);
}

.at-popup-btn-redirect {
    background-color: var(--at-popup-btn2-bg);
    color: var(--at-popup-btn2-text);
    border-radius: var(--at-popup-btn2-radius);
    border: var(--at-popup-btn2-border-width) solid var(--at-popup-btn2-border-color);
}

.at-popup-btn-redirect:hover {
    background-color: var(--at-popup-btn2-bg-hover);
    color: var(--at-popup-btn2-text-hover);
}

@media (min-width: 600px) {
    .at-popup-buttons {
        flex-direction: row;
        justify-content: center;
    }
}
