/* ==========================================================================
   laf_lafdev_styles.css — LAFDevLafDesign (LAF Nesne Yönetimi) sayfası
   index.html'e eklenir:
     <link href="css/laf_lafdev_styles.css" rel="stylesheet" />

   Masaüstü : sol olaylar (240px) | orta kod (kalan) | sağ nesneler + özellikler (340px)
              yan paneller .lafdev-collapsed ile gizlenir
   Mobil    : yan paneller kod alanının üzerine açılan çekmeceler (.lafdev-mopen)
   ========================================================================== */

:root {
    --lafdev-left-width: 240px;
    --lafdev-right-width: 340px;
}

.lafdev-root {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 10px;
    box-sizing: border-box; /* padding yüksekliğe dahil: sayfa taşmasın */
}

.lafdev-body {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    gap: 8px;
    overflow: hidden;
}

/* --- Yan paneller --- */
.lafdev-left,
.lafdev-right {
    flex: 0 0 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--LAF-palette-lines);
    border-radius: var(--LAF-default-border-radius);
    background: var(--LAF-default-editor-background);
    overflow: hidden;
}

.lafdev-left {
    width: var(--lafdev-left-width);
}

.lafdev-right {
    width: var(--lafdev-right-width);
}

.lafdev-collapsed {
    display: none;
}

.lafdev-panel-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 36px;
    padding: 2px 6px 2px 10px;
    border-bottom: 1px solid var(--LAF-palette-lines);
    box-sizing: border-box;
}

.lafdev-panel-head-sub {
    border-top: 1px solid var(--LAF-palette-lines);
}

.lafdev-panel-title {
    font-weight: 600;
}

