/* Custom styles for Review System */

/* Smooth transitions */
* {
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

/* Fade-in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.3s ease-out;
}

/* Loading spinner */
.spinner {
  border: 3px solid #f3f4f6;
  border-top: 3px solid #4f46e5;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Hover effects */
button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

button:active {
  transform: translateY(0);
}

/* Table hover effects */
tbody tr:hover {
  background-color: #f9fafb;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Focus styles */
input:focus,
textarea:focus,
select:focus {
  outline: none;
  ring: 2px;
  ring-color: #4f46e5;
  border-color: transparent;
}

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

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Print styles */
@media print {
  nav,
  button {
    display: none !important;
  }
  
  .no-print {
    display: none !important;
  }
}

/* ============================================
   MOBILE RESPONSIVE DESIGN - V6.9.0
   ============================================ */

/* Mobile Navigation - Hamburger Menu */
.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 0.75rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mobile-menu-toggle i {
  font-size: 1.5rem;
  color: #4f46e5;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.mobile-menu.active {
  display: block;
}

.mobile-menu-content {
  position: fixed;
  top: 0;
  right: -100%;
  bottom: 0;
  width: 80%;
  max-width: 320px;
  background: white;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
  transition: right 0.3s ease;
  overflow-y: auto;
  z-index: 1001;
}

.mobile-menu.active .mobile-menu-content {
  right: 0;
}

.mobile-menu-header {
  padding: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mobile-menu-close {
  font-size: 1.5rem;
  color: #6b7280;
  cursor: pointer;
}

.mobile-menu-items {
  padding: 1rem 0;
}

.mobile-menu-item {
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  color: #374151;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s;
}

.mobile-menu-item:hover {
  background-color: #f3f4f6;
}

.mobile-menu-item i {
  margin-right: 0.75rem;
  width: 1.25rem;
  color: #4f46e5;
}

/* Touch-Friendly Buttons */
@media (max-width: 768px) {
  button,
  .btn,
  a.btn {
    min-height: 44px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }
  
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="date"],
  textarea,
  select {
    min-height: 44px;
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  /* Show mobile menu toggle */
  .mobile-menu-toggle {
    display: block;
  }
}

/* Responsive Grid Layouts */
@media (max-width: 768px) {
  /* Force single column layouts */
  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4,
  .md\:grid-cols-2,
  .md\:grid-cols-3 {
    grid-template-columns: 1fr !important;
  }
  
  /* Reduce gaps */
  .gap-6,
  .gap-8 {
    gap: 1rem !important;
  }
  
  /* Full width containers */
  .max-w-7xl,
  .max-w-6xl,
  .max-w-5xl {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}

/* Mobile-Optimized Tables */
@media (max-width: 768px) {
  /* Hide desktop table display */
  table.mobile-cards {
    display: none;
  }
  
  /* Card view for mobile */
  .mobile-card-view {
    display: block;
  }
  
  .mobile-card {
    background: white;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  }
  
  .mobile-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
  }
  
  .mobile-card-title {
    font-weight: 600;
    color: #111827;
    font-size: 1.125rem;
  }
  
  .mobile-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .mobile-card-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
  }
  
  .mobile-card-label {
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
  }
  
  .mobile-card-value {
    color: #111827;
    font-size: 0.875rem;
    text-align: right;
  }
  
  .mobile-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
  }
  
  .mobile-card-actions button {
    flex: 1;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
  }
}

/* Keep traditional table for desktop */
@media (min-width: 769px) {
  table.mobile-cards {
    display: table;
  }
  
  .mobile-card-view {
    display: none;
  }
}

/* Standard table responsive for remaining tables */
@media (max-width: 768px) {
  table:not(.mobile-cards) {
    font-size: 0.875rem;
  }
  
  th:not(.mobile-cards th),
  td:not(.mobile-cards td) {
    padding: 0.5rem !important;
  }
  
  /* Hide less important columns on mobile */
  th:nth-child(n+5),
  td:nth-child(n+5) {
    display: none;
  }
}

/* Modal Responsive */
@media (max-width: 768px) {
  .modal-content,
  [class*="modal"] > div {
    width: 95% !important;
    max-width: 95% !important;
    margin: 1rem auto !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
  }
  
  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 1rem !important;
  }
  
  .modal-title {
    font-size: 1.25rem !important;
  }
}

/* Form Layouts */
@media (max-width: 768px) {
  .form-grid,
  form .grid {
    grid-template-columns: 1fr !important;
  }
  
  label {
    font-size: 0.875rem;
  }
  
  .form-section {
    padding: 1rem !important;
  }
}

/* Cards and Panels */
@media (max-width: 768px) {
  .card,
  [class*="rounded-lg"] {
    border-radius: 0.5rem !important;
    padding: 1rem !important;
  }
  
  .card-header {
    padding: 1rem !important;
    margin-bottom: 1rem !important;
  }
  
  .card-title {
    font-size: 1.25rem !important;
  }
  
  .card-body {
    padding: 1rem !important;
  }
}

/* Typography */
@media (max-width: 768px) {
  h1 {
    font-size: 1.875rem !important;
  }
  
  h2 {
    font-size: 1.5rem !important;
  }
  
  h3 {
    font-size: 1.25rem !important;
  }
  
  h4 {
    font-size: 1.125rem !important;
  }
  
  p {
    font-size: 0.875rem;
  }
}

/* Navigation Tabs */
@media (max-width: 768px) {
  .nav-tabs {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  
  .nav-tabs::-webkit-scrollbar {
    display: none;
  }
  
  .nav-tab {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
  }
}

/* Spacing Utilities */
@media (max-width: 768px) {
  .py-20 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }
  
  .py-16 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
  
  .py-12 {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
  }
  
  .px-8 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  .mb-12,
  .mb-16 {
    margin-bottom: 2rem !important;
  }
  
  .mt-12,
  .mt-16 {
    margin-top: 2rem !important;
  }
}

/* Hide/Show Utilities */
@media (max-width: 768px) {
  .md\:flex {
    display: none !important;
  }
  
  .hidden-mobile {
    display: none !important;
  }
  
  .show-mobile {
    display: block !important;
  }
}

@media (min-width: 769px) {
  .show-mobile {
    display: none !important;
  }
}

/* Flex Direction */
@media (max-width: 768px) {
  .flex-row {
    flex-direction: column !important;
  }
  
  .space-x-4 > * + * {
    margin-left: 0 !important;
    margin-top: 0.5rem !important;
  }
}

/* Image Responsive */
@media (max-width: 768px) {
  img {
    max-width: 100%;
    height: auto;
  }
}

/* Print Preview Mobile */
@media (max-width: 768px) {
  .print-preview {
    font-size: 0.75rem !important;
  }
  
  .print-preview h1 {
    font-size: 1.5rem !important;
  }
  
  .print-preview h2 {
    font-size: 1.25rem !important;
  }
  
  .print-preview h3 {
    font-size: 1rem !important;
  }
  
  .print-preview .question-section {
    padding: 0.75rem !important;
    margin-bottom: 0.75rem !important;
  }
}

/* Dashboard Stats Cards */
@media (max-width: 768px) {
  .stats-card {
    min-height: auto !important;
  }
  
  .stat-value {
    font-size: 1.5rem !important;
  }
  
  .stat-label {
    font-size: 0.75rem !important;
  }
}

/* Team Member Cards */
@media (max-width: 768px) {
  .team-member-card {
    padding: 1rem !important;
  }
  
  .member-avatar {
    width: 2.5rem !important;
    height: 2.5rem !important;
  }
}

/* Notification Items */
@media (max-width: 768px) {
  .notification-item {
    padding: 0.75rem !important;
    font-size: 0.875rem !important;
  }
  
  .notification-icon {
    width: 2rem !important;
    height: 2rem !important;
  }
}

/* Search and Filter Bars */
@media (max-width: 768px) {
  .search-bar,
  .filter-bar {
    flex-direction: column !important;
    gap: 0.5rem !important;
  }
  
  .search-input,
  .filter-select {
    width: 100% !important;
  }
}

/* Pagination */
@media (max-width: 768px) {
  .pagination {
    font-size: 0.875rem;
  }
  
  .pagination button {
    padding: 0.5rem 0.75rem !important;
  }
}

/* Badge and Tags */
@media (max-width: 768px) {
  .badge,
  .tag {
    font-size: 0.75rem !important;
    padding: 0.25rem 0.5rem !important;
  }
}

/* Dropdown Menus */
@media (max-width: 768px) {
  .dropdown-menu {
    position: fixed !important;
    left: 1rem !important;
    right: 1rem !important;
    width: auto !important;
  }
}

/* Toast Notifications */
@media (max-width: 768px) {
  .toast {
    left: 1rem !important;
    right: 1rem !important;
    width: auto !important;
  }
}

/* Loading Spinner */
@media (max-width: 768px) {
  .loading-spinner {
    font-size: 0.875rem !important;
  }
}

/* Empty State */
@media (max-width: 768px) {
  .empty-state {
    padding: 2rem 1rem !important;
  }
  
  .empty-state-icon {
    font-size: 3rem !important;
  }
  
  .empty-state-text {
    font-size: 0.875rem !important;
  }
}

/* Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-draft {
  background-color: #fef3c7;
  color: #92400e;
}

.status-completed {
  background-color: #d1fae5;
  color: #065f46;
}

/* Card hover effect */
.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: #9ca3af;
}

.empty-state i {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* Form validation */
input:invalid,
textarea:invalid {
  border-color: #ef4444;
}

input:valid,
textarea:valid {
  border-color: #10b981;
}

/* Tooltip */
[title] {
  position: relative;
  cursor: help;
}

/* Loading overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* Success animation */
@keyframes successPulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.success-pulse {
  animation: successPulse 1.5s ease-in-out;
}

/* Home Page Styles */
.active-tab {
  background-color: #4f46e5;
  color: white;
}

.inactive-tab {
  background-color: white;
  color: #4b5563;
  border: 1px solid #e5e7eb;
}

.inactive-tab:hover {
  background-color: #f9fafb;
}

.line-clamp-2 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.line-clamp-3 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* Hero section gradient animation */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Smooth scroll offset for fixed nav */
html {
  scroll-padding-top: 80px;
}

/* Carousel Styles */
.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.carousel-slide.active {
  opacity: 1;
  z-index: 1;
}

.carousel-dot {
  transition: all 0.3s ease;
  cursor: pointer;
}

.carousel-dot:hover {
  transform: scale(1.2);
}

.carousel-dot.active {
  width: 2rem;
  border-radius: 0.75rem;
}
