
.photo-wrapper {
    position: relative;
    display: inline-block;
}

/* modal 影片 */
/* --------------------------- */
/* modal-body 整體 */
.movie_modal-body {
    display: flex;
    flex-direction: column;
    padding: 0;
    background: #000;
}

/* --------------------------- */
/* movieTitle */
#movieTitle {
    padding: 8px 16px;
    color: #fff;
    font-size: 1.25rem;
    text-align: center;
}

/* --------------------------- */
/* movie-content：影片區 */
.movie-content {
    flex-grow: 1; /* 撐滿剩餘空間 */
    display: flex;
    justify-content: center;
    align-items: center;
    max-height: 80vh; /* 可依需求調整 */
}

/* videoWrapper */
#videoWrapper {
    max-width: 100%;
    max-height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* video 本體 */
#videoWrapper video {
    max-width: 100%;
    max-height: calc(100vh - 90px);
    background: #000;
}

/* --------------------------- */
/* 橫向影片 */
.video-landscape video {
    aspect-ratio: 16 / 9;
    width: 100%;
    height: auto;
}

/* 直向影片 */
.video-portrait video {
    aspect-ratio: 9 / 16;
    width: auto;
    height: 100%;
}

/* --------------------------- */
/* modal-header 管理按鈕 + close */
.movie-header .d-flex {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
}

.movie-header .btn-close {
    margin-left: auto; /* 推到右側 */
    height: 36px;
    width: 36px;
}

/* 管理按鈕 */
.movie-header .btn {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
}

/* --------------------------- */
/* modal-footer 可選 */
.modal-footer {
    border: 0;
    padding: 4px 16px;
    text-align: center;
    font-size: 0.875rem;
    color: #ccc;
}

/* --------------------------- */
/* 疊在 a 上面 */
.ImageCheckbox {
    position: absolute;
    inset: 0;               /* top/right/bottom/left = 0 */
    z-index: 10;
}

/* 半透明遮罩 */
.ImageCheckbox .mask {
    position: absolute;
    inset: 0;
    background: white;
    opacity: 0.5;
}

/* checkbox 區塊 */
.ImageCheckbox .checkbox-box {
    position: absolute;
    top: 10px;
    left: 28px;
    background: #fff;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    pointer-events: auto;  /* checkbox 可以點 */
}

.ImageCheckbox label{
    background: #fff;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

body.offcanvas-active {
    overflow: hidden;
}

.offcanvas-header {
    display: none;
}

.screen-darken {
    height: 100%;
    width: 0%;
    z-index: 30;
    position: fixed;
    top: 0;
    right: 0;
    opacity: 0;
    visibility: hidden;
    background-color: rgba(34, 34, 34, 0.6);
    transition: opacity .2s linear, visibility 0.2s, width 2s ease-in;
}

.screen-darken.active {
    z-index: 10;
    transition: opacity .3s ease, width 0s;
    opacity: 1;
    width: 100%;
    visibility: visible;
}

.page_title {
    display: none;
}

.menu_bar{
    display: none;
    position: fixed;
    z-index: 1000;
    background-color: rgba(224, 224, 224, 0.9);
    width: 100%;
    /*padding: 0.5rem 1rem 0.75rem;*/
    top: 0;
}

@media all and (max-width: 991px) {

    #id_albums_container{
        margin-top: 3.5rem;
    }

    .navbar-nav {
        margin-top: 1rem;
    }
    .menu_bar {
        /*padding: 0 1rem 0.25rem;*/
    }
    .page_title {
        display: inline-block;
    }

    .offcanvas-header {
        display: block;
    }

    .mobile-offcanvas {
        visibility: hidden;
        transform: translateX(-100%);
        border-radius: 0;
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        z-index: 1200;
        width: 80%;
        overflow-y: scroll;
        overflow-x: hidden;
        transition: visibility .3s ease-in-out, transform .3s ease-in-out;
    }

    .mobile-offcanvas.show {
        visibility: visible;
        transform: translateX(0);
    }

    .mobile-offcanvas .container, .mobile-offcanvas .container-fluid {
        display: block;
    }
    .menu_bar {
        display: block !important;
    }
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.8);
}

.navbar-dark .navbar-nav .nav-link.active, .navbar-dark .navbar-nav .show>.nav-link {
    background-color: #fff6;
}
#svg_logo path{
    fill: #f00;
}
#drag-area {
    width: 100%;
    border: 3px dotted #0B85A1;
    color: #92AAB0;
    height: 80px;
    line-height: 80px;
    text-align: center;
    border-radius: 0.5rem;
}
.progressBar{
    height: 22px;
    border: 1px solid #ddd;
    border-radius: 5px;
}
.progressBar div{
    color: #fff;
    text-align: right;
    line-height: 22px;
    width: 0;
    background-color: #0ba1b5;
    border-radius: 3px;
}
.filename{
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.box{
    height: 300px;
    border: 1px solid rgba(214, 214, 214, 0.8);
    position: relative;
}
.cover_text {
    width: 100%;
    right: 0;
    font-size: .8rem;
    word-wrap: break-word;
    position: absolute;
    color: #000;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.75);
    padding: 2px 8px;
    word-break: break-all;
}
.cover_text>.Date{
    font-size: 1rem;
    font-weight: bold;
}

.text {
    width: 100%;
    font-size: .8rem;
    word-wrap: break-word;
    position: relative;
    color: #000;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.75);
    padding: 2px 8px;
    word-break: break-all;
    max-width: 300px;
}

section{
    margin-top: 0;
}

#albums_title{
    font-size: 1.25rem;
}

