/* Professional Enterprise CSS Theme */
:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --success-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --danger-gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  --info-gradient: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

/* Professional Typography */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Enhanced Shadows */
.shadow-professional {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
}

/* Glass Morphism Effect */
.glass-morphism {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Professional Transitions */
* {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced Buttons */
button {
  font-weight: 500;
  letter-spacing: 0.025em;
  position: relative;
  overflow: hidden;
}

button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

button:active::before {
  width: 300px;
  height: 300px;
}

/* Professional Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 8px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #cbd5e1, #94a3b8);
  border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #94a3b8, #64748b);
}

/* Menu Builder Custom Styles */

.dragging {
  opacity: 0.5;
}

.drag-over {
  border: 2px dashed #3b82f6;
  background-color: #eff6ff;
}

.alignment-btn.active {
  background-color: #dbeafe;
  font-weight: bold;
}

.menu-item {
  transition: box-shadow 0.2s ease;
}

.menu-item:hover {
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.menu-item.opacity-50 {
  opacity: 0.5;
}

.menu-item.dragging {
  opacity: 0.5 !important;
  transform: rotate(2deg) !important;
  z-index: 1000 !important;
  transition: none !important;
  box-shadow: 0 8px 16px rgba(0,0,0,0.3) !important;
}

.menu-item:not(.dragging) {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.drag-preview {
  background: white !important;
  border: 2px solid #3b82f6 !important;
  border-radius: 8px !important;
  opacity: 0.9 !important;
}

.drop-indicator {
  background: linear-gradient(90deg, #3b82f6, #60a5fa, #3b82f6) !important;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.6) !important;
  animation: pulse-indicator 1s ease-in-out infinite alternate;
}

@keyframes pulse-indicator {
  0% { 
    opacity: 0.6; 
    transform: scaleY(1); 
  }
  100% { 
    opacity: 1; 
    transform: scaleY(1.2); 
  }
}

/* Authentication UI Styles */
#loginScreen {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

#loginScreen .bg-white {
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

#loginBtn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

#loginBtn:active {
  transform: translateY(0);
}

.fixed.top-4.right-4 {
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Column Resizer Styles - FLEXBOX VERSION */
.resizable-columns {
  position: relative;
  display: flex;
}

/* Inputs as direct flex children */
.resizable-columns > input {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}

.column-resizer {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 16px;
  cursor: col-resize;
  z-index: 10;
  transition: all 0.2s ease;
  /* Position in the gap between columns */
  transform: translateX(-50%);
  
  /* Visual indicator - subtle vertical line */
  background: linear-gradient(to right, 
    transparent 0%, 
    transparent 45%, 
    rgba(156, 163, 175, 0.3) 50%, 
    transparent 55%, 
    transparent 100%);
  
  /* Add hover area */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Add visual handle dots */
.column-resizer::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 3px;
  height: 20px;
  background-image: radial-gradient(circle, rgba(156, 163, 175, 0.5) 1px, transparent 1px);
  background-size: 3px 6px;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.column-resizer:hover {
  background: linear-gradient(to right, 
    transparent 0%, 
    transparent 40%, 
    rgba(59, 130, 246, 0.3) 50%, 
    transparent 60%, 
    transparent 100%);
  width: 20px;
}

.column-resizer:hover::before {
  opacity: 1;
  background-image: radial-gradient(circle, rgba(59, 130, 246, 0.8) 1px, transparent 1px);
}

.column-resizer.resizing {
  background: linear-gradient(to right, 
    transparent 0%, 
    transparent 35%, 
    rgba(59, 130, 246, 0.5) 50%, 
    transparent 65%, 
    transparent 100%) !important;
  width: 24px !important;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.3);
}

.column-resizer.resizing::before {
  opacity: 1 !important;
  background-image: radial-gradient(circle, #3b82f6 1.5px, transparent 1.5px) !important;
  height: 30px !important;
}

/* Prevent text selection during column resize */
body.col-resizing {
  cursor: col-resize !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
}

body.col-resizing * {
  cursor: col-resize !important;
  user-select: none !important;
}

/* Column container styles */
.column-container {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-width: 0;
}

.column-container input {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

/* Range slider styling */
.slider {
  -webkit-appearance: none;
  appearance: none;
  background: #d3d3d3;
  outline: none;
  border-radius: 5px;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #3b82f6;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #3b82f6;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Floating tooltips */
.floating-alignment-tooltip {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.floating-remove-tooltip,
.floating-controls-tooltip,
.floating-move-tooltip {
  font-size: 14px;
  line-height: 1;
}

.floating-remove-tooltip:hover,
.floating-controls-tooltip .duplicate-btn:hover,
.floating-controls-tooltip .remove-btn:hover,
.floating-move-tooltip .move-up-btn:hover,
.floating-move-tooltip .move-down-btn:hover {
  transform: scale(1.1);
}

.floating-controls-tooltip,
.floating-move-tooltip {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.floating-controls-tooltip .duplicate-btn,
.floating-controls-tooltip .remove-btn,
.floating-move-tooltip .move-up-btn,
.floating-move-tooltip .move-down-btn {
  transition: all 0.2s ease;
}

/* Slot styles for full-width horizontal layout */
.slot-item {
  transition: all 0.2s ease;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.slot-item:hover {
  border-color: #d1d5db;
  background-color: #f9fafb;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Full-width slot grid */
#slotsList {
  gap: 16px;
}

/* Responsive slot layout */
@media (max-width: 1024px) {
  #slotsList {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  #slotsList {
    grid-template-columns: 1fr;
  }
}

/* Menu dropdown styles */
#menuSelector {
  transition: border-color 0.2s ease;
}

#menuSelector:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.2);
}

#menuInfo {
  border: 1px solid #e5e7eb;
  transition: all 0.2s ease;
}

/* Preview Modal Styles - Exact TV Display Dimensions */
#previewModal {
  backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Exact 1080x1920 TV Display Container */
#tvDisplay {
  background: #ffffff;
  border: 4px solid #1a1a1a;
  box-shadow:
    0 0 0 8px rgba(0,0,0,0.1),
    0 0 0 16px rgba(0,0,0,0.05),
    0 30px 60px rgba(0,0,0,0.4);
  /* Exact dimensions: 1080px Ã— 1920px */
  width: 1080px !important;
  height: 1920px !important;
}

/* Menu content uses exact pixel measurements for TV reproduction */
#menuContent {
  background: #ffffff;
  font-family: Arial, sans-serif !important;
  font-weight: normal !important;
  color: #000000;
  padding: 40px !important;
  /* Ensure no scaling or transforms affect text rendering */
  font-smooth: never;
  -webkit-font-smoothing: none;
  text-rendering: optimizeSpeed;
}

/* Responsive scaling for different screen sizes */
@media (max-width: 1400px) {
  #tvDisplay {
    transform: scale(0.3) !important;
  }
}

@media (min-width: 1401px) and (max-width: 1800px) {
  #tvDisplay {
    transform: scale(0.35) !important;
  }
}

@media (min-width: 1801px) {
  #tvDisplay {
    transform: scale(0.4) !important;
  }
}

/* Clickable slot elements */
.slot-item .cursor-pointer {
  transition: all 0.2s ease;
}

.slot-item .cursor-pointer:hover {
  text-decoration-thickness: 2px;
  transform: translateY(-1px);
}

/* Modal styles */
#promoteModal {
  backdrop-filter: blur(4px);
}

#promoteModal input[type="radio"]:checked + div {
  color: #3b82f6;
}

