@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Libre+Baskerville:ital,wght@0,400..700;1,400..700&family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap');


/* Popup code */
.popup {
    position: fixed;
    top: 0px;
    left: 0px;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
}

/* Popup content box */
.popup-content {
    background: var(--admin-surface);
    padding: 20px;
    border-radius: 10px;
    width: 90vw;
    max-width: 800px;
    max-height: 90vh;
    position: relative;
    z-index: 999;
    overflow-y: auto;
}

/* Close button */
.popup-close {
    position: absolute;
    top: 7px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
}


.hidden {
    display: none !important;
}

/*
 * Bottom-docked popup (bulk-actions style)
 *
 * Usage:
 * <div id="myDockedPopup" class="popup-docked hidden">
 *   <div class="popup-docked-inner">
 *     <div class="popup-docked-body">...</div>
 *     <button type="button" class="popup-docked-close" onclick="closePopup('myDockedPopup')" aria-label="Close">×</button>
 *   </div>
 * </div>
 *
 * Add `popup-docked--close-left` to pin the close button on the left.
 * Note: do NOT add the `.popup` class, otherwise it will auto-close on
 * outside click / Escape via `shared/static/js/app.js`.
 */
.popup-docked {
    position: fixed;
    left: 50%;
    bottom: 16px;
    width: min(960px, calc(100% - 32px));
    background: var(--admin-surface);
    border-top: 1px solid rgba(16, 24, 40, 0.05);
    box-shadow: 0 -6px 20px rgba(2, 6, 23, 0.08);
    border-radius: 12px;
    z-index: 1200;
    transform: translateX(-50%);
}

.popup-docked-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    min-height: 50px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
}

.popup-docked-body {
    flex: 1 1 auto;
    min-width: 0;
}

.popup-docked-close {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid rgba(16, 24, 40, 0.06);
    background: var(--admin-surface-muted);
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.popup-docked--close-left .popup-docked-close {
    order: -1;
}

/* Make popups act like a bottom-sheet on mobile (match teams styles approach) */
@media (max-width: 899px) {
    .popup {
        align-items: flex-end;
        padding: 0 0 3px 0; /* give a little breathing room at bottom */
        justify-content: center; /* keep horizontally centered */
    }

    .popup-content {
        width: 100vw;
        max-width: 100vw;
        border-radius: 12px 12px 0 0; /* rounded top corners for sheet look */
        margin: 0; /* remove centering margins */
        padding: 18px 20px; /* slightly tighter padding for mobile */
        box-shadow: 0 -6px 20px rgba(0,0,0,0.12);
        max-height: 90vh; /* keep scroll inside */
        overflow: auto;
    }

    /* place close button slightly higher so it doesn't overlap the top edge */
    .popup-close {
        top: 10px;
        right: 16px;
        color: var(--admin-text);
    }
}