﻿/* PAGE WRAPPER */
.photo-page {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 1rem 2.5rem;
    max-width: 1100px;
    margin: 0 auto;
}


/* HEADER */
.photo-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

    .photo-header .btn-primary {
        flex: 0 0 auto !important;
        margin-top: 0.5rem;
        display: inline-block !important;
        width: auto !important;
        padding: 0.5rem 1rem;
        align-self: flex-start !important;
    }

.photo-header h1 {
    margin: 0;
    font-size: 2rem;
}

.photo-subtitle {
    margin: 0.25rem 0 1rem;
    color: var(--text-muted, #666);
    font-size: 0.95rem;
}


/* FILTER BAR */
.photo-filters {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--surface, #fff);
    border: 1px solid var(--border, #ddd);
    padding: 1rem;
    border-radius: 10px;
    box-shadow: var(--shadow-sm, 0 1px 2px rgba(0,0,0,0.05));
}

    .photo-filters .filter-search {
        flex: 1;
        padding: 0.5rem;
        border: 1px solid var(--border, #ccc);
        border-radius: 6px;
    }

    .photo-filters .filter-sort {
        padding: 0.5rem;
        border: 1px solid var(--border, #ccc);
        border-radius: 6px;
    }

    .photo-filters .filter-page-size {
        padding: 0.5rem;
        border: 1px solid var(--border, #ccc);
        border-radius: 6px;
    }

/* GALLERY GRID */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}

.photo-card {
    background: var(--surface, #fff);
    border: 1px solid var(--border, #ddd);
    border-radius: 10px;
    padding: 0.75rem;
    box-shadow: var(--shadow-sm, 0 1px 2px rgba(0,0,0,0.05));
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
}

.photo-thumb {
    width: 100%;
    height: auto;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .photo-thumb:hover {
        transform: scale(1.03);
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    }

.photo-meta {
    font-size: 0.8rem;
    color: var(--text-muted, #777);
}


/* PAGINATION */
.photo-pagination {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.pagination {
    display: flex;
    gap: 0.5rem;
}

.page-btn {
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
}

    .page-btn:hover {
        background: var(--surface-hover);
    }

    .page-btn.active {
        background: var(--primary);
        color: white;
        border-color: var(--primary);
    }

/* MODAL OVERLAY */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: none; /* toggle to block when open */
    justify-content: center;
    align-items: center;
    z-index: 999;
}

/* MODAL BOX */
.modal {
    background: var(--surface, #fff);
    padding: 2rem;
    border-radius: 12px;
    width: 400px;
    max-width: 90%;
    box-shadow: var(--shadow-lg, 0 8px 20px rgba(0,0,0,0.2));
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-label {
    font-size: 0.9rem;
    color: var(--text-muted, #666);
}

.modal-input {
    padding: 0.5rem;
    border: 1px solid var(--border, #ccc);
    border-radius: 6px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}