/**
 * Single Property Page Enhanced Styles
 * Complementary styles for Tailwind classes in single-vacation-rental.php
 * Manuel Antonio Estates - 2025
 */

/* ==========================================================================
   Component-specific enhancements
   ========================================================================== */

/* Language switcher in header */
.header-language-switcher {
    margin: 0;
}

/* Smooth transitions for interactive elements */
.property-image-overlay {
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.1) 100%);
}

/* Enhanced focus states for accessibility */
.mae-language-switcher button:focus,
.related-property-card a:focus {
    outline: 2px solid #14b8a6;
    outline-offset: 2px;
}

/* Custom scrollbar for calendar components */
.property-calendar-section::-webkit-scrollbar {
    width: 6px;
}

.property-calendar-section::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.property-calendar-section::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.property-calendar-section::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Loading states for components */
.component-loading {
    @apply bg-gray-100 animate-pulse rounded-lg;
    min-height: 200px;
}

/* ==========================================================================
   Print Styles (Tailwind-compatible)
   ========================================================================== */

@media print {
    .sticky {
        position: static !important;
    }
    
    .shadow-sm,
    .shadow-md,
    .shadow-lg {
        box-shadow: none !important;
        border: 1px solid #e5e7eb !important;
    }
    
    .bg-gray-50 {
        background: white !important;
    }
    
    /* Hide interactive elements in print */
    .header-language-switcher,
    .property-calendar-section,
    .property-contact-section,
    .related-properties-section {
        display: none !important;
    }
    
    /* Ensure content spans full width */
    .lg\:col-span-2 {
        grid-column: span 3 !important;
    }
    
    .lg\:col-span-1 {
        display: none !important;
    }
}

/* ==========================================================================
   Dark mode support (future enhancement)
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    .bg-white {
        background-color: #1f2937 !important;
        color: #f9fafb !important;
    }
    
    .bg-gray-50 {
        background-color: #111827 !important;
    }
    
    .text-gray-900 {
        color: #f9fafb !important;
    }
    
    .text-gray-700 {
        color: #d1d5db !important;
    }
    
    .border-gray-100 {
        border-color: #374151 !important;
    }
    
    .shadow-sm {
        box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.3) !important;
    }
}

/* ==========================================================================
   Mobile-specific enhancements
   ========================================================================== */

@media (max-width: 768px) {
    /* Ensure proper spacing on mobile */
    .lg\:sticky {
        position: static !important;
    }
    
    /* Adjust grid order for mobile */
    .lg\:col-span-1 {
        order: -1;
    }
    
    /* Optimize touch targets */
    .header-language-switcher button {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Reduce padding on mobile */
    .p-6 {
        padding: 1rem !important;
    }
    
    .py-8 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
}

/* ==========================================================================
   Animation enhancements
   ========================================================================== */

/* Smooth page transitions */
.min-h-screen {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Enhanced hover effects */
.hover\:shadow-lg:hover {
    transform: translateY(-2px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus animations */
@keyframes focusRing {
    0% {
        box-shadow: 0 0 0 0 rgba(20, 184, 166, 0.4);
    }
    70% {
        box-shadow: 0 0 0 4px rgba(20, 184, 166, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(20, 184, 166, 0);
    }
}

.focus\:ring:focus {
    animation: focusRing 0.6s ease-out;
}

/* ==========================================================================
   Try Before You Buy - Rotating Gradient Border
   Used on home-for-sale property pages
   ========================================================================== */

.try-before-buy-card {
    position: relative;
    overflow: hidden;
}

.try-before-buy-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 0.75rem;
    padding: 2px;
    background: linear-gradient(
        90deg,
        #009588,
        #f97316,
        #24C4A7,
        #ea580c,
        #009588
    );
    background-size: 400% 100%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: gradient-rotate-tbyb 6s linear infinite;
}

@keyframes gradient-rotate-tbyb {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 300% 50%;
    }
}
