﻿/* =========================
   Gallery Page (gp-*) shared
   ========================= */

.gp-shell, .gp-shell * {
    box-sizing: border-box;
}

.gp-shell {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 16px;
    padding: 12px;
    background: #fff;
    color: #111827;
    height: 100vh;
}

@media (max-width: 900px) {
    .gp-shell {
        height: auto;
        grid-template-columns: 200px 1fr;
    }
}

@media (max-width: 640px) {
    .gp-shell {
        grid-template-columns: 1fr;
    }
}

/* ===== Left / Sidebar ===== */
.gp-side {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fafafa;
    padding: 10px;
    overflow: auto;
}

.gp-side__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 6px 10px 6px;
    border-bottom: 1px solid #eef2f7;
    margin-bottom: 10px;
}

.gp-side__title {
    font-weight: bold;
    font-size: 14px;
    color: #0f172a;
}

.gp-side__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Album item */
.gp-album {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #fff;
    cursor: pointer;
    transition: box-shadow .15s ease, transform .06s ease, background .15s ease;
    outline: none;
}

.gp-album__name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 700;
    color: #111827;
}

.gp-album:hover {
    background: #f9fafb;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
}

.gp-album:active {
    transform: translateY(1px);
}

.gp-album:focus-visible {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .20);
}

.gp-album.is-active {
    border-color: rgba(37, 99, 235, .35);
    background: rgba(37, 99, 235, .06);
}

/* ===== Right / Main ===== */
.gp-main {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    padding: 16px;
    overflow: auto;
}

.gp-empty {
    color: #6b7280;
    font-size: 14px;
    padding: 6px 2px;
}

/* ===== Album header (top block) ===== */
.gp-head {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-start;
    margin-bottom: 16px;
}

.gp-cover {
    width: 104px;
    height: 104px;
    border-radius: 14px;
    overflow: hidden;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gp-cover__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.gp-cover__btn {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

    .gp-cover__btn:hover {
        background: rgba(0,0,0,.03);
    }

.gp-cover__icon {
    width: 44px;
    height: 44px;
    opacity: .75;
}

.gp-info {
    flex: 1;
    min-width: 260px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gp-info__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.gp-info__row--top {
    padding-bottom: 10px;
    border-bottom: 1px solid #eef2f7;
}

.gp-info__row--meta {
    padding-bottom: 10px;
    border-bottom: 1px solid #eef2f7;
    align-items: center;
}

@media (max-width: 640px) {
    .gp-info__row {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Title */
.gp-title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding-top: 2px;
}

.gp-title__name {
    font-size: 20px;
    font-weight: bold;
    color: #0f172a;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gp-title__ctx {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gp-title__dot {
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: #cbd5e1;
}

/* Meta */
.gp-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #334155;
    font-size: 14px;
    font-weight: 700;
}

.gp-meta__dot {
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: #cbd5e1;
}

/* actions + separators */
.gp-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.gp-sep {
    width: 1px;
    height: 18px;
    background: #e5e7eb;
    display: inline-block;
    margin: 0 4px;
}

/* ===== Buttons (no bootstrap) ===== */
.gp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    transition: transform .06s ease, box-shadow .15s ease, opacity .15s ease, background .15s ease;
}

    .gp-btn:active {
        transform: translateY(1px);
    }

    .gp-btn:disabled {
        opacity: .55;
        cursor: not-allowed;
        transform: none;
    }

.gp-btn--sm {
    padding: 6px 10px;
    font-size: 14px;
    border-radius: 12px;
}

.gp-btn--pri {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.gp-btn--danger {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
}

.gp-btn--muted {
    background: #6b7280;
    border-color: #6b7280;
    color: #fff;
}

.gp-btn--ghost {
    background: transparent;
    border-color: #e5e7eb;
    color: #334155;
}

.gp-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .22);
}

/* ===== Hidden file input wrapper ===== */
.gp-file {
    position: absolute !important;
    width: 1px;
    height: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
}





/* ===== gp-shell 三欄版：班級 / 相簿 / 內容 ===== */
.gp-shell--tri {
    grid-template-columns: 220px 260px 1fr;
}

@media (max-width: 1100px) {
    .gp-shell--tri {
        grid-template-columns: 200px 240px 1fr;
    }
}

@media (max-width: 900px) {
    .gp-shell--tri {
        grid-template-columns: 1fr;
    }
}

/* ===== 班級欄 ===== */
.gp-class {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fafafa;
    padding: 10px;
    overflow: auto;
}

.gp-class__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 6px 10px 6px;
    border-bottom: 1px solid #eef2f7;
    margin-bottom: 10px;
}

.gp-class__title {
    font-weight: bold;
    font-size: 14px;
    color: #0f172a;
}

.gp-class__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gp-classitem {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #fff;
    cursor: pointer;
    transition: box-shadow .15s ease, transform .06s ease, background .15s ease;
    outline: none;
}

    .gp-classitem:hover {
        background: #f9fafb;
        box-shadow: 0 2px 10px rgba(0,0,0,.08);
    }

    .gp-classitem:active {
        transform: translateY(1px);
    }

    .gp-classitem:focus-visible {
        box-shadow: 0 0 0 3px rgba(37, 99, 235, .20);
    }

    .gp-classitem.is-active {
        border-color: rgba(37, 99, 235, .35);
        background: rgba(37, 99, 235, .06);
    }

.gp-classitem__name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: bold;
    color: #111827;
}

.gp-classitem__count {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: bold;
    color: #64748b;
    background: rgba(100,116,139,.10);
    border: 1px solid rgba(100,116,139,.18);
    padding: 4px 8px;
    border-radius: 999px;
}

.gp-class__footer {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eef2f7;
}

.gp-btn--w {
    width: 100%;
}

/* 小提示 */
.gp-hint {
    color: #6b7280;
    font-size: 13px;
    padding: 8px 6px;
}