.lafdev-panel-count {
    margin-left: auto;
    font-size: 0.8em;
    opacity: 0.6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lafdev-spacer {
    flex: 1 1 auto;
}

.lafdev-iconbtn {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: var(--LAF-default-border-radius);
    background: transparent;
    color: inherit;
    cursor: pointer;
    transition: background .12s ease, border-color .12s ease;
}

    .lafdev-iconbtn svg {
        width: 16px;
        height: 16px;
    }

    .lafdev-iconbtn:hover:not(:disabled) {
        background: color-mix(in srgb, var(--LAF-palette-primary) 10%, transparent);
        border-color: var(--LAF-palette-lines-input);
    }

    .lafdev-iconbtn:disabled {
        opacity: 0.3;
        cursor: default;
    }

.lafdev-danger:hover:not(:disabled) {
    color: var(--LAF-palette-error, #d32f2f);
}

/* masaüstü / mobil butonları */
.lafdev-mob {
    display: none;
}

/* --- Olay listesi --- */
.lafdev-filter {
    flex: 0 0 auto;
    padding: 6px;
    border-bottom: 1px solid var(--LAF-palette-lines);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lafdev-filter-input {
    width: 100%;
    height: 28px;
    box-sizing: border-box;
    padding: 0 8px;
    border: 1px solid var(--LAF-palette-lines-input);
    border-radius: var(--LAF-default-border-radius);
    background: transparent;
    color: inherit;
    font: inherit;
    outline: none;
}

    .lafdev-filter-input:focus {
        border-color: var(--LAF-palette-primary);
    }

.lafdev-filter-used {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82em;
    opacity: 0.75;
    cursor: pointer;
    user-select: none;
}

.lafdev-eventlist {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 4px;
}

.lafdev-event {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 4px 8px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 0.86em;
    text-align: left;
    cursor: pointer;
    opacity: 0.62;
}

    .lafdev-event:hover {
        background: color-mix(in srgb, var(--LAF-palette-primary) 8%, transparent);
        opacity: 1;
    }

.lafdev-event-used {
    font-weight: 600;
    opacity: 1;
}

.lafdev-event-selected {
    background: color-mix(in srgb, var(--LAF-palette-primary) 16%, transparent);
    opacity: 1;
}

.lafdev-event-dot {
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: 1.5px solid currentColor;
    opacity: 0.4;
}

.lafdev-event-used .lafdev-event-dot {
    border-color: var(--LAF-palette-primary);
    background: var(--LAF-palette-primary);
    opacity: 1;
}

.lafdev-event-name {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Orta --- */
.lafdev-center {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--LAF-palette-lines);
    border-radius: var(--LAF-default-border-radius);
    background: var(--LAF-default-editor-background);
    overflow: hidden;
}

.lafdev-toolbar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 38px;
    padding: 2px 6px;
    border-bottom: 1px solid var(--LAF-palette-lines);
    box-sizing: border-box;
}

.lafdev-tabs {
    display: flex;
    gap: 2px;
    min-width: 0;
    overflow-x: auto;
}

.lafdev-tab {
    flex: 0 0 auto;
    height: 30px;
    padding: 0 12px;
    border: none;
    border-radius: var(--LAF-default-border-radius);
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 0.9em;
    cursor: pointer;
    opacity: 0.7;
}

    .lafdev-tab:hover {
        background: color-mix(in srgb, var(--LAF-palette-primary) 8%, transparent);
        opacity: 1;
    }

.lafdev-tab-active {
    background: color-mix(in srgb, var(--LAF-palette-primary) 15%, transparent);
    color: var(--LAF-palette-primary);
    font-weight: 600;
    opacity: 1;
}

.lafdev-eventhead {
    flex: 0 0 auto;
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    padding: 6px 12px;
    border-bottom: 1px solid var(--LAF-palette-lines);
    font-size: 0.88em;
}

.lafdev-eventhead-name {
    font-weight: 700;
    color: var(--LAF-palette-primary);
}

.lafdev-eventhead-sig {
    opacity: 0.65;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.95em;
}

.lafdev-editor {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* Üretilen kod */
.lafdev-generated {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 6px 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.82em;
    line-height: 1.5;
}

.lafdev-genline {
    display: flex;
    white-space: pre;
}

.lafdev-genno {
    flex: 0 0 auto;
    width: 52px;
    padding-right: 12px;
    text-align: right;
    opacity: 0.4;
    user-select: none;
}

.lafdev-gentext {
    padding-right: 16px;
}

/* Nesne bilgileri */
.lafdev-info {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 8px;
}

.lafdev-warnlist {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.88em;
    opacity: 0.85;
}

.lafdev-empty {
    padding: 24px;
    text-align: center;
    opacity: 0.6;
}

/* --- Nesne ağacı --- */
.lafdev-objtree {
    flex: 0 0 auto;
    max-height: 38%;
    min-height: 120px;
    overflow-y: auto;
    padding: 4px;
}

.lafdev-objgroup {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    margin-top: 2px;
    padding: 4px 6px;
    border: none;
    border-radius: 6px;
    background: color-mix(in srgb, var(--LAF-palette-primary) 6%, transparent);
    color: inherit;
    font: inherit;
    font-size: 0.82em;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-align: left;
    cursor: pointer;
}

.lafdev-objgroup-count {
    margin-left: auto;
    font-weight: 400;
    opacity: 0.6;
}

.lafdev-chev {
    width: 12px;
    height: 12px;
    opacity: 0.7;
    transition: transform .15s ease;
}

.lafdev-chev-open {
    transform: rotate(90deg);
}

.lafdev-obj {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 6px 8px 6px 24px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.lafdev-obj-form {
    padding-left: 8px;
    font-weight: 700;
}

.lafdev-obj:hover {
    background: color-mix(in srgb, var(--LAF-palette-primary) 8%, transparent);
}

.lafdev-obj-selected {
    background: color-mix(in srgb, var(--LAF-palette-primary) 16%, transparent);
}

.lafdev-obj-name {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lafdev-obj-type {
    margin-left: auto;
    font-size: 0.82em;
    opacity: 0.55;
    white-space: nowrap;
}

.lafdev-props {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.lafdev-scrim {
    display: none;
}

/* ==========================================================================
   Mobil / dar ekran: yan paneller çekmece
   ========================================================================== */
@media (max-width: 900px) {
    .lafdev-desk {
        display: none;
    }

    .lafdev-mob {
        display: inline-flex;
    }

    .lafdev-body {
        gap: 0;
    }

    .lafdev-left,
    .lafdev-right,
    .lafdev-left.lafdev-collapsed,
    .lafdev-right.lafdev-collapsed {
        display: flex;
        position: absolute;
        top: 0;
        bottom: 0;
        z-index: 31;
        width: min(88vw, 380px);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
        transition: transform .2s ease;
    }

    .lafdev-left {
        left: 0;
        transform: translateX(-105%);
    }

    .lafdev-right {
        right: 0;
        transform: translateX(105%);
    }

        .lafdev-left.lafdev-mopen,
        .lafdev-right.lafdev-mopen {
            transform: translateX(0);
        }

    .lafdev-scrim {
        display: block;
        position: absolute;
        inset: 0;
        z-index: 30;
        background: rgba(0, 0, 0, 0.35);
    }

    .lafdev-objtree {
        max-height: 34%;
    }
}

/* ==========================================================================
   LAF tasarımcısı dialog'ları (LAFDialogLafDesign*): içerik boşluğu
   ========================================================================== */
.lafdlg-pad {
    padding: 10px;
    box-sizing: border-box;
}
