/* ============================================================
   moje-zivotopisy.css — Fajn Účet
   Úvodní/přehledová stránka "Moje životopisy" (seznam CV s odkazy
   a nastavením soukromí). Obecné styly jsou v obecne.css.
   Sdílí .banner-card a .cv-page-title z pridat-zivotopis.css.
   ============================================================ */

.mz-page {
    /* main-layout (obecne.css) je na mobilu flex-direction:column s
       align-items:flex-start — tj. tento main.main-content se v cross-axis
       (šířka) chová jako fit-content místo stretch a bez explicitní šířky
       by se natáhl podle nejširšího vnořeného řádku (horizontální scroll). */
    width: 100%;
    max-width: 100%;
    padding-bottom: 3rem;
}

.mz-card {
    /* main-layout (obecne.css) je na mobilu flex-direction:column s
       align-items:flex-start — tj. položky se v cross-axis (šířka) chovají
       jako fit-content místo stretch. Bez explicitní šířky by se .mz-card
       (a tedy i main-content) natáhla podle nejširšího vnořeného řádku
       a způsobila horizontální scroll. */
    width: 100%;
    max-width: 100%;
    padding: 1.5rem;
}
@media (min-width: 768px) {
    .mz-card { padding: 2rem; }
}

/* =============================================================
   BANNER (přebráno vizuálně z pridat-zivotopis.css)
   ============================================================= */
.banner-card {
    margin-bottom: 1.5rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, hsl(33 100% 50%), hsl(28 100% 55%), hsl(38 95% 55%));
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px hsl(33 100% 50% / 0.25);
}
.banner-content {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}
.banner-icon {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.banner-icon img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 0.5rem;
}
.banner-text {
    font-size: 1rem;
    font-weight: 600;
    color: white;
    line-height: 1.5;
}
@media (min-width: 768px) {
    .banner-text { font-size: 1.0625rem; }
}

/* =============================================================
   NADPIS STRÁNKY (přebráno z pridat-zivotopis.css)
   ============================================================= */
.cv-page-title {
    font-size: 1.375rem;
    font-weight: bold;
    color: hsl(var(--foreground));
    margin-bottom: 0.375rem;
}
@media (min-width: 768px) {
    .cv-page-title { font-size: 1.5rem; }
}

/* =============================================================
   HLAVIČKA + AKCE
   ============================================================= */
.mz-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.mz-subtitle {
    font-size: 0.9375rem;
    color: hsl(var(--muted-foreground));
}

.mz-head-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    flex-shrink: 0;
}

/* Tlačítka sdílená se zivotopis-soukromi.css (.zs-btn) — definujeme
   je tu znovu, ať je moje-zivotopisy.css samostatně kompletní. */
.zs-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.125rem;
    border-radius: 0.625rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}
.zs-btn--ghost {
    background: hsl(var(--card));
    border-color: hsl(var(--border));
    color: hsl(var(--foreground));
}
.zs-btn--ghost:hover { background: hsl(var(--secondary)); }
.zs-btn--primary {
    background: hsl(var(--primary));
    color: white;
}
.zs-btn--primary:hover { opacity: 0.92; }

/* =============================================================
   INFO PRUH
   ============================================================= */
.mz-info {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1.75rem;
    background: hsl(var(--accent) / 0.08);
    border: 1px solid hsl(var(--accent) / 0.25);
    border-radius: 0.625rem;
    font-size: 0.8125rem;
    color: hsl(var(--foreground));
    line-height: 1.5;
}
.mz-info > .lucide-sm { flex-shrink: 0; color: hsl(var(--accent)); margin-top: 0.125rem; }
.mz-info span { min-width: 0; }
.mz-info strong { color: hsl(var(--accent)); }
.mz-info code {
    background: hsl(var(--accent) / 0.12);
    padding: 0.0625rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    word-break: break-all;
}

/* =============================================================
   SEZNAM ŽIVOTOPISŮ
   ============================================================= */
.mz-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mz-item {
    display: flex;
    min-width: 0;
    gap: 1.125rem;
    padding: 1.25rem;
    border: 1px solid hsl(var(--border));
    border-radius: 0.875rem;
    background: hsl(var(--card));
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.mz-item__thumb {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    background: hsl(var(--primary) / 0.12);
    color: hsl(var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
}
.mz-item__thumb .lucide { width: 1.375rem; height: 1.375rem; }

.mz-item__body {
    flex: 1 1 auto;
    min-width: 0;
}

.mz-item__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 0.25rem;
}

.mz-item__nazev {
    font-size: 1rem;
    font-weight: 500;
    color: hsl(var(--foreground));
}

.mz-item__popis {
    font-size: 0.8438rem;
    color: hsl(var(--muted-foreground));
    margin-bottom: 0.625rem;
}

/* Badge souhrnného stavu soukromí */
.mz-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3125rem;
    padding: 0.1875rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}
