/* ===== FLOORPLAN EDITOR - LIGHT THEME (Admin Panel) ===== */
/* Adaptálva a dev-admin dark theme-ből */

.fp-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }
.fp-header-actions { display: flex; gap: 8px; align-items: center; }

.fp-floor-tabs { display: flex; gap: 4px; margin-bottom: 12px; flex-wrap: wrap; align-items: center; }
.fp-floor-tab { padding: 8px 16px; border: 1px solid #d1d5db; border-radius: 8px 8px 0 0; background: #f9fafb; color: #6b7280; cursor: pointer; font-size: 13px; transition: all 0.2s; }
.fp-floor-tab:hover { background: #e5e7eb; color: #1f2937; }
.fp-floor-tab.active { background: rgba(33,81,164,0.1); border-color: #2151a4; color: #2151a4; font-weight: 600; }
.fp-floor-tab.add-floor { border-style: dashed; color: #9ca3af; }
.fp-floor-tab.add-floor:hover { color: #2151a4; border-color: #2151a4; }

.fp-toolbar { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; padding: 10px; background: #f3f4f6; border-radius: 10px; border: 1px solid #e5e7eb; }
.fp-toolbar-sep { width: 1px; height: 28px; background: #d1d5db; margin: 0 6px; }
.fp-tool-btn { padding: 8px 14px; border: 1px solid #d1d5db; border-radius: 8px; background: #ffffff; color: #4b5563; cursor: pointer; font-size: 13px; transition: all 0.15s; display: inline-flex; align-items: center; gap: 6px; }
.fp-tool-btn:hover { background: #e5e7eb; color: #1f2937; }
.fp-tool-btn.active { background: #2151a4; border-color: #2151a4; color: #fff; }
.fp-tool-btn.danger { border-color: rgba(220,53,69,0.4); color: #dc3545; }
.fp-tool-btn.danger.active { background: #dc3545; border-color: #dc3545; color: #fff; }

.fp-editor { display: flex; gap: 16px; min-height: 450px; }
.fp-grid-wrap { flex: 1; overflow: auto; padding: 16px; background: #f9fafb; border-radius: 10px; border: 1px solid #e5e7eb; text-align: center; position: relative; }
.fp-grid { display: inline-grid; gap: 1px; background: #e5e7eb; user-select: none; }
.fp-cell { width: 48px; height: 48px; border: 1px solid #e5e7eb; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 11px; color: #6b7280; transition: background 0.1s, outline 0.1s; position: relative; border-radius: 4px; background: #ffffff; }
.fp-cell:hover { outline: 2px solid rgba(33,81,164,0.5); z-index: 1; }
.fp-cell.empty { background: #f9fafb; }
.fp-cell.desk { background: linear-gradient(135deg, #10b981 0%, #059669 100%); font-weight: 600; color: #fff; border-radius: 6px; }
.fp-cell.selected { outline: 3px solid #f59e0b !important; z-index: 2; }
.fp-sidebar { width: 280px; min-width: 280px; display: flex; flex-direction: column; gap: 12px; }
.fp-sidebar-section { background: #ffffff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 14px; }
.fp-sidebar-title { font-size: 12px; font-weight: 600; color: #6b7280; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; }

.fp-desk-list { display: flex; flex-wrap: wrap; gap: 4px; }
.fp-desk-chip { padding: 4px 10px; border-radius: 6px; font-size: 12px; cursor: pointer; transition: all 0.15s; border: 1px solid #d1d5db; }
.fp-desk-chip.available { background: rgba(16,185,129,0.1); color: #059669; border-color: rgba(16,185,129,0.3); }
.fp-desk-chip.available:hover { background: rgba(16,185,129,0.2); }
.fp-desk-chip.selected { background: #2151a4; color: #fff; border-color: #2151a4; }
.fp-desk-chip.placed { background: #f3f4f6; color: #9ca3af; cursor: default; }

.fp-preview-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 500; background: rgba(245,158,11,0.15); color: #d97706; margin-left: 8px; }

.fp-input { width: 100%; padding: 8px 12px; background: #ffffff; border: 1px solid #d1d5db; border-radius: 6px; color: #1f2937; font-size: 13px; }
.fp-input:focus { outline: none; border-color: #2151a4; box-shadow: 0 0 0 2px rgba(33,81,164,0.15); }

.fp-grid-size { display: flex; gap: 6px; align-items: center; font-size: 13px; color: #6b7280; }
.fp-grid-size input { width: 50px; text-align: center; }

.fp-status { font-size: 12px; color: #6b7280; padding: 4px 0; }
.fp-unsaved { color: #d97706; }
.fp-tool-hint { font-size: 12px; color: #9ca3af; padding: 4px 12px; margin-left: auto; font-style: italic; }

/* Preview mode */
.fp-preview-container { padding: 16px; }
.fp-preview-grid { display: inline-grid; gap: 3px; }
.fp-preview-empty { width: 56px; height: 56px; border-radius: 4px; }
.fp-preview-desk { width: 56px; height: 56px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; transition: transform 0.15s, box-shadow 0.15s; opacity: 0.9; }
.fp-preview-desk:hover { transform: scale(1.08); box-shadow: 0 4px 12px rgba(0,0,0,0.15); opacity: 1; }
.fp-preview-desk-icon { font-size: 16px; line-height: 1; }
.fp-preview-desk-label { font-size: 10px; color: #fff; font-weight: 600; margin-top: 2px; }

/* Booking-style preview kártyák */
.fp-preview-booking-card { border-radius: 12px; padding: 16px; margin-bottom: 16px; border: 1px solid #e5e7eb; background: #ffffff; }
.fp-preview-booking-title { font-size: 14px; font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; color: #1f2937; }
.fp-preview-booking-desks { display: flex; flex-wrap: wrap; gap: 8px; }
.fp-preview-booking-desk { padding: 10px 16px; border-radius: 10px; background: #f9fafb; border: 1px solid #e5e7eb; cursor: pointer; transition: all 0.15s; text-align: center; min-width: 70px; }
.fp-preview-booking-desk:hover { background: rgba(16,185,129,0.1); border-color: #10b981; transform: translateY(-2px); }
.fp-preview-booking-desk .desk-code { font-size: 14px; font-weight: 600; color: #1f2937; }
.fp-preview-booking-desk .desk-status { font-size: 11px; color: #10b981; margin-top: 4px; }

/* Editor without sidebar */
.fp-editor-nosidebar { display: block; min-height: 450px; }

/* ===== VALIDATION BANNER ===== */
.fp-validation-banner {
    padding: 8px 14px;
    margin-bottom: 8px;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    font-size: 12px;
    color: #92400e;
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.5;
}

/* ===== CELL POPUP ===== */
.fp-cell-popup {
    position: fixed;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.18);
    min-width: 280px;
    max-width: 320px;
    z-index: 10000;
    animation: fpPopupIn 0.15s ease;
}
.fp-cell-popup-header {
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    gap: 6px;
}
.fp-cell-popup-body { padding: 12px 14px; }
.fp-cell-popup-footer {
    padding: 10px 14px;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 0 0 12px 12px;
}
@keyframes fpPopupIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== DECORATION CELL TYPES ===== */
.fp-cell.wall { background: #9ca3af; cursor: pointer; border-radius: 4px; }
.fp-cell.plant { background: #f0fdf4; cursor: pointer; border-radius: 6px; }
.fp-cell.decoration { background: #d1d5db; cursor: pointer; border-radius: 4px; opacity: 0.7; }

/* ===== PALETTE ===== */
.fp-palette { display: flex; gap: 6px; align-items: center; flex-wrap: nowrap; }
.fp-palette-item {
    padding: 6px 12px;
    border: 2px solid #d1d5db;
    border-bottom: 3px solid #9ca3af;
    border-radius: 10px;
    background: linear-gradient(to bottom, #fff, #f3f4f6);
    cursor: grab;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #4b5563;
    transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
    min-height: 36px;
    white-space: nowrap;
    user-select: none;
}
.fp-palette-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}
.fp-palette-item:active {
    transform: translateY(1px);
    border-bottom-width: 1px;
}
.fp-palette-item.active {
    color: white;
    border-color: transparent;
    border-bottom-color: transparent;
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(0,0,0,0.2);
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.fp-palette-item img { width: 20px; height: 20px; object-fit: contain; }

/* ===== DRAG & DROP ===== */
.fp-cell.desk { cursor: grab; }
.fp-cell.desk:active { cursor: grabbing; }
.fp-cell.dragging {
    opacity: 0.35;
    outline: 2px dashed #2151a4 !important;
}
.fp-cell.drop-target {
    background: rgba(33,81,164,0.12) !important;
    outline: 2px dashed #2151a4 !important;
}

/* Floor tab context menu */
.fp-floor-context {
    position: absolute;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    z-index: 200;
    min-width: 160px;
    animation: fpPopupIn 0.12s ease;
}
.fp-floor-context-item {
    padding: 8px 14px;
    font-size: 13px;
    color: #1f2937;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}
.fp-floor-context-item:first-child { border-radius: 8px 8px 0 0; }
.fp-floor-context-item:last-child { border-radius: 0 0 8px 8px; }
.fp-floor-context-item:hover { background: #f3f4f6; }
.fp-floor-context-item.danger { color: #dc3545; }
.fp-floor-context-item.danger:hover { background: #fef2f2; }

/* Responsive */
@media (max-width: 900px) {
    .fp-editor { flex-direction: column; }
    .fp-sidebar { width: 100%; min-width: unset; }
}

@media (max-width: 768px) {
    .fp-cell-popup {
        min-width: 260px;
        max-width: 95vw;
    }
    .fp-palette { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .fp-palette-item { padding: 4px 8px; font-size: 11px; min-height: 32px; }
    .fp-palette-item img { width: 16px; height: 16px; }
    .fp-toolbar { gap: 4px; padding: 8px; }
}
