/* app.css | Link Manager v2 | Stili comuni.
   Usa le variabili CSS di Bootstrap 5.3 per funzionare in entrambi
   i temi (chiaro/scuro). */

/* --- Layout generale --- */
body {
    background-color: var(--bs-tertiary-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main.lm-main,
body > .container {
    flex: 1 0 auto;
}

/* --- Navbar con gradiente --- */
.navbar-lm {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
}

[data-bs-theme="dark"] .navbar-lm {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
}

.navbar-lm .navbar-brand {
    font-weight: 700;
    letter-spacing: .02em;
}

/* --- Hero della pagina pubblica --- */
.lm-hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: #fff;
}

.lm-hero .lead {
    opacity: .85;
}

/* --- Card dei link --- */
.card {
    border: 0;
}

.lc-card {
    border-left: 4px solid var(--bs-border-color);
    transition: transform .12s ease, box-shadow .12s ease;
}

.lc-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .12) !important;
}

/* Colore del bordo per stato di visibilità (area riservata) */
.lc-vis-pubblico  { border-left-color: #198754; }
.lc-vis-condiviso { border-left-color: #0dcaf0; }
.lc-vis-privato   { border-left-color: #adb5bd; }

/* Favicon del sito nella card: allineata al testo del titolo */
.lc-favicon {
    align-self: center;
    border-radius: 3px;
}

/* Commento del link: in evidenza rispetto ai metadati.
   Colore ereditato dal tema (chiaro/scuro). */
.lc-note {
    font-size: 1rem;
    color: var(--bs-body-color);
}

/* --- Tag pill: coerenti nei due temi --- */
.badge.text-bg-light {
    background-color: var(--bs-secondary-bg) !important;
    color: var(--bs-body-color) !important;
    border-color: var(--bs-border-color) !important;
}

a.badge {
    transition: background-color .12s ease;
}

a.badge.text-bg-light:hover {
    background-color: var(--bs-primary-bg-subtle) !important;
}

/* Bottoni-tag suggeriti nel form */
.tag-suggest {
    cursor: pointer;
}

/* --- Form --- */
.form-container {
    max-width: 500px;
    margin: 2rem auto;
}

/* --- Tabelle --- */
.table td,
.table th {
    text-align: left;
}

/* --- Grafico click per giorno (dashboard, solo CSS) --- */
.lm-chart {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 140px;
}

.lm-chart-col {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
}

.lm-chart-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background-color: var(--bs-tertiary-bg);
    border-radius: 2px;
    overflow: hidden;
}

.lm-bar-owner  { background-color: #2563eb; }
.lm-bar-public { background-color: #16a34a; }

.lm-chart-label {
    font-size: .6rem;
    text-align: center;
    color: var(--bs-secondary-color);
    overflow: hidden;
}

.lm-legend {
    display: inline-block;
    width: .8rem;
    height: .8rem;
    border-radius: 2px;
    vertical-align: text-bottom;
}

/* --- Footer --- */
.lm-footer {
    flex-shrink: 0;
    color: var(--bs-secondary-color);
}