.mz-badge .lucide-sm { width: 0.75rem; height: 0.75rem; }
.mz-badge--ok    { background: hsl(var(--success) / 0.12); color: hsl(var(--success)); }
.mz-badge--warn  { background: hsl(var(--warning) / 0.15); color: hsl(38 92% 38%); }
.mz-badge--muted { background: hsl(var(--secondary)); color: hsl(var(--muted-foreground)); }

/* Meta chipy (šablona, aktualizace, zobrazení) */
.mz-item__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-bottom: 0.75rem;
}
.mz-item__meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3125rem;
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
}
.mz-item__meta-chip .lucide-sm { width: 0.75rem; height: 0.75rem; }

/* URL řádek */
.mz-url {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: hsl(var(--secondary) / 0.6);
    border: 1px dashed hsl(var(--border));
    border-radius: 0.5rem;
    font-size: 0.8125rem;
}
.mz-url > .lucide-sm:first-child { flex-shrink: 0; color: hsl(var(--muted-foreground)); }
.mz-url--pretty {
    background: hsl(var(--success) / 0.08);
    border: 1px solid hsl(var(--success) / 0.3);
}
.mz-url--pretty > .lucide-sm:first-child { color: hsl(var(--success)); }

.mz-url__text {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    color: hsl(var(--foreground));
}

.mz-url__copy {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.3125rem;
    appearance: none;
    border: none;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    padding: 0.3125rem 0.625rem;
    border-radius: 0.375rem;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 500;
    color: hsl(var(--foreground));
    cursor: pointer;
    transition: background 0.15s;
}
.mz-url__copy:hover { background: hsl(var(--secondary)); }

/* Akce vpravo */
.mz-item__actions {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    width: 8.5rem;
}

.mz-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4375rem 0.625rem;
    border-radius: 0.5rem;
    border: 1px solid hsl(var(--border));
    background: hsl(var(--card));
    color: hsl(var(--foreground));
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.mz-action-btn:hover { background: hsl(var(--secondary)); }
.mz-action-btn--danger { color: hsl(var(--destructive)); }
.mz-action-btn--danger:hover {
    background: hsl(var(--destructive) / 0.08);
    border-color: hsl(var(--destructive) / 0.35);
}

/* =============================================================
   KARTA "PŘIDAT DALŠÍ"
   ============================================================= */
.mz-add-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    border: 2px dashed hsl(var(--border));
    border-radius: 0.875rem;
    text-decoration: none;
    transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.mz-add-card:hover {
    border-color: hsl(var(--primary) / 0.5);
    background: hsl(var(--primary) / 0.04);
    transform: translateY(-1px);
}

.mz-add-card__icon {
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    background: hsl(var(--secondary));
    color: hsl(var(--muted-foreground));
    display: flex;
    align-items: center;
    justify-content: center;
}
.mz-add-card:hover .mz-add-card__icon {
    background: hsl(var(--primary) / 0.15);
    color: hsl(var(--primary));
}

.mz-add-card__text { flex: 1 1 auto; min-width: 0; }
.mz-add-card__title {
    font-size: 0.9375rem;
    font-weight: 500;
    color: hsl(var(--foreground));
    margin-bottom: 0.125rem;
}
.mz-add-card__desc {
    font-size: 0.8125rem;
    color: hsl(var(--muted-foreground));
    line-height: 1.4;
}
.mz-add-card__arrow {
    flex-shrink: 0;
    color: hsl(var(--muted-foreground));
    width: 1.125rem;
    height: 1.125rem;
}

/* =============================================================
   RESPONZIVITA
   ============================================================= */
@media (max-width: 720px) {
    .mz-head { flex-direction: column; align-items: stretch; }
    .mz-head-actions { flex-direction: column; }
    .mz-head-actions .zs-btn { justify-content: center; }

    .mz-item { flex-direction: column; }
    .mz-item__actions { flex-direction: row; width: 100%; flex-wrap: wrap; }
    .mz-action-btn {
        flex: 1 1 calc(50% - 0.1875rem);
        min-width: 0;
        justify-content: center;
        white-space: nowrap;
    }

    .mz-add-card { flex-wrap: wrap; }
}
