/* Advanced Styling for IVS Learning Hub */

/* Gradients */
.gradient-blue {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
}

.gradient-green {
  background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
}

.gradient-purple {
  background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
}

.gradient-orange {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
}

/* Glass morphism effect */
.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 1rem;
}

body.dark-mode .glass {
  background: rgba(31, 41, 55, 0.7);
  border-color: rgba(55, 65, 81, 0.2);
}

/* Shadow variants */
.shadow-sm {
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.shadow-lg {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.shadow-xl {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
}

.badge-primary {
  background-color: #dbeafe;
  color: #0c4a6e;
}

.badge-success {
  background-color: #dcfce7;
  color: #166534;
}

.badge-warning {
  background-color: #fef3c7;
  color: #92400e;
}

.badge-danger {
  background-color: #fee2e2;
  color: #991b1b;
}

body.dark-mode .badge-primary {
  background-color: #1e3a8a;
  color: #93c5fd;
}

body.dark-mode .badge-success {
  background-color: #064e3b;
  color: #86efac;
}

body.dark-mode .badge-warning {
  background-color: #78350f;
  color: #fcd34d;
}

body.dark-mode .badge-danger {
  background-color: #7f1d1d;
  color: #fca5a5;
}

/* Progress bar */
.progress {
  width: 100%;
  height: 8px;
  background-color: #e5e7eb;
  border-radius: 9999px;
  overflow: hidden;
}

body.dark-mode .progress {
  background-color: #374151;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6 0%, #10b981 100%);
  border-radius: 9999px;
  transition: width 0.3s ease;
}

/* Modal overlay */
.modal-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: 1000;
}

.modal-content {
  background-color: #ffffff;
  border-radius: 1rem;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: slideUp 0.3s ease;
}

body.dark-mode .modal-content {
  background-color: #1f2937;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Tooltip */
.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltip-text {
  visibility: hidden;
  width: 120px;
  background-color: #1f2937;
  color: #ffffff;
  text-align: center;
  border-radius: 0.5rem;
  padding: 0.5rem;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -60px;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 0.875rem;
  white-space: nowrap;
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* Tabs */
.tabs {
  display: flex;
  border-bottom: 2px solid #e5e7eb;
  gap: 1rem;
}

body.dark-mode .tabs {
  border-bottom-color: #374151;
}

.tab-button {
  padding: 1rem;
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
  color: #6b7280;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
}

body.dark-mode .tab-button {
  color: #9ca3af;
}

.tab-button.active {
  color: #1e3a8a;
  border-bottom-color: #3b82f6;
}

body.dark-mode .tab-button.active {
  color: #93c5fd;
  border-bottom-color: #60a5fa;
}

.tab-content {
  display: none;
  padding: 1.5rem 0;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Dropdown menu */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #ffffff;
  min-width: 200px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  z-index: 1;
  border-radius: 0.5rem;
  top: 100%;
  right: 0;
}

body.dark-mode .dropdown-content {
  background-color: #1f2937;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
}

.dropdown-content a,
.dropdown-content button {
  color: #1f2937;
  padding: 0.75rem 1rem;
  text-decoration: none;
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

body.dark-mode .dropdown-content a,
body.dark-mode .dropdown-content button {
  color: #f3f4f6;
}

.dropdown-content a:hover,
.dropdown-content button:hover {
  background-color: #f3f4f6;
}

body.dark-mode .dropdown-content a:hover,
body.dark-mode .dropdown-content button:hover {
  background-color: #374151;
}

.dropdown-content a:first-child {
  border-radius: 0.5rem 0.5rem 0 0;
}

.dropdown-content a:last-child {
  border-radius: 0 0 0.5rem 0.5rem;
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* Grid system */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-cols-1 {
  grid-template-columns: 1fr;
}

.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 768px) {
  .grid-cols-2,
  .grid-cols-3 {
    grid-template-columns: 1fr;
  }
}

/* Flexbox utilities */
.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-column {
  display: flex;
  flex-direction: column;
}

/* Spacing utilities */
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

/* Text utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Visibility utilities */
.hidden { display: none; }
.visible { display: block; }

.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
}
