/* =========================================================
   TABELE
========================================================= */

table {

    width: 100%;

    border-collapse: collapse;

    margin-top: 24px;

    background: rgba(255, 255, 255, 0.05);

    border: 1px solid rgba(255, 255, 255, 0.10);

    border-radius: 14px;

    overflow: hidden;

}


th,
td {

    padding: 16px 18px;

    text-align: left;

    border-bottom: 1px solid rgba(255, 255, 255, 0.08);

}


th {

    background: rgba(255, 255, 255, 0.08);

    color: #ffffff;

    font-size: 14px;

    text-transform: uppercase;

    letter-spacing: 0.6px;

}


td {

    color: #d7dce1;

    vertical-align: top;

}


tr:last-child td {

    border-bottom: none;

}


tbody tr {

    transition: background 0.2s ease;

}


tbody tr:hover {

    background: rgba(255, 255, 255, 0.04);

}


td a {

    color: #8ec5ff;

    text-decoration: none;

}


td a:hover {

    text-decoration: underline;

}


/* =========================================================
   ALBUMY — WIDOK KOMPUTEROWY
========================================================= */

.albums-desktop {

    display: block;

    width: 100%;

    overflow-x: auto;

}


/*
|--------------------------------------------------------------------------
| Tabela albumów
|--------------------------------------------------------------------------
|
| Minimalna szerokość zapobiega zgniataniu kolumn na mniejszych
| ekranach komputerowych.
|
| Przy szerokości poniżej 1100 px i tak przechodzimy na karty.
|
*/

.albums-table {

    min-width: 1050px;

}


/*
|--------------------------------------------------------------------------
| ID
|--------------------------------------------------------------------------
*/

.albums-table th:nth-child(1),
.albums-table td:nth-child(1) {

    width: 60px;

    white-space: nowrap;

}


/*
|--------------------------------------------------------------------------
| NAZWA
|--------------------------------------------------------------------------
*/

.albums-table th:nth-child(2),
.albums-table td:nth-child(2) {

    min-width: 150px;

}


/*
|--------------------------------------------------------------------------
| OPIS
|--------------------------------------------------------------------------
*/

.albums-table th:nth-child(3),
.albums-table td:nth-child(3) {

    min-width: 280px;

}


/*
|--------------------------------------------------------------------------
| MATERIAŁY
|--------------------------------------------------------------------------
|
| 📷 46   🎬 4
|
| Liczniki zawsze pozostają w jednej linii.
|
*/

.albums-table th:nth-child(4),
.albums-table td:nth-child(4) {

    min-width: 150px;

    white-space: nowrap;

}


/*
|--------------------------------------------------------------------------
| DOSTĘP
|--------------------------------------------------------------------------
*/

.albums-table th:nth-child(5),
.albums-table td:nth-child(5) {

    min-width: 260px;

}


/*
|--------------------------------------------------------------------------
| DATA UTWORZENIA
|--------------------------------------------------------------------------
*/

.albums-table th:nth-child(6),
.albums-table td:nth-child(6) {

    min-width: 190px;

    white-space: nowrap;

}


/* =========================================================
   ALBUMY — AKCJE W TABELI
========================================================= */

.albums-table th:last-child,
.albums-table td:last-child {

    min-width: 175px;

}


.albums-table .action-links {

    display: flex;

    flex-direction: column;

    align-items: flex-start;

    gap: 8px;

}


.albums-table .action-links a {

    display: block;

    white-space: nowrap;

    line-height: 1.35;

}


.albums-table .action-links .action-delete {

    color: #fca5a5;

}


/* =========================================================
   ALBUMY — KARTY
========================================================= */

.albums-card-grid {

    display: none;

}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1100px) {

    /*
    |--------------------------------------------------------------------------
    | Na tablecie chowamy tabelę i pokazujemy karty.
    |--------------------------------------------------------------------------
    */

    .albums-desktop {

        display: none;

    }


    .albums-card-grid {

        display: grid;

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 18px;

        margin-top: 24px;

        margin-bottom: 30px;

    }


    .album-card {

        display: flex;

        flex-direction: column;

        gap: 16px;

        min-width: 0;

        padding: 20px;

        border: 1px solid rgba(255,255,255,.10);

        border-radius: 16px;

        background: rgba(255,255,255,.05);

        box-shadow:
            0 8px 24px rgba(0,0,0,.20);

    }


    .album-card-header {

        display: flex;

        align-items: flex-start;

        justify-content: space-between;

        gap: 15px;

    }


    .album-card-header h2 {

        margin: 0;

        font-size: 21px;

        line-height: 1.25;

    }


    /*
    |--------------------------------------------------------------------------
    | LICZNIKI MATERIAŁÓW NA KARCIE
    |--------------------------------------------------------------------------
    |
    | Zapobiega rozdzielaniu:
    |
    | 📷 46
    | 🎬 4
    |
    */

    .album-card-photo-count {

        flex-shrink: 0;

        white-space: nowrap;

        color: #cbd5e1;

        font-size: 14px;

    }


    .album-card-description {

        margin: 0;

        color: #cbd5e1;

        line-height: 1.5;

    }


    .album-card-access {

        color: #94a3b8;

        font-size: 14px;

        line-height: 1.45;

    }


    .album-card-open {

        width: 100%;

    }


    .album-card-actions {

        display: flex;

        flex-wrap: wrap;

        gap: 14px;

        padding-top: 4px;

    }


    .album-card-actions a {

        color: #8ec5ff;

        text-decoration: none;

        font-size: 14px;

    }


    .album-card-actions a:hover {

        text-decoration: underline;

    }


    .album-card-actions .action-delete {

        color: #fca5a5;

    }


    .album-card-date {

        margin-top: auto;

        padding-top: 4px;

        border-top: 1px solid rgba(255,255,255,.07);

        color: #64748b;

        font-size: 12px;

    }

}


/* =========================================================
   TELEFON
========================================================= */

@media (max-width: 700px) {

    .albums-card-grid {

        grid-template-columns: 1fr;

        gap: 14px;

    }


    .album-card {

        padding: 17px;

        border-radius: 14px;

    }


    .album-card-header h2 {

        font-size: 19px;

    }


    .album-card-photo-count {

        font-size: 13px;

    }


    .album-card-actions {

        justify-content: space-between;

        gap: 8px;

    }


    .album-card-date {

        font-size: 11px;

    }

}