/**
 * ATC Wayfinding Tool - Enhancement Styles
 * Includes: Animations, Accessibility Mode, Lightbox, Toast, Back to Top
 */

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes slide-up {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.4); }
    50% { box-shadow: 0 0 20px 10px rgba(22, 163, 74, 0); }
}

.animate-fade-in {
    animation: fade-in 0.3s ease-out forwards;
}

.animate-fade-out {
    animation: fade-out 0.3s ease-out forwards;
}

.animate-slide-up {
    animation: slide-up 0.5s ease-out forwards;
}

.animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Step cards hover effect */
.relative.pl-16 {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.relative.pl-16:hover {
    transform: translateX(5px);
}

/* Image hover effect for lightbox */
.cursor-pointer.hover\:opacity-90 {
    transition: transform 0.3s ease, opacity 0.2s ease;
}

.cursor-pointer.hover\:opacity-90:hover {
    transform: scale(1.02);
}

/* ============================================
   ACCESSIBILITY MODE
   ============================================ */
.accessibility-mode {
    --font-size-multiplier: 1.2;
}

.accessibility-mode body,
.accessibility-mode p,
.accessibility-mode span,
.accessibility-mode a,
.accessibility-mode li {
    font-size: calc(1em * var(--font-size-multiplier)) !important;
    line-height: 1.8 !important;
}

.accessibility-mode h1 {
    font-size: calc(2.5rem * var(--font-size-multiplier)) !important;
}

.accessibility-mode h2 {
    font-size: calc(1.75rem * var(--font-size-multiplier)) !important;
}

.accessibility-mode h3 {
    font-size: calc(1.25rem * var(--font-size-multiplier)) !important;
}

.accessibility-mode .text-xs {
    font-size: calc(0.875rem * var(--font-size-multiplier)) !important;
}

.accessibility-mode .text-sm {
    font-size: calc(1rem * var(--font-size-multiplier)) !important;
}

/* High contrast in accessibility mode */
.accessibility-mode .text-gray-400,
.accessibility-mode .text-gray-500 {
    color: #374151 !important;
}

.dark .accessibility-mode .text-gray-400,
.dark .accessibility-mode .text-gray-500 {
    color: #d1d5db !important;
}

.accessibility-mode button,
.accessibility-mode a {
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Focus indicators */
.accessibility-mode *:focus {
    outline: 3px solid #16a34a !important;
    outline-offset: 2px !important;
}

/* ============================================
   FLOATING ACTION BUTTONS
   ============================================ */
.fab-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1000;
}

.fab {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.3s ease;
    cursor: pointer;
    border: none;
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.fab:active {
    transform: scale(0.95);
}

.fab-primary {
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: white;
}

.fab-secondary {
    background: white;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.dark .fab-secondary {
    background: #1e293b;
    color: white;
    border-color: #374151;
}

/* ============================================
   ENHANCED SEARCH INPUT
   ============================================ */
.search-input {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 16px 12px 44px;
    width: 100%;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: #16a34a;
    background: white;
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.1);
}

.dark .search-input {
    background: #1e293b;
    border-color: #374151;
    color: white;
}

.dark .search-input:focus {
    border-color: #22c55e;
    background: #0f172a;
}

/* ============================================
   FEEDBACK SECTION
   ============================================ */
.feedback-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.feedback-btn-positive {
    background: #dcfce7;
    color: #16a34a;
    border-color: #bbf7d0;
}

.feedback-btn-positive:hover {
    background: #16a34a;
    color: white;
}

.feedback-btn-negative {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

.feedback-btn-negative:hover {
    background: #dc2626;
    color: white;
}

/* ============================================
   ETA DISPLAY
   ============================================ */
.eta-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: white;
    padding: 8px 16px;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.875rem;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.3);
}

/* ============================================
   TOOLBAR STYLES
   ============================================ */
.toolbar {
    display: flex;
    gap: 8px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dark .toolbar {
    background: rgba(30, 41, 59, 0.9);
}

.toolbar-btn {
    padding: 8px;
    border-radius: 12px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toolbar-btn:hover {
    background: #f0fdf4;
}

.dark .toolbar-btn:hover {
    background: #374151;
}

/* ============================================
   SMOOTH SCROLL
   ============================================ */
html {
    scroll-behavior: smooth;
}

/* ============================================
   PRINT STYLES - HIDE ENHANCEMENTS
   ============================================ */
@media print {
    .fab-container,
    .toolbar,
    #lightbox,
    #back-to-top,
    #destination-search,
    .search-wrapper {
        display: none !important;
    }
}
