/* ====== Typography ====== */
h3 {
    font-family: Montserrat;
    text-transform: capitalize;
    text-align: center;
    margin-top: 0;
    padding: 0;
}

#select-text.dark-mode {
    color:#fff;
}

p {
    font-family: Montserrat;
}

/* ====== Dark Mode ====== */
body.dark-mode {
    background: #111;
    transition: background 0.3s ease;
}

body.dark-mode .thumbs img {
    border-color: rgba(0, 120, 212, 0.5);
}

body.dark-mode .site-title,
body.dark-mode .image-controls button {
    color: #eee;
    background: #111;
}

body.dark-mode .header-bar {
    background-color: #111;
}

body.dark-mode .navbar a {
    color: #eee;
}

body.dark-mode .navbar a:hover,
body.dark-mode .navbar a:focus {
    background-color: #555;
    color: #fff;
}

/* ====== Gallery Layout ====== */
.gallery {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    background: none;
}

.gallery img {
    width:100%;
}

#placeholder-text {
    color:#111;
    margin-top: 5rem;
}
#placeholder-text.dark-mode {
    opacity: 0;
}

#select-text {
    margin: 0;
    padding: 0;
    margin-top: 1rem;
    font-size: 1rem;
} 

.album-controls-container {
    display: flex;          /* align children horizontally */
    justify-content: center;
    gap: 0px; 
}

/* ====== album-controls Selector ====== */
.album-controls {
    display: flex;
    justify-content: center;
    gap: 8px;
    max-height: 4rem;
    flex-wrap: nowrap; /* no wrapping to keep horizontal scrolling */
    overflow-x: auto; /* enable scrolling when content overflows */
    -webkit-overflow-scrolling: touch; /* smooth scrolling on iOS */
    scrollbar-width: none; /* Firefox */

}

/* hide scrollbar */
.album-controls::-webkit-scrollbar {
    display: none;
}

.album-controls button {
    flex: 0 0 auto; /* don't shrink, don't grow */  
    margin: 4px;
    padding: 10px 16px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    border-radius: 6px;
    background: rgba(205, 205, 205, 0);
    color: #252525;
    cursor: pointer;
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.album-controls.dark-mode button {
    border: 2px solid #fff;
    border-radius: 6px;
    background: rgba(205, 205, 205, 0);
    color: #fff;
    box-shadow: 0 3px 6px rgba(251, 251, 251, 0.294);
    transition: all 0.3s ease;
}


.album-controls button:hover,
.album-controls button:focus {
    background: rgb(128, 164, 193);
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}
/* ====== Thumbnails (Horizontal Scrollbar) ====== */
.thumbs {
    display: flex;               /* make it a row */
    gap: 8px;                     /* spacing between thumbnails */
    overflow-x: auto;             /* allow horizontal scrolling */
    overflow-y: hidden;           /* hide vertical scroll */
    max-width: 100vw;             /* prevent page overflow */
    padding: 8px 0;               /* optional top/bottom spacing */
    -webkit-overflow-scrolling: touch; /* smooth scroll on iOS */
    scroll-behavior: smooth;      /* smooth scroll for arrow clicks */
}

.thumbs::-webkit-scrollbar {
    display: none;                /* hide scrollbar on webkit */
}

/* Thumbnails themselves */
.thumbs img {
    flex: 0 0 auto;               /* don't shrink, don't grow */
    width: 80px;                  /* fixed width */
    height: 80px;                 /* fixed height */
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 6px;           /* optional rounded corners */
    transition: border 0.2s ease, transform 0.2s ease;
}

.thumbs img.active {
    border-color: #696969;
    transform: scale(1.05);       /* optional hover highlight */
}

.thumbs img:hover {
    transform: scale(1.05);
}

/* ====== Controls (Top) ====== */
.image-controls {
    position: fixed;       /* sticks to viewport, not container */
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3rem;
    display: flex;
    justify-content: center;
    gap: 0px;
    padding: 0;
    background: rgba(255, 255, 255, 0.95); /* semi-transparent overlay */
    backdrop-filter: blur(6px);            /* optional: blur effect */
    box-shadow: 0 -2px 6px rgba(0,0,0,0.15);
    margin-top: 3rem;
    z-index: 2;                            /* ensures it stays above all content */
}

.image-controls button {
    flex: 1 1 auto;
    padding: .5rem .5rem;
    font-weight: 400;
    font-size: .9rem;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    font-family: Montserrat;
    text-transform: none;
    vertical-align: middle;
    transition: all 0.3s ease;
    border: none;
    border-radius: 6px;
    background: rgba(255,255,255,0);
    color: #2a2a2a;
}

.image-controls button:hover,
.image-controls button:focus {
    background: rgb(94,131,142);
    opacity: 0.95;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.image-controls.dark-mode {
    background: #111;
}

/* Optional: hide footer in fullscreen */
.image-controls.fullscreen ~ .image-controls {
    display: none;
}

/* ====== Fullscreen Viewer ====== */
.fullscreen-viewer {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.fullscreen-viewer.active {
    opacity: 1;
    pointer-events: all;
}

.fullscreen-viewer img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-width: 100vw;
    max-height: 100vh;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.fs-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
    user-select: none;
    z-index: 2100;
}

/* ====== Fullscreen Mode Adjustments ====== */
body.fullscreen-mode .gallery > *:not(.main) {
    opacity: 0.1;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

body.fullscreen-mode .main img {
    transform: scale(1.05);
}
/* ====== Mobile Overrides ====== */
@media (max-width: 768px) {
    .album-controls {
        max-width: 100vw; /* don't overflow the screen */
        position: relative; /* stay in normal flow */
        padding: 0 8px;    /* optional spacing on sides */
    }

    .album-controls button {
        min-width: 80px;   /* optional: make buttons easier to tap */
    }

    .thumbs img {
        width: 100px;
        height: 100px;
    }
}
