/* HiPER Internal Dashboard - Custom Theme */

:root {
  /* HiPER Brand Colors */
  --hiper-primary: #14B8A6;          /* Teal */
  --hiper-primary-light: #5EEAD4;    /* Light teal */
  --hiper-primary-dark: #0F766E;     /* Dark teal */
  --hiper-secondary: #22C55E;        /* Green */
  --hiper-secondary-light: #86EFAC;  /* Light green */
  --hiper-secondary-dark: #15803D;   /* Dark green */
  --hiper-accent: #0891B2;           /* Circuit board teal */
  --hiper-text-white: #FFFFFF;       /* White text */
  --hiper-text-grey: #6B7280;        /* Grey text */
  --hiper-text-dark: #374151;        /* Dark grey text */
  
  /* Glass morphism */
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-backdrop: blur(12px);
  
  /* Gradients */
  --hiper-gradient: linear-gradient(135deg, var(--hiper-primary) 0%, var(--hiper-secondary) 100%);
  --hiper-gradient-light: linear-gradient(135deg, var(--hiper-primary-light) 0%, var(--hiper-secondary-light) 100%);
}

/* Custom DaisyUI theme overrides */
[data-theme="hiper"] {
  --p: 189 85% 40%;    /* Primary (teal) */
  --s: 142 71% 45%;    /* Secondary (green) */
  --a: 199 89% 35%;    /* Accent (circuit teal) */
  --n: 210 11% 24%;    /* Neutral */
  --b1: 0 0% 98%;      /* Base 100 */
  --b2: 0 0% 95%;      /* Base 200 */
  --b3: 0 0% 91%;      /* Base 300 */
  --bc: 210 11% 24%;   /* Base content */
}

/* Background gradients */
.bg-hiper-gradient {
  background: var(--hiper-gradient);
}

.bg-hiper-gradient-light {
  background: var(--hiper-gradient-light);
}

/* Workspace-specific styles */
.workspace-form {
  max-width: 800px;
  margin: 0 auto;
}

.workspace-quick-actions {
  gap: 0.5rem;
}

.workspace-quick-actions .btn {
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
}

/* Form field enhancements for workspace */
.form-control textarea {
  min-height: 120px;
  resize: vertical;
}

/* Character counter styling */
.label-text-alt {
  font-size: 0.75rem;
  opacity: 0.7;
}

/* Glass morphism effects */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-backdrop);
}

/* Mobile-first responsive enhancements for new design */
@media (max-width: 768px) {
  /* Phase navigation adjustments */
  .phase-step-circle {
    width: 2.5rem;
    height: 2.5rem;
  }
  
  /* Phase connector lines */
  .phase-connector {
    width: 2rem;
  }
  
  /* Ticket cards on mobile */
  .ticket-card {
    margin-bottom: 1rem;
  }
  
  /* Header adjustments */
  .workspace-header {
    padding: 1rem;
  }
  
  .workspace-title {
    font-size: 1.5rem;
  }
  
  /* Quick actions stack vertically */
  .quick-actions-mobile {
    grid-template-columns: 1fr;
  }
}

/* Enhanced hover effects */
.btn-enhanced:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Smooth transitions for all interactive elements */
.smooth-transition {
  transition: all 0.2s ease-in-out;
}

/* Phase step enhancements */
.phase-step-completed {
  animation: pulse-success 2s infinite;
}

@keyframes pulse-success {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.1);
  }
}

/* List Layout Specific Styles */
.ticket-list-row {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-backdrop);
  transition: all 0.2s ease-in-out;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.ticket-list-row:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

/* Enhanced button styling for list actions */
.btn-enhanced {
  transition: all 0.2s ease-in-out;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-enhanced:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Progress bar enhancements */
.progress-mini {
  height: 3px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.progress-mini-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--hiper-primary), var(--hiper-secondary));
  border-radius: 2px;
  transition: width 0.3s ease-in-out;
}

