/**
 * ROYAL THEME - Mobile UX Improvements
 * Version: 1.1.2
 * Premium mobile experience enhancements
 */

/* ========================================
   1. MOBIL HEADER - REZERVASYON BUTONU
   ======================================== */

/* Desktop: Normal görünüm */
.btn-reservation-mobile {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Mobile: Tam genişlik ve görünür */
@media (max-width: 991px) {
    .header-cta {
        display: flex !important;
        flex: 1;
        max-width: 200px;
        margin-left: auto;
        margin-right: 10px;
    }

    html[dir="rtl"] .header-cta {
        margin-left: 10px;
        margin-right: auto;
    }
    
    .btn-reservation-mobile {
        width: 100%;
        padding: 10px 16px !important;
        font-size: 13px !important;
        font-weight: 600;
        letter-spacing: 0.5px;
        background: var(--gold-gradient) !important;
        color: #000 !important;
        border: none;
        border-radius: 8px;
        box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
        transition: all 0.3s ease;
        justify-content: center;
        white-space: nowrap;
    }
    
    .btn-reservation-mobile:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
    }
    
    .btn-reservation-mobile i {
        font-size: 14px;
    }
    
    .btn-reservation-mobile span {
        display: inline !important;
        font-weight: 600;
    }
}

@media (max-width: 576px) {
    .header-cta {
        max-width: 160px;
    }

    html[dir="rtl"] .header-cta {
        max-width: 64px;
    }
    
    .btn-reservation-mobile {
        padding: 8px 12px !important;
        font-size: 11px !important;
    }

    html[dir="rtl"] .btn-reservation-mobile {
        padding: 8px 10px !important;
        font-size: 11px;
    }
    
    .btn-reservation-mobile span {
        font-size: 11px;
    }

    html[dir="rtl"] .btn-reservation-mobile span {
        display: none !important;
    }
}

/* ========================================
   2. PREMIUM MOBIL SIDEBAR (GLASSMORPHISM)
   ======================================== */

@media (max-width: 991px) {
    .main-nav {
        background: rgba(10, 10, 10, 0.95) !important;
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        border-right: 1px solid rgba(212, 175, 55, 0.2);
        box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    }
    
    /* Menü linkleri arasına gold çizgiler */
    .main-nav ul {
        padding: 20px 0;
    }
    
    .main-nav ul li {
        width: 100%;
        border-bottom: 1px solid rgba(212, 175, 55, 0.1);
        padding: 0 30px;
    }
    
    .main-nav ul li:last-child {
        border-bottom: none;
    }
    
    .main-nav ul li a {
        display: block;
        padding: 18px 0;
        font-size: 16px;
        font-weight: 500;
        color: var(--royal-white);
        transition: all 0.3s ease;
        position: relative;
    }
    
    .main-nav ul li a::before {
        content: '';
        position: absolute;
        left: -30px;
        top: 50%;
        transform: translateY(-50%);
        width: 3px;
        height: 0;
        background: var(--gold-gradient);
        transition: height 0.3s ease;
    }
    
    .main-nav ul li a:hover::before,
    .main-nav ul li a.active::before {
        height: 60%;
    }
    
    .main-nav ul li a:hover,
    .main-nav ul li a.active {
        color: var(--royal-gold);
        padding-left: 15px;
    }
    
    /* Mobil dil ve sosyal medya grid */
    .mobile-lang-social-block {
        padding: 30px;
        border-top: 2px solid rgba(212, 175, 55, 0.2);
        background: rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(10px);
    }
    
    .mobile-lang-title {
        font-size: 12px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 2px;
        color: var(--royal-gold);
        margin-bottom: 15px;
        text-align: center;
        display: block;
        width: 100%;
    }
    
    /* Dil seçici grid - 4 kolon */
    .mobile-lang-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
        margin-bottom: 25px;
    }
    
    .mobile-lang-link {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        padding: 12px 8px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(212, 175, 55, 0.15);
        border-radius: 8px;
        transition: all 0.3s ease;
        text-decoration: none;
    }
    
    .mobile-lang-link:hover,
    .mobile-lang-link.active {
        background: rgba(212, 175, 55, 0.15);
        border-color: rgba(212, 175, 55, 0.4);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
    }
    
    .mobile-lang-link img {
        width: 24px;
        height: 18px;
        border-radius: 3px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }
    
    .mobile-lang-link span {
        font-size: 11px;
        font-weight: 600;
        color: var(--royal-white);
        text-transform: uppercase;
    }
    
    .mobile-lang-link.active span {
        color: var(--royal-gold);
    }
    
    /* Sosyal medya grid - 4 kolon - TAM ORTALAMA */
    .mobile-social-selector {
        text-align: center;
    }
    
    .mobile-social-grid {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 12px;
        max-width: 280px;
        margin: 0 auto;
    }
    
    .mobile-social-link {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 14px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(212, 175, 55, 0.15);
        border-radius: 8px;
        transition: all 0.3s ease;
        text-decoration: none;
    }
    
    .mobile-social-link:hover {
        transform: translateY(-2px) scale(1.05);
        box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
    }
    
    .mobile-social-link i {
        font-size: 18px;
        color: var(--royal-gold);
    }
}

