/* ======================================
   POOLTIME - CUSTOM STYLES
   Solo estilos personalizados adicionales a Tailwind CSS
   ====================================== */

/* ======================================
   HEADER & NAVIGATION IMPROVEMENTS
   ====================================== */

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Header sticky backdrop blur effect */
#mainHeader {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

/* Dropdown animations */
#userMenu {
    animation: slideDown 0.2s ease-out;
    transform-origin: top right;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

  /* ============================================
           ESTILOS PERSONALIZADOS PARA MODALES
           ============================================ */

        /* Animaciones de modales */
        @keyframes modalFadeIn {
            from {
                opacity: 0;
            }

            to {
                opacity: 1;
            }
        }

        @keyframes modalSlideUp {
            from {
                opacity: 0;
                transform: translateY(30px) scale(0.95);
            }

            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        .modal-backdrop {
            animation: modalFadeIn 0.3s ease-out;
        }

        .modal-content {
            animation: modalSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        /* Animación pulse para iconos */
        @keyframes pulse-scale {

            0%,
            100% {
                transform: scale(1);
            }

            50% {
                transform: scale(1.1);
            }
        }

        .animate-pulse-icon {
            animation: pulse-scale 2s ease-in-out infinite;
        }

        /* Animación para checkmarks de validación */
        @keyframes checkmark-appear {
            0% {
                opacity: 0;
                transform: scale(0) rotate(-45deg);
            }

            50% {
                transform: scale(1.2) rotate(0deg);
            }

            100% {
                opacity: 1;
                transform: scale(1) rotate(0deg);
            }
        }

        .checkmark-validated {
            animation: checkmark-appear 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        /* Inputs de código con mejor feedback */
        .code-input.filled {
            border-color: #06b6d4;
            background: linear-gradient(135deg, #ecfeff 0%, #e0f2fe 100%);
        }

        .code-input.error {
            border-color: #ef4444;
            background: #fef2f2;
            animation: shake 0.4s ease-in-out;
        }

        @keyframes shake {

            0%,
            100% {
                transform: translateX(0);
            }

            25% {
                transform: translateX(-8px);
            }

            75% {
                transform: translateX(8px);
            }
        }

        /* Progress bar de tiempo */
        .progress-timer {
            height: 4px;
            background: linear-gradient(90deg, #06b6d4 0%, #3b82f6 100%);
            transition: width 1s linear;
        }

        /* Selector de roles mejorado */
        .role-card {
            transition: all 0.3s ease;
        }

        .role-card:hover {
            transform: translateY(-4px);
            box-shadow: 0 12px 24px rgba(6, 182, 212, 0.15);
        }

        .role-card.selected {
            background: linear-gradient(135deg, #ecfeff 0%, #dbeafe 100%);
            border-color: #06b6d4;
            box-shadow: 0 8px 16px rgba(6, 182, 212, 0.2);
        }

        .role-card.selected .role-checkmark {
            opacity: 1;
            transform: scale(1);
        }

        .role-checkmark {
            opacity: 0;
            transform: scale(0);
            transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        /* Indicador de fortaleza de contraseña */
        .password-strength-bar {
            height: 4px;
            border-radius: 2px;
            transition: all 0.3s ease;
        }

        .password-strength-weak {
            width: 33%;
            background: #ef4444;
        }

        .password-strength-medium {
            width: 66%;
            background: #f59e0b;
        }

        .password-strength-strong {
            width: 100%;
            background: #10b981;
        }

/* Mobile sidebar slide animation */
#sidebarContent {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Notification badge pulse */
#badge-notifications,
#badge-favoritos {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: .8;
    }
}

/* Banner shake animation for verification */
#verificationBanner {
    animation: gentleShake 0.5s ease-in-out;
}

@keyframes gentleShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Hover effect for navigation links */
nav a {
    position: relative;
    transition: color 0.3s ease;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #06b6d4, #3b82f6);
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

/* ======================================
   FLATPICKR CALENDAR
   ====================================== */

/* Flatpickr Calendar Customization */
.flatpickr-calendar {
    width: 100% !important;
    max-width: none !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.flatpickr-innerContainer,
.flatpickr-rContainer,
.flatpickr-days,
.dayContainer {
    width: 100% !important;
    min-width: 100% !important;
    max-width: none !important;
}

.dayContainer {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    gap: 4px !important;
    padding: 0 !important;
}

.flatpickr-day {
    width: auto !important;
    max-width: none !important;
    height: 48px !important;
    line-height: 47px !important;
    margin: 0 !important;
    flex: 1 1 auto !important;
    border-radius: 0.5rem !important;
    border: 1px solid transparent;
    background: transparent;
}

.flatpickr-day.selected {
    background: #0891B2 !important;
    border-color: #0891B2 !important;
    color: white !important;
}

.flatpickr-day.today {
    background: #E5F7FB !important;
    border-color: #0891B2 !important;
    color: #0891B2 !important;
}

.flatpickr-day.disabled {
    background: #FEE2E2 !important;
    color: #EF4444 !important;
    text-decoration: line-through !important;
    opacity: 0.7 !important;
    cursor: not-allowed !important;
}

.flatpickr-months {
    margin-bottom: 1rem;
}

.flatpickr-months .flatpickr-month {
    background: transparent;
}

.flatpickr-current-month {
    padding: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
}

.flatpickr-weekdays {
    margin-bottom: 0.5rem;
}

.flatpickr-weekday {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6B7280;
}

/* Image Gallery Styles */
.image-item {
    display: inline-flex; 
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    margin-right: .75rem;
}

.image-item .delete-btn {
    border: none;
    background: #ef4444; 
    color: #fff;
    width: 1.5rem;
    height: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    line-height: 1;
    border-radius: 0.25rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.06);
    transition: transform .12s ease, opacity .12s ease;
}

.image-item .delete-btn:hover {
    transform: scale(1.08);
    opacity: .95;
}

.image-item img,
#newPreviews img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: .5rem;
    display: block;
}

#addPhotoCard {
    transition: transform .12s ease, background-color .12s ease, border-color .12s ease;
}

#addPhotoCard:hover {
    transform: translateY(-3px);
    background-color: #f8fafc; 
    border-color: #d1d5db; 
}

.portada-radio {
    accent-color: #06b6d4; 
    width: 1rem;
    height: 1rem;
}

/* Star Rating Styles */
.ri-star-fill,
.ri-star-line {
    font-size: 1rem;
    vertical-align: middle;
}

.ri-star-fill {
    color: #f59e0b; 
}

/* DataTables Customization */
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    padding: 6px 8px;
}

table.dataTable thead th { 
    background: transparent; 
}

.dataTables_wrapper table.dataTable tbody tr:hover { 
    background: #f8fafc; 
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: .25rem .5rem;
    border-radius: .375rem;
    margin: 0 .125rem;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #374151;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: #06b6d4;
    color: #fff !important;
    border-color: #06b6d4;
}

/* Dashboard Utilities */
.dashboard-submenu { 
    -webkit-overflow-scrolling: touch; 
}

.table-badge { 
    display: inline-flex; 
    align-items: center; 
    gap: .35rem; 
    padding: .25rem .5rem; 
    border-radius: 9999px; 
    font-size: .75rem; 
    font-weight: 600; 
}

/* Additional Badge Colors (para estados que Tailwind no incluye por defecto) */
.bg-green-100 { 
    background-color: rgb(220 252 231 / 1); 
}
.text-green-800 { 
    color: rgb(6 95 70 / 1); 
}

.bg-red-100 { 
    background-color: rgb(254 226 226 / 1); 
}
.text-red-800 { 
    color: rgb(153 27 27 / 1); 
}

.bg-amber-100 { 
    background-color: rgb(255 247 237 / 1); 
}
.text-amber-800 { 
    color: rgb(146 64 14 / 1); 
}

/* Smooth Animations */
.transition-smooth {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Custom Scrollbar */
.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

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

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

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Precio especial para calendarios */
.flatpickr-day.pt-price-day {
    background: linear-gradient(180deg, rgba(6,182,212,0.10), rgba(6,182,212,0.04));
    border-color: rgba(6,182,212,0.25);
}

.flatpickr-day.pt-price-day.selected, 
.flatpickr-day.pt-price-day.today {
    box-shadow: 0 0 0 2px rgba(6,182,212,0.12) inset;
}

/* Past days: disabled but neutral */
.flatpickr-day.pt-past-day {
    background: transparent !important;
    color: #94a3b8 !important; 
    cursor: not-allowed !important;
    opacity: 0.9;
}

/* Messages Interface Styles */
.mensaje-item {
    transition: all 0.2s ease-in-out;
}

.mensaje-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

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

/* Modal backdrop blur */
.modal-backdrop {
    backdrop-filter: blur(4px);
}

/* Custom scrollbar for modal */
.modal-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f8fafc;
}

.modal-scrollbar::-webkit-scrollbar {
    width: 4px;
}

.modal-scrollbar::-webkit-scrollbar-track {
    background: #f8fafc;
    border-radius: 2px;
}

.modal-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

.modal-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Animation for message status updates */
.mensaje-leido {
    opacity: 0.85;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Notification Badge Styles */
.notification-badge {
    animation: pulse 2s infinite;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 4px rgba(239, 68, 68, 0);
    }
    
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* Help Page Styles */
.help-section {
    scroll-margin-top: 2rem;
}

/* Improved Details/Summary Styling */
details > summary {
    list-style: none;
}

details > summary::-webkit-details-marker {
    display: none;
}

details[open] > summary {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

details[open] > div {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

/* Gradient Backgrounds for Different Sections */
.section-anfitriones {
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
}

.section-huespedes {
    background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
}

.section-recursos {
    background: linear-gradient(135deg, #fffbeb 0%, #fefce8 100%);
}

.section-contacto {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
}

/* Hover Effects for Interactive Elements */
.help-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.help-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Status Indicator Animation */
.status-pulse {
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Contact Button Hover Effects */
.contact-button {
    transition: all 0.2s ease-in-out;
    position: relative;
    overflow: hidden;
}

.contact-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.contact-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.contact-button:hover::before {
    left: 100%;
}

/* Responsive Improvements */
@media (max-width: 768px) {
    .help-card {
        margin-bottom: 1rem;
    }
    
    details > summary {
        padding: 0.75rem;
    }
}

/* Footer Enhancements */
.footer-link-hover {
    position: relative;
    overflow: hidden;
}

.footer-link-hover::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #06b6d4, #3b82f6);
    transition: width 0.3s ease;
}

.footer-link-hover:hover::before {
    width: 100%;
}

/* Newsletter input focus effects */
.newsletter-input {
    background: rgba(55, 65, 81, 0.5);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.newsletter-input:focus {
    background: rgba(55, 65, 81, 0.8);
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.2);
}

/* Social icons hover effect */
.social-icon {
    position: relative;
    overflow: hidden;
}

.social-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.social-icon:hover::before {
    left: 100%;
}

/* Heart animation for the special message */
@keyframes heartbeat {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.footer-heart {
    animation: heartbeat 2s infinite;
}

/* Gradient text hover effect */
.gradient-text-hover {
    transition: all 0.3s ease;
}

.gradient-text-hover:hover {
    filter: brightness(1.2);
    transform: scale(1.02);
}
