﻿/* =========================================================
 * LAF_Dialog  (MudDialog + MudDialogProvider muadili)
 * ---------------------------------------------------------
 * ÖNEMLİ: Bu dosya index.html'de yuklenmeli VEYA bu blok mevcut
 * laf.css'inin icine yapistirilmalidir. Yuklenmezse dialog'un
 * arka plani / flex yerlesimi olusmaz; icerik buzulur, arkadaki
 * sayfa gorunur ve autosize dikine buyur.
 *
 * Tema renkleri --mud-palette-* uzerinden (senin temanla ayni).
 * ========================================================= */

/* ── OVERLAY + SCRIM (MudDialogProvider muadili) ── */
.laf-dlg-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mud-palette-overlay-dark, rgba(0, 0, 0, .5));
}

    .laf-dlg-overlay.laf-dlg-no-scrim {
        background: transparent;
    }

/* ── DIALOG SHELL ── */
.laf-dlg {
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    width: auto;
    min-width: 320px;
    max-width: 95vw;
    max-width: 95dvw;
    max-height: 90vh;
    max-height: 90dvh;
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    overflow: hidden;
    border-radius: 12px;
    animation: laf-dlg-in .12s ease-out;
}

@keyframes laf-dlg-in {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── LAYOUT BÖLÜMLERİ ──
   .mud-dialog-content override'inla birebir: overflow:hidden + padding:0.
   Boylece .laf2-root (height:100%) definite yukseklik alir, footer dibe oturur,
   scrollbar hic cikmaz, autosize dongusu olusmaz. */
.laf-dlg-titlebar {
    flex: 0 0 auto;
    min-width: 0;
}

.laf-dlg-content {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    padding: 0;
}

.laf-dlg-actions {
    flex: 0 0 auto;
    min-width: 0;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 8px 16px;
}

/* Title / Action yoksa o alani tamamen kaldir */
.laf-dialog-no-title .laf-dlg-titlebar {
    display: none;
}

.laf-dialog-no-action .laf-dlg-actions {
    display: none;
}

/* ── TITLE elevation (eski .mud-elevation-1 gorunumu) ── */
.laf-elevation-1 {
    box-shadow: 0px 2px 1px -1px rgba(0,0,0,0.1), 0px 1px 1px 0px rgba(0,0,0,0.05), 0px 1px 3px 0px rgba(0,0,0,0.02);
}

/* ── NATIVE BUTONLAR (eski MudButton text-button gorunumu) ── */
.laf-dlg-btn {
    border: none;
    background: transparent;
    color: var(--mud-palette-text-primary);
    font: inherit;
    cursor: pointer;
    border-radius: 8px;
    padding: 8px 16px;
    text-transform: none;
    transition: background-color .12s ease;
}

    .laf-dlg-btn:hover {
        background: var(--mud-palette-action-default-hover, rgba(0, 0, 0, .06));
    }

.laf-dlg-btn-primary {
    color: var(--mud-palette-primary);
    font-weight: 600;
}

/* ── BODY SCROLL LOCK ── */
body.laf-dlg-scroll-lock {
    overflow: hidden;
}
