@tailwind base;
@tailwind components;
@tailwind utilities;

@layer components {
  .nav-link {
    @apply flex items-center gap-3 px-4 py-2 text-gray-300 hover:bg-gray-700 rounded-md;
  }
  
  .nav-link.active {
    @apply bg-gray-900 text-white;
  }

  .flash-message {
    @apply fixed bottom-4 right-4 p-4 rounded shadow-lg;
  }

  .flash-message.notice {
    @apply bg-green-100 border-l-4 border-green-500 text-green-700;
  }

  .flash-message.alert {
    @apply bg-red-100 border-l-4 border-red-500 text-red-700;
  }
}

@layer utilities {
  .bg-clip-text {
    -webkit-background-clip: text;
    background-clip: text;
  }

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

/* Group hover effects for place cards */
.group:hover .group-hover\:opacity-100 {
  opacity: 1;
}
/* International Phone Input Styling */
.iti {
  width: 100%;
  position: relative;
}

.iti__country-list {
  z-index: 1000;
  max-height: 200px;
  overflow-y: auto;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border: 1px solid #d1d5db;
}

.iti__flag-container {
  padding: 12px;
  border: 1px solid #d1d5db;
  border-right: none;
  border-radius: 8px 0 0 8px;
  background: white;
}

.iti input[type="tel"] {
  padding-left: 52px !important;
  border-radius: 0 8px 8px 0 !important;
}

.iti__selected-flag {
  background: white;
  border-radius: 8px 0 0 8px;
  padding: 12px;
}

.iti__arrow {
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid #6b7280;
  margin-left: 6px;
}

.iti__selected-flag:hover .iti__arrow {
  border-top-color: #10b981;
}

/* Country list styling */
.iti__country {
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f3f4f6;
}

.iti__country:hover {
  background-color: #f9fafb;
}

.iti__country.iti__highlight {
  background-color: #10b981;
  color: white;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .iti__flag-container {
    padding: 10px;
  }
  
  .iti input[type="tel"] {
    padding-left: 48px !important;
  }
} 
/* Enhanced Search Mobile Styles */
/* Ensures optimal mobile experience for the search component */

/* Prevent zoom on iOS when focusing input fields */
@media screen and (-webkit-min-device-pixel-ratio:0) {
  .enhanced-search input[type="text"] {
    font-size: 16px;
  }
}

/* Touch-friendly hover states for mobile */
@media (hover: none) and (pointer: coarse) {
  .enhanced-search button:hover {
    background-color: initial;
  }
  
  .enhanced-search button:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
  }
}

/* Ensure dropdowns don't go off-screen on mobile */
@media (max-width: 640px) {
  .enhanced-search [x-show="showCityDropdown"] {
    max-width: calc(100vw - 2rem);
    left: 1rem !important;
    right: 1rem !important;
    width: auto !important;
  }
  
  .enhanced-search [x-show="showSuggestions"] {
    max-width: calc(100vw - 2rem);
    left: 1rem !important;
    right: 1rem !important;
    width: auto !important;
  }
}

/* Fix mobile Safari viewport issues */
@supports (-webkit-touch-callout: none) {
  .enhanced-search {
    -webkit-overflow-scrolling: touch;
  }
  
  .enhanced-search input {
    -webkit-appearance: none;
    border-radius: 0;
  }
}

/* Improve touch target sizes for mobile */
@media (max-width: 768px) {
  .enhanced-search button {
    min-height: 44px;
    min-width: 44px;
  }
  
  .enhanced-search [role="option"] {
    min-height: 44px;
    padding: 12px 16px;
  }
  
  /* Ensure search button is always accessible */
  .enhanced-search .mobile-search-button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
  }
}

/* Handle mobile keyboard appearance */
@media (max-width: 768px) {
  .enhanced-search {
    position: relative;
  }
  
  /* Prevent content jumping when keyboard appears */
  .enhanced-search input:focus {
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }
} 
/* line 1, app/assets/stylesheets/phone_input.scss */
.iti__selected-flag {
  padding: 16px 0px 16px 0px;
  background-color: #fff;
  border-top-left-radius: 0.75rem;
  border-bottom-left-radius: 0.75rem;
  transition: background-color 0.2s;
}

