/**
 * Process Development Monthly Report Automation System
 * Module: Corporate White Professional Stylesheet
 * Aligned with Walton Process Development Executive Red Master Theme
 * WALTON Hi-Tech Industries PLC
 */

:root {
  --font-primary: 'Lexend', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --walton-red: #C5161D;
  --walton-red-dark: #9E1016;
  --walton-red-light: #FEF2F2;
  --walton-charcoal: #0F172A;
  --walton-emerald: #10B981;
  --surface-primary: #FFFFFF;
  --surface-secondary: #F8FAFC;
  --surface-tertiary: #F1F5F9;
  --border-subtle: #E2E8F0;
  --border-medium: #CBD5E1;
}

body, button, input, select, textarea, table {
  font-family: var(--font-primary);
}

body {
  font-family: var(--font-primary);
  background-color: #F4F6F9;
  background-image:
    radial-gradient(1200px 700px at 20% -100px, rgba(197, 22, 29, 0.03) 0%, transparent 60%),
    radial-gradient(1000px 600px at 85% -50px, rgba(241, 245, 249, 0.5) 0%, transparent 60%);
  color: #1E293B;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
}

/* ==========================================================================
   Photo Blur-Fit Container (Landscape & Portrait Adaptive Aspect Ratio)
   Fills the defined frame with a soft ambient blurred version of the photo
   while preserving the crisp original image uncropped in foreground.
   ========================================================================== */
.photo-fit-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #020617;
}

.photo-fit-wrapper .photo-blur-bg {
  position: absolute;
  inset: -12%;
  width: 124%;
  height: 124%;
  object-fit: cover;
  filter: blur(18px) brightness(0.65);
  opacity: 0.65;
  pointer-events: none;
  user-select: none;
  transition: opacity 0.25s ease;
  z-index: 1;
}

.photo-fit-wrapper.photo-fit-blur .photo-main-img {
  position: relative;
  z-index: 2;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.45));
  transition: all 0.25s ease;
}

.photo-fit-wrapper.photo-fit-cover .photo-blur-bg {
  display: none !important;
}

.photo-fit-wrapper.photo-fit-cover .photo-main-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-width: none;
  max-height: none;
}

/* Custom scrollbars - light theme */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: #F8FAFC;
}
::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* Toast Notifications */
#toast-notification {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 16:9 Canvas Slide Preview Container */
.slide-preview-aspect {
  aspect-ratio: 16 / 9;
  width: 100%;
}

/* Line clamp utility */
.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* AI Button Pulse Animation */
@keyframes ai-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(197, 22, 29, 0.3);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(197, 22, 29, 0);
  }
}

.ai-pulse-hover:hover {
  animation: ai-pulse 1.6s infinite;
}

/* Executive Card - Light Theme */
.executive-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.executive-card:hover {
  border-color: rgba(197, 22, 29, 0.3);
  box-shadow: 0 4px 12px rgba(197, 22, 29, 0.08);
}

/* White card with subtle shadow */
.card-white {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03);
}
.card-white:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* Table styling */
.pro-table thead {
  background: #F8FAFC;
  border-bottom: 2px solid #E2E8F0;
}
.pro-table tbody tr {
  border-bottom: 1px solid #F1F5F9;
}
.pro-table tbody tr:hover {
  background: #FAFBFD;
}

/* Print Rules for Executive PDF */
@media print {
  .no-print, header, nav, #toast-notification {
    display: none !important;
  }
  body {
    background: #FFFFFF !important;
    color: #000000 !important;
  }
  .master-slide-canvas {
    page-break-after: always;
    border: none !important;
    height: 100vh !important;
  }
}

/* Universal Responsive Modal & Mobile Screen Optimizations (Requirement 2) */
@media (max-width: 640px) {
  .fixed.inset-0 {
    padding: 0.5rem !important;
  }
  .fixed.inset-0 > div {
    max-height: 93vh !important;
    max-width: 98vw !important;
    border-radius: 1.25rem !important;
    padding: 1rem !important;
    overflow-y: auto !important;
  }
  .fixed.inset-0 input,
  .fixed.inset-0 select,
  .fixed.inset-0 textarea {
    font-size: 12px !important;
  }
  .fixed.inset-0 button {
    padding-top: 0.45rem !important;
    padding-bottom: 0.45rem !important;
  }
}

/* Mobile Sidebar Drawer Smooth Animation */
#sidebar-drawer {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@media (max-width: 1023px) {
  #sidebar-drawer.open {
    transform: translateX(0) !important;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.45);
  }
}

/* Fast Native Auto-Sizing Textarea (Zero Layout Thrashing - Requirement 4) */
textarea[id^="task-name-input-"],
textarea[id^="task-details-input-"] {
  field-sizing: content;
  min-height: 38px;
  resize: vertical;
}

/* Smooth Horizontal Scroll on Mobile Tables */
.overflow-x-auto {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}


