/* epaper/static/epaper/css/main_page.css */

body {
    background: #222;
    /* background: white; */
}
main { padding: 0 !important; margin: 0 !important; }

/* ── Toolbar ── */
.viewer-toolbar {
    background: #333;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.viewer-toolbar .edition-date {
    color: #fff;
    font-weight: bold;
    font-size: 16px;
}

.viewer-toolbar .btn {
    font-size: 13px;
}

/* ── Layout ── */
.epaper-layout {
    position: relative;
}

/* ── Archive dropdown calendar ── */
.archive-dropdown {
    position: relative;
    display: inline-block;
}

.calendar-popup {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #2b2b2b;
    border: 1px solid #555;
    border-radius: 8px;
    padding: 12px;
    z-index: 1000;
    width: 240px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.calendar-popup.open { display: block; }

.cal-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.cal-nav span {
    color: #fff;
    font-weight: bold;
    font-size: 13px;
}

.cal-nav button {
    background: none;
    border: 1px solid #555;
    color: #ccc;
    border-radius: 4px;
    padding: 2px 8px;
    cursor: pointer;
    font-size: 12px;
}

.cal-nav button:hover { background: #444; }


.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.cal-head {
    text-align: center;
    font-size: 10px;
    color: #888;
    padding: 4px 0;
}

.cal-day {
    text-align: center;
    padding: 6px 2px;
    border-radius: 4px;
    font-size: 12px;
    color: #555;
}  

.cal-day.has-edition {
    background: #444;
    color: #fff;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.15s;
}

.cal-day.has-edition:hover { background: #e63946; }
.cal-day.today { border: 1px solid #e63946; color: #ccc; }
.cal-day.selected { background: #e63946 !important; color: #fff; }

.edition-info {
    margin-top: 8px;
    border-top: 1px solid #444;
    padding-top: 8px;
}


/* ── Flipbook ── */
.flipbook-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 40px;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

#flipbook {
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    visibility: hidden;
    /* visibility: visible; */
}

#flipbook .page {
    background: #fff;
    overflow: hidden;
}

#flipbook .page img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: default;
}


/* ── Page nav ── */
.page-nav {
    background: #333;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.page-nav span {
    color: #ccc;
    font-size: 14px;
    min-width: 120px;
    text-align: center;
}

/* ── Clip ── */
#clip-selection {
    position: absolute;
    border: 2px dashed #f00;
    background: rgba(255,0,0,0.08);
    pointer-events: none;
    display: none;
    z-index: 999;
}

#clip-modal .modal-body img {
    width: 100%;
    border: 1px solid #ddd;
}

/* ── Loading ── */
#loading {
    color: #ccc;
    font-size: 14px;
    display: none;
    padding: 20px;
}

.highlight_clip:hover {
    /* border: 1px solid rgba(230, 57, 70, 0.08) !important; */

    background: rgba(176, 38, 47, 0.1) !important;
}
/* .highlight_clip.adminClipMode {
    pointer-events: none;
} */
/* ── Media queries (setting for Mobile) ── */
@media (max-width: 576px) {
    .viewer-toolbar {
        align-items: flex-start;
    }

    .viewer-toolbar .edition-date {
        width: 100%;
        font-size: 14px;
    }

    .viewer-toolbar .btn {
        font-size: 12px;
        padding: 4px 8px;
    }

    .calendar-popup {
        position: fixed;
        top: 115px;
        left: 12px;
        right: 12px;
        width: auto;
        max-height: 70vh;
        overflow-y: auto;
        z-index: 2000;
    }

    .flipbook-wrapper {
        padding: 12px 8px;
    }
}
/* END Media queries */


