/* Custom styles for EventIQ application */

/* Layout utilities for sticky header/footer */
:root {
  --header-height: 60px;
  --footer-height: 100px;
  --header-height-mobile: 50px;
  --footer-height-mobile: 80px;
}

/* Base layout styles */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header styles */
header.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 50;
}

/* Main content area */
main.app-main {
  flex: 1;
  width: 100%;
  margin-top: var(--header-height);
  margin-bottom: var(--footer-height);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

/* Footer styles */
footer.app-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--footer-height);
  z-index: 40;
}

/* Mobile responsive adjustments */
@media (max-width: 640px) {
  header.app-header {
    height: var(--header-height-mobile);
  }
  
  main.app-main {
    margin-top: var(--header-height-mobile);
    margin-bottom: var(--footer-height-mobile);
  }
  
  footer.app-footer {
    height: var(--footer-height-mobile);
  }
  
  /* Adjust footer content for mobile */
  footer.app-footer .container {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }
  
  footer.app-footer .text-sm {
    font-size: 0.75rem;
  }
}

/* Form styling for Tailwind compatibility */
input, textarea, select {
  outline: none;
  border: 1px solid #d1d5db; /* border-gray-300 */
  border-radius: 0.375rem; /* rounded-md */
  padding: 0.5rem 0.75rem;
  width: 100%;
}

input:focus, textarea:focus, select:focus {
  border-color: #6366f1; /* border-indigo-500 */
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2); /* ring-2 ring-indigo-200 */
}

input[type="checkbox"], input[type="radio"] {
  width: auto;
  border-radius: 0.25rem;
}

/* Fix datetime-local input styling across browsers */
input[type="datetime-local"] {
  padding: 0.45rem 0.75rem;
}

/* Utility classes */
.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;
}

/* Additional spacing utilities */
.h-80 {
  height: 20rem;
}

/* Custom animation for notifications */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* Tooltip styling */
.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltip-text {
  visibility: hidden;
  position: absolute;
  z-index: 50;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #1f2937;
  color: white;
  text-align: center;
  padding: 0.5rem;
  border-radius: 0.375rem;
  width: max-content;
  max-width: 16rem;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 0.75rem;
  line-height: 1rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

.tooltip .tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #1f2937 transparent transparent transparent;
}

/* Video thumbnail hover animation */
.file-preview {
  position: relative;
}

.video-thumbnail-static,
.video-thumbnail-animated {
  transition: opacity 0.3s ease-in-out;
}

.file-preview:hover .video-thumbnail-static {
  opacity: 0;
}

.file-preview:hover .video-thumbnail-animated {
  opacity: 1 !important;
}

/* Content width utilities */
/* Base classes */
.content-base {
  @apply mx-auto;
}

.content-full {
  @apply content-base max-w-7xl;  /* Base template width */
}

/* Main content widths */
.content-wide {
  @apply content-base max-w-5xl;  /* Wide content */
}

.content-normal {
  @apply content-base max-w-4xl;  /* Standard content width */
}

.content-narrow {
  @apply content-base max-w-3xl;  /* Narrow content */
}

.content-compact {
  @apply content-base max-w-2xl;  /* Compact content like forms */
}

/* Authentication pages */
.auth-container {
  width: 100%;
  max-width: 24rem !important; /* Equivalent to max-w-sm, with !important to ensure it takes precedence */
  margin-left: auto !important;
  margin-right: auto !important;
  padding-top: 2rem !important;
  padding-bottom: 2rem !important;
}

.auth-form {
  background-color: white !important;
  border-radius: 0.5rem !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
  padding: 1.5rem !important;
}

/* Special purpose widths */
.content-form {
  @apply content-base max-w-3xl;  /* Forms other than auth */
}

.content-truncate {
  @apply max-w-xs truncate;  /* For table cells with truncation */
}

/* Prose overrides */
.prose-full {
  @apply max-w-none;  /* Remove prose max-width constraints */
}