/* gallery skin - self-contained, no framework dependency (v1.13 policy) */

.gal-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.gal-toolbar h2 { font-size: 1.4em; color: #2c3e50; margin: 0; }

.gal-write-btn {
    padding: 8px 20px;
    background: #27ae60;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9em;
}

.gal-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 900px) {
    .gal-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
    .gal-grid { grid-template-columns: 1fr; }
}

.gal-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: #999;
    padding: 60px 16px;
}

.gal-card {
    display: block;
    text-decoration: none;
    color: #2c3e50;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.gal-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}

.gal-thumb-wrap {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #e8e8e8;
    overflow: hidden;
}

.gal-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gal-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 2rem;
}

.gal-card-body { padding: 12px 14px 14px; }

.gal-card-title {
    font-size: 0.95em;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gal-card-meta {
    font-size: 0.8em;
    color: #999;
    margin-top: 4px;
}

/* pagination stepper - same visual language as default skin's list.php */
.gal-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.gal-pagination a, .gal-pagination span.disabled {
    color: #666;
    text-decoration: none;
    font-size: 0.9em;
    padding: 4px 6px;
    border-radius: 4px;
}

.gal-pagination span.disabled { color: #ddd; }

.gal-pagination form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.gal-pagination input[type="number"] {
    width: 50px;
    text-align: center;
    padding: 5px 4px;
    border: 1.5px solid #e69138;
    border-radius: 5px;
    color: #e69138;
    font-weight: 600;
    font-size: 0.9em;
}

/* view.php */
.gal-box {
    background: #fff;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.gal-box + .gal-box { margin-top: 20px; }

.gal-figure { text-align: center; margin-bottom: 16px; }

.gal-figure img {
    max-width: 100%;
    max-height: 75vh;
    width: auto;
    height: auto;
    border-radius: 6px;
}

.gal-title { font-size: 1.3em; font-weight: 700; color: #2c3e50; margin: 0 0 8px; }

.gal-meta { color: #999; font-size: 0.85em; margin-bottom: 16px; }

.gal-content { line-height: 1.8; color: #333; margin-bottom: 20px; }

.gal-actions { display: flex; gap: 10px; }

.gal-btn {
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 0.9em;
    text-decoration: none;
    border: none;
    cursor: pointer;
    display: inline-block;
}

.gal-btn-light { background: #ecf0f1; color: #666; }
.gal-btn-info { background: #3498db; color: #fff; }
.gal-btn-danger { background: #e74c3c; color: #fff; }

.gal-comments-title { font-size: 1.05em; font-weight: 700; color: #2c3e50; margin: 0 0 15px; }

.gal-comment {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.gal-comment:last-child { border-bottom: none; }

.gal-comment-author { font-size: 0.9em; font-weight: 600; }
.gal-comment-body { color: #555; font-size: 0.95em; margin-top: 4px; }

.gal-comment-delete {
    background: none;
    border: none;
    color: #e74c3c;
    font-size: 0.78em;
    cursor: pointer;
    padding: 0;
    margin-top: 4px;
}

.gal-no-comments { color: #999; text-align: center; padding: 20px 0; }
