/* WP FileBird Gallery - style.css
   Clean, minimal, theme-agnostic.
   Override --wfg-* variables in your theme to restyle. */

:root {
    --wfg-gap:          16px;
    --wfg-radius:       6px;
    --wfg-tile-min:     200px;
    --wfg-cover-ratio:  66%;      /* cover image aspect ratio */
    --wfg-grid-min:     180px;
    --wfg-overlay:      rgba(0, 0, 0, 0.28);
    --wfg-overlay-hover:rgba(0, 0, 0, 0.08);
    --wfg-text:         #1a1a1a;
    --wfg-subtext:      #6b7280;
    --wfg-bg:           #f6f7f9;
    --wfg-back-color:   #1a1a1a;
    --wfg-back-hover:   #444;
    --wfg-transition:   0.22s ease;
}

.wfg-gallery {
    width: 100%;
    font-family: inherit;
    color: var(--wfg-text);
    box-sizing: border-box;
}

/* -- Album board ----------------------------------------------------------- */

.wfg-album-board {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--wfg-tile-min), 1fr));
    gap: var(--wfg-gap);
}

.wfg-album-tile {
    cursor: pointer;
    border-radius: var(--wfg-radius);
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.09);
    transition: transform var(--wfg-transition), box-shadow var(--wfg-transition);
}

.wfg-album-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.13);
}

.wfg-album-tile:hover .wfg-album-overlay {
    background: var(--wfg-overlay-hover);
}

.wfg-album-cover {
    position: relative;
    width: 100%;
    padding-top: var(--wfg-cover-ratio);
    background: var(--wfg-bg);
    overflow: hidden;
}

.wfg-album-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.wfg-album-tile:hover .wfg-album-cover img {
    transform: scale(1.04);
}

.wfg-album-placeholder {
    position: absolute;
    inset: 0;
    background: var(--wfg-bg);
}

.wfg-album-overlay {
    position: absolute;
    inset: 0;
    background: var(--wfg-overlay);
    transition: background var(--wfg-transition);
}

.wfg-album-info {
    padding: 10px 14px 12px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.wfg-album-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--wfg-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wfg-album-count {
    font-size: 12px;
    color: var(--wfg-subtext);
    white-space: nowrap;
    flex-shrink: 0;
}

/* -- Folder view ----------------------------------------------------------- */

.wfg-folder-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.wfg-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--wfg-back-color);
    transition: color var(--wfg-transition);
    font-family: inherit;
    text-decoration: none;
}

.wfg-back-btn:hover {
    color: var(--wfg-back-hover);
}

.wfg-back-arrow {
    font-size: 18px;
    line-height: 1;
}

.wfg-folder-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--wfg-text);
    line-height: 1.2;
}

/* -- Image grid ------------------------------------------------------------ */

.wfg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--wfg-grid-min), 1fr));
    gap: var(--wfg-gap);
}

.wfg-item {
    display: block;
    position: relative;
    padding-top: 75%;   /* 4:3 crop */
    overflow: hidden;
    border-radius: var(--wfg-radius);
    background: var(--wfg-bg);
    cursor: zoom-in;
}

.wfg-item img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.wfg-item:hover img {
    transform: scale(1.05);
}

.wfg-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    transition: background var(--wfg-transition);
}

.wfg-item:hover::after {
    background: rgba(0,0,0,0.12);
}

/* -- Loading / empty ------------------------------------------------------- */

.wfg-loading,
.wfg-empty,
.wfg-notice {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 16px;
    color: var(--wfg-subtext);
    font-size: 14px;
}

/* -- Responsive adjustments ------------------------------------------------ */

@media ( max-width: 480px ) {
    :root {
        --wfg-tile-min:  140px;
        --wfg-grid-min:  130px;
        --wfg-gap:       10px;
    }

    .wfg-folder-title {
        font-size: 17px;
    }
}