/* Main content width constraint - Fix for dashboard width issue */
.flex-1.overflow-y-auto.custom-scrollbar > div {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* Alternative selector for main content padding div */
main.flex-1.overflow-y-auto.custom-scrollbar > div.p-6 {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* Mobile responsive adjustments for list layout */
@media (max-width: 768px) {
  .ticket-list-row {
    padding: 1rem;
  }
  
  .ticket-list-row .flex {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0.75rem;
  }
  
  .ticket-list-actions {
    width: 100%;
    justify-content: space-between;
  }
  
  .phase-progress-mobile {
    order: -1;
    width: 100%;
  }
}

/* Enhanced phase navigation for mobile */
@media (max-width: 640px) {
  .phase-navigation {
    flex-direction: column;
    gap: 1rem;
  }
  
  .phase-steps {
    justify-content: center;
  }
  
  .phase-step-circle {
    width: 2.25rem;
    height: 2.25rem;
  }
  
  .phase-connector {
    width: 1.5rem;
  }
}

/* Professional color scheme adjustments */
.badge-professional {
  background: linear-gradient(135deg, var(--hiper-primary-light), var(--hiper-primary));
  color: white;
  border: none;
  font-weight: 500;
}

/* List item hover effects */
.list-item-hover {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.list-item-hover:hover {
  transform: scale(1.01);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}


.glass-navbar {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: var(--glass-backdrop);
  border-bottom: 1px solid var(--glass-border);
}

.glass-sidebar {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: var(--glass-backdrop);
  border-right: 1px solid var(--glass-border);
}

/* Phase navigation styling */
.phase-circle {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.phase-active {
  background: var(--hiper-gradient);
  color: white;
  box-shadow: 0 10px 15px -3px rgba(20, 184, 166, 0.3);
  transform: scale(1.1);
}

.phase-complete {
  background-color: var(--hiper-secondary);
  color: white;
  border-color: var(--hiper-secondary-dark);
}

.phase-upcoming {
  background-color: #e5e7eb;
  color: var(--hiper-text-grey);
  border-color: #d1d5db;
}

.phase-line {
  height: 2px;
  background: linear-gradient(90deg, var(--hiper-primary) 0%, var(--hiper-secondary) 100%);
  opacity: 0.3;
}

.phase-line.active {
  opacity: 1;
}

/* Custom form styling */
.form-input {
  transition: all 0.2s ease;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
}

.form-input:focus {
  border-color: var(--hiper-primary);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
  outline: none;
}

.form-input.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Custom buttons */
.btn-hiper {
  background: var(--hiper-gradient);
  border: none;
  color: white;
  transition: all 0.2s ease;
}

.btn-hiper:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 15px -3px rgba(20, 184, 166, 0.3);
}

.btn-hiper-outline {
  background: transparent;
  border: 2px solid var(--hiper-primary);
  color: var(--hiper-primary);
  transition: all 0.2s ease;
}

.btn-hiper-outline:hover {
  background: var(--hiper-gradient);
  color: white;
}

/* Priority badges */
.priority-critical {
  @apply badge badge-error;
}

.priority-high {
  @apply badge badge-warning;
}

.priority-medium {
  @apply badge badge-info;
}

.priority-low {
  @apply badge badge-success;
}

/* Workflow icons */
.workflow-icon {
  font-size: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  background: var(--hiper-gradient-light);
  margin-right: 0.75rem;
}

/* Card hover effects */
.card-hover {
  transition: all 0.2s ease;
  cursor: pointer;
}

.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

/* Loading states */
.loading-shimmer {
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .phase-circle {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 0.875rem;
  }
  
  .workflow-icon {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.25rem;
  }
  
  .glass-panel {
    margin: 0.5rem;
    border-radius: 0.5rem;
  }
}

/* Utility classes */
.text-hiper-primary {
  color: var(--hiper-primary);
}

.text-hiper-secondary {
  color: var(--hiper-secondary);
}

.text-hiper-grey {
  color: var(--hiper-text-grey);
}

.border-hiper-primary {
  border-color: var(--hiper-primary);
}

.bg-hiper-primary {
  background-color: var(--hiper-primary);
}

.bg-hiper-secondary {
  background-color: var(--hiper-secondary);
}

/* Custom scrollbar */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: var(--hiper-primary);
  border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: var(--hiper-primary-dark);
}

/* Fallback for Alpine.js - ensure sidebar is visible by default */
.glass-sidebar {
  display: block;
}

/* Alpine.js override - this will be applied when Alpine loads */
[x-cloak] {
  display: none !important;
}

/* Debug styles */
.alpine-debug {
  border: 2px solid red !important;
}