.gallery-wrapper-header {
    width: 100%;
    height: 40px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #777;
    position: sticky;
    top: 160px; 
    background-color: #fff; 
    z-index: 100; 
    box-sizing: border-box;
}

.gallery-wrapper-header-title {
    width: 100px;
    text-align: center;
    font-weight: bold;
    color: #000;
    letter-spacing: 0.5px;
}

.gallery-wrapper-header-filter {
    display: flex;
    flex: 1;
    align-items: center;
    overflow: hidden; 
}

.country-zone {
    height: 100%; 
    flex: 1; 
    align-items: center; 
    display: flex; 
    gap: 5px; 
    overflow-x: auto; 
    white-space: nowrap; 
    -webkit-overflow-scrolling: touch; 
    padding: 2px 0;
    box-sizing: border-box;
    scroll-behavior: smooth; 
}

.country-zone::-webkit-scrollbar { 
    display: none; 
}

.country-tab {
    font-size: 13px; 
    font-weight: 600; 
    padding: 0 14px; 
    height: 25px; 
    width: 55px;
    border: 1px solid #ddd; 
    background: #fff; 
    color: #555; 
    border-radius: 20px; 
    cursor: pointer; 
    transition: all 0.15s ease; 
    flex-shrink: 0; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    box-sizing: border-box; 
    -webkit-tap-highlight-color: transparent; 
}



.country-tab:hover {
    border-color: #000;
    color: #000; 
}

.country-tab.active {
    background: #000; 
    border-color: #000; 
    color: #fff; 
}

.country-tab:active { 
    background: #fff; 
    color: #555; 
    border-color: #ddd;
}

.year-zone {
    padding-left: 5px;
    display: flex; 
    align-items: center; 
    flex-shrink: 0;
}

#yearSelect {
    height: 26px;
    font-size: 12px;
    padding: 0 5px;
    border-radius: 4px;
    cursor: pointer;
}

.button-zone {
    display: flex;
    width: 50px;
    height: 100%;
    gap: 5px;
    align-items: center;
    flex-shrink: 0; 
    padding-left: 6px;
    background: #fff;
}

.button-write-admin-small,
.button-delete-admin-small {
    width: 20px;
    height: 20px;
    font-size: 13px;
    background: #fff;
    color: #e8590c;
    border: 1px solid #e8590c;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    box-sizing: border-box;
    cursor: pointer;
}

.gallery-wrapper { 
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 20px; 
    width: 100%; 
    margin-top: 10px; 
}

@media (max-width: 1023px) {
    .gallery-wrapper {
        grid-template-columns: 1fr;
    }
}

.gallery-wrapper-card { 
    background: #fff; 
    border: 1px solid #eee; 
    border-radius: 4px; 
    overflow: hidden; 
    display: flex; 
    flex-direction: column; 
    position: relative; 
}

.gallery-wrapper-card-img { 
    width: 100%; 
    aspect-ratio: 4 / 3; 
    background: #fafafa; 
    position: relative; 
    overflow: hidden; 
}

.gallery-wrapper-card-img img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    display: block; 
}

.gallery-wrapper-card-text { 
    padding: 15px; 
    display: flex; 
    flex-direction: column; 
    gap: 5px; 
    background: #fff; 
    flex: 1; 
    justify-content: space-between; 
}

.gallery-wrapper-card-text-title { 
    font-size: 15px; 
    font-weight: 600; 
    color: #000; 
    line-height: 1.4; 
    word-break: break-all; 
    text-align: left;
    margin: 0; 
}

.gallery-wrapper-card-text-meta { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    font-size: 14px; 
    color: #777; 
    font-variant-numeric: tabular-nums;
}

.card-location {
    margin-left: 0;
}

.card-map { 
    display: none;
    color: inherit; 
    text-decoration: none; 
    margin-left: 3px; 
    cursor: pointer; 
}

.card-map:hover { 
    color: #000; 
}

.card-stats { 
    display: flex; 
    align-items: center; 
}

.stat-like {
    color: #e8590c;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    text-align: center;  
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    font-variant-numeric: tabular-nums;
}

.like-count {
    display: inline-block;
    text-align: center;
}

.is-admin-title { 
    text-decoration: underline; 
    text-underline-offset: 4px; 
    cursor: pointer; 
    transition: color 0.15s; 
}

#gallery-scroll { 
    width: 100%; 
    height: 20px; 
    margin: 20px 0; 
}


.gallery-db-user-input-form { 
    display: flex; 
    flex-direction: column; 
    gap: 20px; 
    max-width: 600px; 
    box-sizing: border-box; 
    margin-top: 10px; 
}

.gallery-db-category { 
    max-width: 800px;
    margin-left: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-align: left;
}

.gallery-db-category label {
    display: block; 
    font-size: 14px; 
    font-weight: bold; 
    color: #333; 
    margin-bottom: 5px; 
}

.image-preview-container { 
    width: 100%; 
    height: 400px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    overflow: hidden; 
    border-radius: 2px; 
    position: relative; 
    border: 1px solid #ccc; 
    background: #fff; 
}

.image-preview-container img { 
    max-width: 100%; 
    max-height: 100%; 
    object-fit: contain; 
}

.image-preview-placeholder { 
    color: #aaa; 
    font-size: 13px; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
}

.user-input { 
    font-size: 14px; 
    width: 100%; 
    padding: 0 10px; 
    box-sizing: border-box; 
    border: 1px solid #ccc; 
    outline: none; 
    background: #fff; 
    border-radius: 2px; 
    font-family: inherit; 
    height: 42px;
    line-height: 42px;
}

.user-input:focus { 
    border-color: #777; 
}

.choose-file { 
    font-size: 14px; 
    padding: 10px; 
    border: 1px solid #ccc; 
    background: #fff; 
    cursor: pointer; 
    border-radius: 2px; 
    width: 100%; 
    box-sizing: border-box; 
    font-family: inherit; 
}

.choose-file:focus { 
    border-color: #000; 
}

.map-container { 
    width: 100%; 
    height: 400px; 
    border: 1px solid #ccc; 
    border-radius: 2px; 
    background: #eee; 
}

input[type="date"].user-input {
    -webkit-appearance: none;
    appearance: none;
}

.user-input:disabled,
select.user-input:disabled {
    background-color: #f2f2f2; 
    color: #888;
    cursor: not-allowed;
    opacity: 1; 
}

.gallery-wrapper-card-check {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 20;
    width: 20px;
    height: 20px;
    cursor: pointer;
    border: 1px solid #777;
    border-radius: 0; 
    background-color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    margin: 0;
}

.gallery-wrapper-card-check:checked { 
    background-color: #000; 
    border-color: #000; 
}

.gallery-wrapper-card-check:checked::after {
    content: '';
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    position: absolute;
    top: 2px;
    left: 6px;
}