/* ============================
   App Styles — Editor & Layout
   ============================ */

.custom-scrollbar::-webkit-scrollbar { width: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: #f1f5f9; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Drag & Drop */
[data-section-id] {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: grab;
}
[data-section-id].dragging {
    opacity: 0.4;
    transform: scale(0.97);
}
[data-section-id].drag-over {
    box-shadow: inset 0 -2px 0 #6366f1;
}
[data-section-id]:active {
    cursor: grabbing;
}

/* Tip popover (speech bubble) */
.tip-popover {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 220px;
    max-width: 280px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 10px 14px 10px 28px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
    z-index: 50;
    animation: tipPopIn 0.18s ease-out;
    direction: rtl;
}
.tip-popover-arrow {
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: #fffbeb;
    border-top: 1px solid #fde68a;
    border-left: 1px solid #fde68a;
}
@keyframes tipPopIn {
    from { opacity: 0; transform: translateX(-50%) translateY(4px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Validation pill */
.validation-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

/* Section toggle checkbox */
.section-toggle:checked {
    background-color: #4f46e5;
    border-color: #4f46e5;
}
