/* ==========================================================================
   laf_propertygrid_styles.css — LAF_PropertyGrid ve LAFPropertyGrid stilleri
   index.html'e eklenir:
     <link href="css/laf_propertygrid_styles.css" rel="stylesheet" />
   ========================================================================== */

.laf-pg {
    width: 100%;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    font-size: 0.92em;
}

.laf-pg-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    border: 1px solid var(--LAF-palette-lines);
    border-radius: var(--LAF-default-border-radius);
    background: var(--LAF-default-editor-background);
}

/* Çerçevesiz: çerçeve / zemin dış kaptan (LAFPaper) gelir */
.laf-pg-borderless .laf-pg-scroll {
    border: none;
    border-radius: 0;
    background: transparent;
}

.laf-pg-empty {
    padding: 16px;
    text-align: center;
    opacity: 0.6;
}

/* --- Grup başlığı --- */
.laf-pg-group {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 5px 8px;
    border: none;
    border-bottom: 1px solid var(--LAF-palette-lines);
    background: color-mix(in srgb, var(--LAF-palette-primary) 7%, var(--LAF-default-editor-background));
    color: inherit;
    font: inherit;
    font-weight: 600;
    font-size: 0.9em;
    letter-spacing: 0.02em;
    text-align: left;
    cursor: pointer;
    user-select: none;
}

.laf-pg-chevron {
    width: 12px;
    height: 12px;
    flex: 0 0 auto;
    opacity: 0.7;
    transition: transform .15s ease;
}

.laf-pg-chevron-open {
    transform: rotate(90deg);
}

/* --- Satır --- */
.laf-pg-row {
    display: flex;
    align-items: center;
    min-height: 32px;
    border-bottom: 1px solid var(--LAF-palette-lines);
}

.laf-pg-row:last-child {
    border-bottom: none;
}

.laf-pg-caption {
    box-sizing: border-box;
    padding: 0 8px 0 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    align-self: stretch;
    display: flex;
    align-items: center;
    border-right: 1px solid var(--LAF-palette-lines);
    opacity: 0.85;
}

.laf-pg-value {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 1px 4px;
    position: relative;
}

.laf-pg-row-selected {
    background: color-mix(in srgb, var(--LAF-palette-primary) 10%, transparent);
}

/* Varsayılandan farklı değer (WinForms'taki haki vurgu) */
.laf-pg-row-changed .laf-pg-caption {
    font-weight: 600;
    opacity: 1;
}

.laf-pg-row-changed .laf-pg-value {
    background: color-mix(in srgb, var(--LAF-palette-warning, #f5b400) 13%, transparent);
}

.laf-pg-row-readonly .laf-pg-value {
    opacity: 0.6;
}

/* --- Düzenleyiciler --- */
.laf-pg-input {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    height: 28px;
    box-sizing: border-box;
    padding: 0 6px;
    border: 1px solid transparent;
    border-radius: var(--LAF-default-border-radius);
    background: transparent;
    color: inherit;
    font: inherit;
    outline: none;
    transition: border-color .12s ease, background .12s ease;
}

.laf-pg-input:hover:not([readonly]):not(:disabled) {
    border-color: var(--LAF-palette-lines-input);
}

.laf-pg-input:focus:not([readonly]) {
    border-color: var(--LAF-palette-primary);
    background: var(--LAF-default-editor-background);
}

.laf-pg-upper {
    text-transform: uppercase;
}

.laf-pg-text {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

.laf-pg-placeholder {
    opacity: 0.45;
}

.laf-pg-select,
.laf-pg-btncell {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    text-align: left;
}

.laf-pg-select {
    padding-right: 22px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%23888' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    background-size: 12px 12px;
}

.laf-pg-select:disabled,
.laf-pg-btncell:disabled {
    cursor: default;
}

.laf-pg-dots {
    flex: 0 0 auto;
    color: var(--LAF-palette-primary);
    font-weight: 700;
}

.laf-pg-dotsbtn,
.laf-pg-reset {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    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: var(--LAF-palette-primary);
    font-weight: 700;
    cursor: pointer;
    transition: background .12s ease, border-color .12s ease;
}

.laf-pg-reset {
    color: inherit;
    opacity: 0.55;
}

.laf-pg-reset svg {
    width: 14px;
    height: 14px;
}

.laf-pg-dotsbtn:hover:not(:disabled),
.laf-pg-reset:hover {
    background: color-mix(in srgb, var(--LAF-palette-primary) 10%, transparent);
    border-color: var(--LAF-palette-lines-input);
    opacity: 1;
}

.laf-pg-dotsbtn:disabled {
    opacity: 0.3;
    cursor: default;
}

/* Bool */
.laf-pg-check {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-left: 6px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--LAF-palette-lines-input);
    border-radius: 4px;
    background: transparent;
    color: #fff;
    cursor: pointer;
}

.laf-pg-check-on {
    border-color: var(--LAF-palette-primary);
    background: var(--LAF-palette-primary);
}

.laf-pg-check svg {
    width: 12px;
    height: 12px;
}

.laf-pg-check:disabled {
    cursor: default;
}

.laf-pg-booltext {
    margin-left: 6px;
    opacity: 0.7;
    font-size: 0.92em;
}

/* --- Açılır liste (tarayıcının select menüsü yerine; temaya uyar) --- */
.laf-pg-dd {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
}

.laf-pg-dd-open {
    border-color: var(--LAF-palette-primary) !important;
}

.laf-pg-dd-overlay {
    position: fixed;
    inset: 0;
    z-index: 19;
    background: transparent;
}

.laf-pg-dd-list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 20;
    min-width: 180px;
    max-height: 260px;
    overflow-y: auto;
    padding: 4px;
    box-sizing: border-box;
    border: 1px solid var(--LAF-palette-lines-input);
    border-radius: var(--LAF-default-border-radius);
    background: color-mix(in srgb, var(--LAF-default-editor-background) 88%, transparent);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    backdrop-filter: blur(18px) saturate(1.4);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
    outline: none;
}

.laf-pg-dd-item {
    padding: 6px 10px;
    border-radius: 6px;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
}

.laf-pg-dd-item:hover,
.laf-pg-dd-hi {
    background: color-mix(in srgb, var(--LAF-palette-primary) 14%, transparent);
}

.laf-pg-dd-sel {
    font-weight: 600;
    color: var(--LAF-palette-primary);
}

/* --- LAFPropertyGrid wrapper --- */
.lafpropertygrid-host {
    min-height: 0;
    min-width: 0;
}