/* ========================================
   3. REZERVASYON STEP BAR - YAN YANA (MOBIL)
   ======================================== */

@media (max-width: 768px) {
    #royalReservationWizard .royal-stepper {
        flex-direction: row !important;
        justify-content: space-between;
        gap: 8px !important;
        padding: 20px 15px;
    }
    
    #royalReservationWizard .royal-stepIndicator {
        flex: 1;
        min-width: 0;
    }
    
    #royalReservationWizard .royal-stepIndicator .step-icon {
        width: 40px !important;
        height: 40px !important;
        font-size: 16px !important;
        margin-bottom: 6px;
    }
    
    #royalReservationWizard .royal-stepIndicator .step-label {
        font-size: 11px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
}

@media (max-width: 576px) {
    #royalReservationWizard .royal-stepper {
        gap: 4px !important;
        padding: 15px 10px;
    }
    
    #royalReservationWizard .royal-stepIndicator .step-icon {
        width: 36px !important;
        height: 36px !important;
        font-size: 14px !important;
    }
    
    #royalReservationWizard .royal-stepIndicator .step-label {
        font-size: 10px !important;
    }
}

/* Alternatif: Sadece rakamlar (çok küçük ekranlar için) */
@media (max-width: 400px) {
    #royalReservationWizard .royal-stepIndicator .step-label {
        display: none;
    }
    
    #royalReservationWizard .royal-stepIndicator .step-icon::after {
        content: attr(data-step-number);
        position: absolute;
        bottom: -18px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 10px;
        font-weight: 600;
        color: var(--royal-gold);
        white-space: nowrap;
    }
}

/* ========================================
   4. AUTOCOMPLETE GÖRÜNÜRLÜK DÜZELTME
   ======================================== */

/* Form container overflow düzeltme */
.reservation-form,
.quick-reservation-form,
.glass-form,
.form-section,
.hero-section,
.hero-content,
.reservation-wrapper,
.form-container {
    overflow: visible !important;
}

.form-group {
    position: relative !important;
    overflow: visible !important;
    z-index: auto;
}

.glass-input,
input[type="text"],
input[type="search"] {
    position: relative;
    z-index: 1;
}

/* Google Places Autocomplete - KESİN ÇÖZÜM */
.pac-container {
    z-index: 999999 !important;
    overflow: visible !important;
    pointer-events: auto !important;
}

.pac-item {
    padding: 12px 16px !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.pac-item:hover,
.pac-item-selected {
    background: rgba(212, 175, 55, 0.1) !important;
}

.pac-icon {
    margin-right: 12px !important;
}

/* Mobilde autocomplete tam genişlik */
@media (max-width: 768px) {
    .pac-container {
        z-index: 999999 !important;
    }
}

/* ========================================
   5. EK MOBIL İYİLEŞTİRMELER
   ======================================== */

/* Touch-friendly butonlar */
@media (max-width: 768px) {
    .btn-royal,
    .btn-royal-outline,
    button,
    a.btn {
        min-height: 44px;
        padding: 12px 20px;
        font-size: 14px;
    }
    
    /* Form inputları */
    input,
    select,
    textarea {
        min-height: 48px;
        font-size: 16px; /* iOS zoom önleme */
    }

    .reservation-wrapper,
    #royalReservationWizard,
    #royalReservationWizard .royal-wizardBody,
    #royalReservationWizard .royal-stepPanel {
        overflow: visible !important;
    }
}

/* Mobil scroll iyileştirme */
@media (max-width: 991px) {
    .main-nav {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
}

/* Premium loading state */
.glass-input:focus,
.form-control:focus {
    border-color: rgba(212, 175, 55, 0.5) !important;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1) !important;
    outline: none !important;
}
