/*
 * Photo gallery (modules/coppermine) styles.
 * Ported from the Coppermine "default" theme used on montana-dnes.com
 * (modules/coppermine/themes/default/style.css), scoped under .cpg-gallery so
 * nothing leaks into the site theme, with image backgrounds replaced by CSS.
 * The lightbox styles are scoped under .cpg-lightbox.
 */

.cpg-gallery .maintable { margin: 0 auto; }
.cpg-gallery .topmenu { display: block; margin: 4px 0 14px; }
.cpg-gallery .ccde { border: 1px solid #CCCCCC; background: #F1F1F1; color: #2D496E; padding: 20px 6px; }
.cpg-gallery .tableh1 { background: #2D496E; color: #FFFFFF; padding: 3px 10px; text-align: left; }
.cpg-gallery .tableh1_compact { background: #2D496E; color: #FFFFFF; padding: 2px 5px; }
.cpg-gallery .tableh2 { background: #F5F5F5; color: #000000; padding: 5px 10px; text-align: left; }
.cpg-gallery .tableh2_compact { background: #CCCCCC; color: #000000; padding: 2px 5px; text-align: left; }
.cpg-gallery .tableb { border: 1px solid #CCCCCC; text-align: left; }
.cpg-gallery .tableb_compact { padding: 2px 5px; text-align: left; }
.cpg-gallery .album_stat { font-size: 10px; margin: 5px 0; }
.cpg-gallery .thumb_title { font-weight: bold; font-size: 9px; padding: 2px; display: block; }
.cpg-gallery .thumb_caption { font-size: 10px; padding: 1px; display: block; }
.cpg-gallery .user_thumb_infobox { margin: 1px 0; }
.cpg-gallery .user_thumb_infobox th { font-weight: bold; font-size: 12px; text-align: center; }
.cpg-gallery .user_thumb_infobox td { font-size: 10px; text-align: center; }
.cpg-gallery .user_thumb_infobox a { text-decoration: none; }
.cpg-gallery .user_thumb_infobox a:hover { text-decoration: underline; }

.cpg-gallery .navmenu {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    color: #FFFFFF;
    font-size: 12px;
    background: #2D496E;
    border-style: none;
}
.cpg-gallery .navmenu a { position: relative; display: block; padding: 2px 5px; text-decoration: none; color: #FFFFFF; }
.cpg-gallery .navmenu a:hover { background: #CCCCCC; text-decoration: none; color: #000000; }
.cpg-gallery .nav-icon { font-size: 15px; line-height: 16px; font-weight: bold; }
.cpg-gallery .nav-disabled { display: block; padding: 2px 5px; color: #7A8CA6; cursor: default; }
.cpg-gallery .tab-current { background: #F1F1F1; color: #000000; padding: 2px 5px; }
.cpg-gallery .tab-gap { padding: 2px 3px; }

.cpg-gallery .comment_date { color: #5F5F5F; font-size: 10px; vertical-align: middle; }
.cpg-gallery .image { border: 1px solid #000000; margin: 2px; }
.cpg-gallery .thumbnails { padding: 5px; }
.cpg-gallery .statlink { color: #FFFFFF; text-decoration: none; font-weight: bold; }
.cpg-gallery a.statlink, .cpg-gallery .statlink a { text-decoration: none; color: #FFFFFF; }
.cpg-gallery a.statlink:hover, .cpg-gallery .statlink a:hover { color: #FFFFFF; text-decoration: underline; }
.cpg-gallery p.statlink { margin: 0; }
.cpg-gallery .alblink a, .cpg-gallery .alblink a:hover { text-decoration: underline; color: #000000; }
.cpg-gallery .catlink { display: block; margin-bottom: 2px; }
.cpg-gallery .gap { height: 17px; }
.cpg-gallery .rating-stars { color: #D4A017; font-size: 14px; letter-spacing: 1px; }

.cpg-gallery .img_frame { border: 3px solid #2D496E; background-color: #F5F5F5; margin: 30px auto; }
.cpg-gallery .img_frame img { display: block; max-width: 100%; height: auto; cursor: zoom-in; }
.cpg-gallery .img_caption_table { border: none; background-color: #F5F5F5; width: 100%; margin: 0; }
.cpg-gallery .img_caption_table th {
    background: #F5F5F5; font-size: 12px; color: #000000; padding: 4px 10px; border-top: 1px solid #FFFFFF; text-align: center;
}
.cpg-gallery .img_caption_table td { background: #F5F5F5; padding: 6px 10px; border-top: 1px solid #FFFFFF; text-align: center; }

/* Film strip (replaces tile.gif with a CSS "film" edge). */
.cpg-gallery .filmstrip { margin: 17px auto 0; border-collapse: collapse; }
.cpg-gallery .filmstrip .edge {
    height: 14px;
    background: #000 repeating-linear-gradient(90deg, #000 0 6px, #666 6px 12px) center / 100% 6px no-repeat;
}
.cpg-gallery .filmstrip .frames { background: #000000; text-align: center; }
.cpg-gallery .filmstrip .thumbnail { padding: 5px; border-left: 1px solid #FFFFFF; border-right: 1px solid #FFFFFF; }
.cpg-gallery .filmstrip .current img { border-color: #FFCC00; }

/* Lightbox for the full-size picture. */
.cpg-lightbox {
    position: fixed; inset: 0; z-index: 10000;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    font-family: Verdana, Arial, Helvetica, sans-serif;
}
.cpg-lightbox[hidden] { display: none; }
.cpg-lightbox figure { margin: 0; text-align: center; max-width: 94vw; }
.cpg-lightbox img {
    display: block; margin: 0 auto; max-width: 92vw; max-height: 84vh;
    border: 4px solid #FFFFFF; background: #FFFFFF; box-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
}
.cpg-lightbox figcaption { color: #FFFFFF; font-size: 12px; margin-top: 8px; }
.cpg-lightbox figcaption .cpg-lb-count { color: #BBBBBB; margin-left: 10px; }
.cpg-lightbox button {
    position: absolute; border: 0; background: rgba(45, 73, 110, 0.85); color: #FFFFFF;
    font-size: 32px; line-height: 1; cursor: pointer; border-radius: 3px; padding: 8px 14px;
}
.cpg-lightbox button:hover, .cpg-lightbox button:focus-visible { background: #CCCCCC; color: #000000; outline: none; }
.cpg-lightbox button[disabled] { opacity: 0.25; cursor: default; }
.cpg-lightbox .cpg-lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.cpg-lightbox .cpg-lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.cpg-lightbox .cpg-lb-close { right: 12px; top: 12px; font-size: 26px; }
.cpg-lightbox .cpg-lb-loading img { opacity: 0.4; }
.cpg-gallery td[align="center"] { text-align: center; }