@media all and (max-width: 992px) {
    section{
        /**/
    }
    .dropdown-item{
        padding: 0.5rem 1rem;
        margin: 0.25rem auto;
    }

    #albums_title {
        margin-top: 38px;
    }
}

fieldset{
    border: 1px solid #999;
    padding: 1rem;
}
legend{
    float: none;
    width: auto;
    padding: 0 0.5rem;
    margin: 0;
}
.movie{
    border: 1px solid #999;
}

.gallery>a{
    /*max-width: 300px;*/
    /*max-height: 300px;*/
}
.gallery>a>img{
    /*max-width: 300px;*/
    /*max-height: 300px;*/
    /*margin-bottom: -23px;*/
}

 .photo_box{
     margin: 4px;
 }
.big_checkbox{
    transform: scale(1.3);
}

[data-cropped] img {
    height: 300px;
    object-fit: cover;
    width: auto;
}

@media (max-width: 420px) {
    /*.gallery {*/
    /*    display: grid;*/
    /*    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); !* 每列寬度 160px *!*/
    /*    grid-gap: 8px; !* 圖片間距 *!*/
    /*    justify-content: center;*/
    /*}*/

    /*.gallery img {*/
    /*    width: 170px;  !* 固定寬度 *!*/
    /*    height: auto;  !* 高度自適應 *!*/
    /*    object-fit: cover; !* 確保圖片適應框架 *!*/
    /*    border-radius: 8px; !* 圖片圓角（可選） *!*/
    /*    display: block; !* 避免圖片有底部空隙 *!*/
    /*    margin: 0 auto;*/
    /*}*/

    /* 瀑布流 順序會改變 */
    /*.gallery {*/
    /*    column-count: 2; !* 設置為 2 欄 *!*/
    /*    column-gap: 8px;*/
    /*}*/

    /*.gallery img {*/
    /*    width: 100%; !* 讓圖片適應欄寬 *!*/
    /*    height: auto;*/
    /*    margin-bottom: 8px; !* 讓圖片間距一致 *!*/
    /*    display: block;*/
    /*    border-radius: 8px;*/
    /*}*/

}

.pswp__counter {
    margin: 0 !important;
    margin-inline-start: unset;
    width: 60px;
    height: 60px;
    line-height: 60px;
}
.pswp__button--zoom {
    display: none !important;
}
.pswp__button{
    width: 42px !important;
    line-height: 60px;
    padding: 0 8px;
    text-align: center;
}

.pswp__top-bar .pswp__button:hover{
    padding: 0 !important;
}

.pswp__custom-caption {
    background: rgba(75, 150, 75, 0.75);
    font-size: 16px;
    color: #fff;
    width: calc(100% - 32px);
    max-width: 400px;
    padding: 2px 8px;
    border-radius: 4px;
    position: absolute;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
}
.pswp__custom-caption a {
    color: #fff;
    text-decoration: underline;
}
.hidden-caption-content {
    display: none;
}

/* 讓年份排在月份前面 */
.flatpickr-current-month {
    display: flex !important;
    flex-direction: row-reverse; /* 反轉排序 */
    justify-content: center;
    align-items: center;
}

.flatpickr-current-month .flatpickr-month {
    margin-left: 5px; /* 月份與年份間距 */
}

/* 正方形 */
.gallery img {
    object-fit: cover; /* 確保圖片適應框架 */
    border-radius: 8px; /* 圖片圓角（可選） */
    display: block; /* 避免圖片有底部空隙 */
    margin: 0 auto;
}

@media (max-width: 400px) {
    .photo-wrapper {
        width: 45vw; /* 正方形尺寸，可改 */
    }
}
@media (max-width: 200px) {
    .photo-wrapper {
        width: 100vw; /* 正方形尺寸，可改 */
    }
}
@media (min-width: 401px) {
    .photo-wrapper {
        width: 200px; /* 正方形尺寸，可改 */
    }
}

.photo, .movie {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;       /* ★ 關鍵：正方形 */
    overflow: hidden;
}

.photo_box {
    width: 100%;
    height: 100%;
    object-fit: cover;         /* 裁切填滿，不變形 */
    display: block;
}

/* 文字疊在圖片下方或圖片內（可調） */
.photo .text, .movie .text {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: rgba(0,0,0,.5);
    color: #fff;
    font-size: 14px;
    padding: 4px 6px;
    box-sizing: border-box;
}

/* checkbox 疊在圖片上 */
.ImageCheckbox {
    position: absolute;
    inset: 0;
}

.gps_image{
    width: 100px;
}
.gps_image img{
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.modal {
    z-index: 200000 !important;
}

.modal-backdrop {
    z-index: 199000 !important;
}
