﻿/* ===============================
   TABLE BASE
================================ */
.resizable-table {
    table-layout: auto !important;
    width: max-content;
    min-width: 100%;
}

    .resizable-table th,
    .resizable-table td {
        min-width: 70px;
        white-space: normal;
        overflow: visible;
    }

    .resizable-table th {
        position: relative;
        padding-right: 26px; /* resize alanı */
        vertical-align: middle;
        overflow: hidden; /* ⭐ KRİTİK: yükseklik büyümesini engeller */
    }

/* ===============================
   TH INNER (NO WRAP - STABLE)
================================ */
.th-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    width: 100%;
    flex-wrap: nowrap; /* ❌ wrap KAPALI */
}

/* ===============================
   TITLE
================================ */
.th-title {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1 1 auto;
    min-width: 0;
}

/* ===============================
   ACTION ICONS
================================ */
.th-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0; /* ⭐ daralınca küçülmez */
    margin-left: auto;
}

/* ===============================
   ICON STYLES
================================ */
.sort-icon,
.drag-handle {
    cursor: pointer;
    color: #6c757d;
    font-size: 14px;
}

    .sort-icon:hover,
    .drag-handle:hover {
        color: #405189;
    }

.drag-handle {
    font-size: 15px;
}

    .drag-handle:active {
        cursor: grabbing;
    }

/* ===============================
   COLUMN RESIZER
================================ */
.column-resizer {
    position: absolute;
    top: 0;
    right: 0;
    width: 6px;
    height: 100%;
    cursor: col-resize;
    user-select: none;
    z-index: 6;
}

    .column-resizer:hover {
        background-color: rgba(64, 81, 137, 0.15);
    }

/* ===============================
   FILTER ROW
================================ */
.filter-row th {
    padding: 4px;
    background-color: #f9fafb;
}

.filter-row input {
    width: 100%;
    font-size: 12px;
}

/* ===============================
   DRAG STATES
================================ */
.dragging {
    opacity: 0.6;
}

.drag-over {
    border-right: 2px dashed #405189;
}

/* ===============================
   RIGHT CLICK MENU
================================ */
#rowContextMenu {
    min-width: 180px;
}

.table-active {
    background-color: rgba(0, 123, 255, 0.1);
}

/* ===============================
   STICKY HEADER
================================ */
.table-scroll {
    height: calc(100vh - 220px); /* sayfa sonuna kadar */
    overflow-y: auto;
    position: relative;
}

/* 1️⃣ Başlık satırı */
#cariTable thead tr.resize-row th {
    position: sticky;
    top: 0;
    z-index: 5;
    height: 45px; /* ⭐ SABİT YÜKSEKLİK */
    max-height: 45px;
    background: var(--vz-body-bg, #f8f9fa);
}

/* 2️⃣ Filtre satırı */
#cariTable thead tr.filter-row th {
    position: sticky;
    top: 45px; /* ⚠️ üst satırla birebir */
    z-index: 4;
    background: #ffffff;
}

/* çizgi hissi */
#cariTable thead th {
    box-shadow: inset 0 -1px 0 #dee2e6;
}
