/* ═══════════════════════════════════════════════
   NERON TRADER — Gridstack Customizations
   ═══════════════════════════════════════════════ */

.grid-stack {
    height: 100%;
    background: var(--bg-primary);
}

/* Grid item */
.grid-stack-item {
    /* Override gridstack defaults */
}

.grid-stack-item-content {
    border-radius: var(--radius);
    overflow: hidden;
}

/* Placeholder (sürükleme sırasında) */
.grid-stack-placeholder > .placeholder-content {
    background: var(--accent-muted) !important;
    border: 2px dashed var(--accent) !important;
    border-radius: var(--radius) !important;
    opacity: 0.5;
}

/* Resize handle */
.grid-stack-item > .ui-resizable-se {
    width: 14px;
    height: 14px;
    bottom: 2px;
    right: 2px;
    background: none;
}
.grid-stack-item > .ui-resizable-se::before {
    content: '';
    position: absolute;
    bottom: 3px;
    right: 3px;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    opacity: 0;
    transition: opacity var(--transition);
}
.grid-stack-item:hover > .ui-resizable-se::before {
    opacity: 0.5;
}

/* Drag animation */
.grid-stack-item.ui-draggable-dragging {
    opacity: 0.9;
    z-index: 999 !important;
}
.grid-stack-item.ui-draggable-dragging .widget-frame {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    border-color: var(--accent);
}

/* Cell height override for better default sizing */
.grid-stack > .grid-stack-item {
    min-height: 0;
}

/* Gap between widgets */
.grid-stack {
    --gs-gutter: 4px;
}

/* Glass themes — grid-stack'in opak bg'si body gradient'ini örtmesin */
[data-theme="glass"] .grid-stack,
[data-theme="glass-green"] .grid-stack,
[data-theme="glass-purple"] .grid-stack,
[data-theme="glass-amber"] .grid-stack,
[data-theme="glass-carbon"] .grid-stack {
    background: transparent;
}

/* Mobile grid — tab sistemi kullanılır, gridstack tamamen devre dışı */
@media (max-width: 768px) {
    .grid-stack {
        display: none !important;
        --gs-gutter: 0px;
    }
    .grid-stack-item-content {
        border-radius: 0;
    }
    .grid-stack-item > .ui-resizable-se {
        display: none;
    }
    /* Gridstack placeholder & dragging — mobilde gereksiz */
    .grid-stack-placeholder,
    .grid-stack-item.ui-draggable-dragging {
        display: none !important;
    }
}