/* line 8, app/assets/stylesheets/phone_input.scss */
.iti.iti--allow-dropdown {
  height: 50px;
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

@import url('https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.8/css/intlTelInput.css');
@import url('https://cdn.jsdelivr.net/npm/quill@2.0.3/dist/quill.snow.css');

@layer base {
  :root {
    /* Core brand colors */
    --primary: 174 100% 25%;      /* #005B4D - Slightly lighter teal */
    --secondary: 174 100% 20%;    /* #003D3A - Darker teal variant */
    --accent: 35 97% 55%;         /* #F9B300 - Slightly darker gold accent */
    --background: 0 0% 100%;      /* #FFFFFF - White background */
    --white: 0 0% 100%;           /* #FFFFFF - Pure white */
    --white-soft: 0 0% 98%;       /* #FAFAFA - Soft white */
    --white-muted: 0 0% 95%;      /* #F2F2F2 - Muted white */
    
    /* Foreground colors */
    --foreground: 174 100% 25%;   /* #005B4D - Using lighter teal for text */
    --primary-foreground: 0 0% 100%;
    --secondary-foreground: 0 0% 100%;
    --accent-foreground: 174 100% 25%;
    
    /* Supporting colors */
    --muted: 174 30% 90%;
    --muted-foreground: 174 30% 45%;
    --border: 174 20% 85%;
    --input: 174 20% 85%;
    --ring: 174 100% 25%;
    
    /* Component colors */
    --card: var(--white);
    --card-foreground: var(--foreground);
    --popover: var(--white);
    --popover-foreground: var(--foreground);
    
    /* Status colors */
    --destructive: 0 84% 65%;
    --destructive-foreground: 0 0% 100%;
    --success: 145 100% 39%;
    --warning: 35 97% 61%;
    --info: 199 89% 48%;
  }
}

.bg-gradient-fork {
  background: linear-gradient(180deg, #005B4D 0%, #003D3A 100%);
}

/* Custom styles for intl-tel-input */
.phone-input-container {
  position: relative;
}

/* Custom Quill Editor Styling */
.ql-editor {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #374151;
  padding: 1.5rem;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  transition: all 0.2s ease;
}

.ql-editor:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.ql-editor.ql-blank::before {
  color: #9ca3af;
  font-style: italic;
  font-size: 16px;
}

/* Quill Toolbar Styling */
.ql-toolbar {
  border: 1px solid #e5e7eb;
  border-bottom: none;
  border-radius: 0.75rem 0.75rem 0 0;
  background: #f9fafb;
  padding: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ql-toolbar .ql-formats {
  margin-right: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.ql-toolbar .ql-formats:last-child {
  margin-right: 0;
}

/* Quill Button Styling */
.ql-toolbar button {
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 0.5rem;
  background: transparent;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  cursor: pointer;
}

.ql-toolbar button:hover {
  background: #ffffff;
  color: #374151;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.ql-toolbar button.ql-active {
  background: #6366f1;
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(99, 102, 241, 0.3);
}

.ql-toolbar button svg {
  width: 1.125rem;
  height: 1.125rem;
}

/* Quill Dropdown Styling */
.ql-toolbar .ql-picker {
  color: #6b7280;
}

.ql-toolbar .ql-picker-label {
  border: none;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: transparent;
  color: #6b7280;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
}

.ql-toolbar .ql-picker-label:hover {
  background: #ffffff;
  color: #374151;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ql-toolbar .ql-picker.ql-expanded .ql-picker-label {
  background: #6366f1;
  color: #ffffff;
}

.ql-toolbar .ql-picker-options {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  padding: 0.5rem;
  margin-top: 0.25rem;
}

.ql-toolbar .ql-picker-item {
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  color: #374151;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.ql-toolbar .ql-picker-item:hover {
  background: #f3f4f6;
  color: #1f2937;
}

.ql-toolbar .ql-picker-item.ql-selected {
  background: #6366f1;
  color: #ffffff;
}

/* Quill Container Styling */
.ql-container {
  border: 1px solid #e5e7eb;
  border-top: none;
  border-radius: 0 0 0.75rem 0.75rem;
  background: #ffffff;
  font-family: inherit;
}

.ql-container.ql-snow {
  border: 1px solid #e5e7eb;
  border-top: none;
}

/* Quill Content Styling */
.ql-editor h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #1f2937;
  margin: 1.5rem 0 1rem 0;
  line-height: 1.2;
}

.ql-editor h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1f2937;
  margin: 1.25rem 0 0.75rem 0;
  line-height: 1.3;
}

.ql-editor h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #374151;
  margin: 1rem 0 0.5rem 0;
  line-height: 1.4;
}

.ql-editor p {
  margin: 0.75rem 0;
  line-height: 1.7;
}

.ql-editor blockquote {
  border-left: 4px solid #6366f1;
  padding-left: 1rem;
  margin: 1rem 0;
  font-style: italic;
  color: #6b7280;
  background: #f8fafc;
  padding: 1rem;
  border-radius: 0 0.5rem 0.5rem 0;
}

.ql-editor ul, .ql-editor ol {
  padding-left: 1.5rem;
  margin: 1rem 0;
}

.ql-editor li {
  margin: 0.5rem 0;
  line-height: 1.6;
}

.ql-editor a {
  color: #6366f1;
  text-decoration: underline;
  text-decoration-color: rgba(99, 102, 241, 0.3);
  text-underline-offset: 2px;
  transition: all 0.2s ease;
}

.ql-editor a:hover {
  color: #4f46e5;
  text-decoration-color: rgba(79, 70, 229, 0.6);
}

.ql-editor code {
  background: #f1f5f9;
  color: #e11d48;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  font-size: 0.875em;
}

.ql-editor pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1rem 0;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}

/* Responsive Quill Styling */
@media (max-width: 768px) {
  .ql-toolbar {
    padding: 0.75rem;
    flex-wrap: wrap;
  }
  
  .ql-toolbar .ql-formats {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
  }
  
  .ql-toolbar button {
    width: 2.25rem;
    height: 2.25rem;
  }
  
  .ql-editor {
    padding: 1rem;
    font-size: 16px; /* Prevent zoom on iOS */
  }
  
  .ql-editor h1 {
    font-size: 1.75rem;
  }
  
  .ql-editor h2 {
    font-size: 1.375rem;
  }
  
  .ql-editor h3 {
    font-size: 1.125rem;
  }
}

/* Quill Focus States */
.ql-editor:focus-within {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Quill Animation */
.ql-editor, .ql-toolbar {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Quill Tooltip Styling */
.ql-tooltip {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  padding: 0.75rem;
}

.ql-tooltip input {
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.ql-tooltip input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.ql-tooltip a {
  background: #6366f1;
  color: #ffffff;
  border: none;
  border-radius: 0.375rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.ql-tooltip a:hover {
  background: #4f46e5;
  transform: translateY(-1px);
}

/* Quill Error States */
.ql-editor.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.ql-toolbar.error {
  border-color: #ef4444;
}

/* Quill Success States */
.ql-editor.success {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.ql-toolbar.success {
  border-color: #10b981;
}
