/* ============================================================
   link.css  –  Pagina Link Utili  |  Tavola della Pace
   ============================================================ */

/* ── Icona accanto al titolo sezione ───────────────────────── */
.link-icona-titolo {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background-color: var(--bs-primary, #0d6efd);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.link-icona-titolo i {
    font-size: 1.6rem;
    color: #fff;
}

/* ── Contenitore lista ──────────────────────────────────────── */
.lista-link {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    overflow: hidden;
}

/* ── Singola riga link ──────────────────────────────────────── */
.riga-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.25rem 1.5rem;
    background-color: var(--bs-body-bg, #fff);
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    text-decoration: none;
    color: inherit;
    transition:
        background-color 0.15s ease,
        padding-left 0.15s ease;
}

.riga-link:last-child {
    border-bottom: none;
}

.riga-link:hover {
    background-color: rgba(13, 110, 253, 0.04);
    padding-left: 1.85rem;
}

/* ── Parte testuale (sinistra) ──────────────────────────────── */
.riga-link-testo {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.riga-link-titolo {
    font-size: 1rem;
    font-weight: 600;
    color: var(--bs-body-color, #212529);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.riga-link-descrizione {
    font-size: 0.875rem;
    color: var(--bs-secondary-color, #6c757d);
    line-height: 1.4;
}

/* ── Parte URL + freccia (destra) ───────────────────────────── */
.riga-link-url {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
    font-size: 0.8rem;
    color: var(--bs-primary, #0d6efd);
    opacity: 0.7;
    transition: opacity 0.15s ease;
}

.riga-link:hover .riga-link-url {
    opacity: 1;
}

.riga-link-url i {
    font-size: 1rem;
    transition: transform 0.15s ease;
}

.riga-link:hover .riga-link-url i {
    transform: translate(2px, -2px);
}

/* ── Stato vuoto ────────────────────────────────────────────── */
.stato-vuoto {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--bs-secondary-color, #6c757d);
}

.stato-vuoto i {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
    opacity: 0.4;
}

.stato-vuoto p {
    font-size: 1rem;
    margin: 0;
}

/* ── Responsive: su mobile nasconde l'URL ───────────────────── */
@media (max-width: 576px) {
    .riga-link-url span {
        display: none;
    }

    .riga-link {
        padding: 1rem 1.25rem;
    }
}

.btn-elimina-materiale {
    background: #fcebeb;
    border: 1px solid #f5c4b3;
    color: #a32d2d;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-elimina-materiale:hover {
    background: #f5c4b3;
}