#promoteModal label:has(input:checked) {
  border-color: #3b82f6;
  background-color: #eff6ff;
}

/* Background Thumbnail and Color Picker Styles */
#backgroundThumbnail {
  transition: all 0.2s ease;
  position: relative;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  aspect-ratio: 9/16;
}

#backgroundThumbnail:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

#colorIndicator {
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

#colorPickerPopup {
  animation: fadeInScale 0.2s ease-out;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

#backgroundColorPicker, #textColorPicker, #inputColorPickerActive {
  transition: all 0.2s ease;
  border:1px lightgrey solid;
}

#backgroundColorPicker:hover, #textColorPicker:hover, #inputColorPickerActive:hover {
  transform: scale(1.05);
}

#backgroundThumbnailImage {
  transition: opacity 0.3s ease;
}

#backgroundColorPickerActive, #textColorPickerActive, #inputColorPickerActive {
  border:1px lightgrey solid;
}

/* Image Manager Modal Styles - Updated for Smaller Thumbnails */
#imageManagerModal {
  backdrop-filter: blur(4px);
}

.image-slot-small {
  aspect-ratio: 9/16; /* Match the 1080x1920 aspect ratio */
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s ease;
  border: 2px solid #e5e7eb;
  background: #f9fafb;
  /* Made 1/4 size of original */
  width: 80px;
  height: 142px; /* 80px * (16/9) â‰ˆ 142px */
}

.image-slot-small:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  border-color: #9ca3af;
}

.image-slot-small img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-slot-small .image-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.image-slot-small:hover .image-overlay {
  opacity: 1;
}

.image-slot-small .delete-btn {
  background: #ef4444;
  color: white;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.image-slot-small .delete-btn:hover {
  background: #dc2626;
  transform: scale(1.05);
}

.image-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: white;
  padding: 6px;
  font-size: 9px;
  transform: translateY(100%);
  transition: transform 0.2s ease;
}

.image-slot-small:hover .image-info {
  transform: translateY(0);
}

/* Grid adjustments for smaller thumbnails */
#imageManagerGrid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-start;
}

/* Status message styles */
#imageManagerStatus.success {
  color: #059669;
}

#imageManagerStatus.error {
  color: #dc2626;
}

#imageManagerStatus.info {
  color: #2563eb;
}

input[type="color"] {
  appearance: none;
  -webkit-appearance: none;
  padding: 0;
  border: none;
  border-radius: 0.4rem; /* match rounded-lg */
}

input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
  border-radius: 0.4rem;
}

input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 0.4rem;
}


