/* Adıyaman Transit - Ana Stil */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 0;
    margin: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    touch-action: pan-y;
}

.container {
    max-width: 100%;
    margin: 0;
    background: white;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    height: 100vh;
    position: relative;
}

/* Hamburger Menü Butonu */
.hamburger-menu-btn {
    position: fixed !important;
    top: 220px;
    left: 20px;
    z-index: 999999 !important;
    width: 50px;
    height: 50px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    transition: all 0.3s;
    pointer-events: auto !important;
}

/* Menü açıkken hamburger'ı sağa kaydır */
.hamburger-menu-btn.active {
    left: 370px !important;
}

/* Tam ekran modunda hamburger'ın görünürlüğünü garanti et */
body:fullscreen .hamburger-menu-btn,
body:-webkit-full-screen .hamburger-menu-btn,
body:-moz-full-screen .hamburger-menu-btn,
.fullscreen-mode .hamburger-menu-btn,
:fullscreen .hamburger-menu-btn,
:-webkit-full-screen .hamburger-menu-btn,
:-moz-full-screen .hamburger-menu-btn {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 999999 !important;
    position: fixed !important;
    pointer-events: auto !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
    border: 3px solid #667eea !important;
}

.hamburger-menu-btn:hover {
    background: #f8f9fa;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.hamburger-menu-btn:active {
    transform: scale(0.95);
}

.hamburger-menu-btn span {
    width: 24px;
    height: 3px;
    background: #667eea;
    border-radius: 2px;
    transition: all 0.3s;
}

.hamburger-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translateY(9px);
}

.hamburger-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-9px);
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999997 !important;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.sidebar-overlay.active {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

/* Tam ekran modunda overlay görünsün */
body:fullscreen .sidebar-overlay,
body:-webkit-full-screen .sidebar-overlay,
body:-moz-full-screen .sidebar-overlay,
.fullscreen-mode .sidebar-overlay,
:fullscreen .sidebar-overlay,
:-webkit-full-screen .sidebar-overlay,
:-moz-full-screen .sidebar-overlay {
    z-index: 999997 !important;
    position: fixed !important;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    color: white;
    font-size: 18px;
    font-weight: 600;
    margin-top: 20px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    text-align: center;
}

.header h1 {
    font-size: 20px;
    margin-bottom: 5px;
}

.header p {
    opacity: 0.9;
    font-size: 12px;
}

.main-content {
    display: block;
    width: 100%;
    height: 100vh;
}
    min-height: 600px;
    transition: transform 0.3s ease;
}

.main-content.mobile-menu-open {
    transform: translateX(0);
}

.main-content.mobile-menu-open .sidebar {
    display: flex;
}

/* Mobile Menu Toggle Button - Hidden, using map buttons instead */
.mobile-menu-toggle {
    display: none;
}

/* Mobile Overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    opacity: 1;
}

/* Tablet Responsive Design */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 320px 1fr;
    }
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 0;
    }
    
    .container {
        border-radius: 0;
        height: 100vh;
    }
    
    .main-content {
        grid-template-columns: 1fr;
        min-height: 100vh;
        position: relative;
    }
    
    .sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        bottom: 0;
        width: 85%;
        max-width: 380px;
        height: 100vh;
        z-index: 1000;
        background: white;
        border-right: 1px solid #e0e0e0;
        padding: 20px;
        overflow-y: auto;
        transition: left 0.3s ease;
        box-shadow: 4px 0 12px rgba(0, 0, 0, 0.15);
        max-height: 100vh;
        display: flex;
        flex-direction: column;
        gap: 0;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .mobile-overlay {
        display: block;
        pointer-events: none;
    }
    
    .mobile-overlay.active {
        pointer-events: auto;
    }
    
    .map-container {
        border-left: none;
        height: 100vh;
        width: 100%;
    }
    
    #map {
        height: calc(100vh - 60px) !important;
    }
    
    .map-header img {
        height: 45px !important;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .sidebar {
        width: 90%;
        padding: 15px;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .map-header {
        padding: 10px;
        flex-wrap: wrap;
    }
    
    .map-header-title {
        font-size: 11px;
        order: 2;
        width: 100%;
        margin-top: 8px;
    }
    
    .map-header > div:nth-child(2) {
        order: 1;
        flex: 0 0 auto;
    }
    
    .map-header img {
        height: 40px !important;
    }
    
    .map-controls {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        gap: 4px;
        margin-top: 8px;
    }
    
    #map {
        height: calc(100vh - 140px) !important;
    }
}

/* Landscape Mobile Optimization */
@media (max-width: 900px) and (orientation: landscape) {
    .sidebar {
        width: 60%;
        max-width: 400px;
    }
    
    #map {
        height: calc(100vh - 60px) !important;
    }
    
    .map-header {
        padding: 8px 12px;
    }
    
    .map-header img {
        height: 35px !important;
    }
}

.sidebar {
    background: #f8f9fa;
    padding: 25px;
    border-right: 1px solid #e0e0e0;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    height: 100vh;
    max-height: 100vh;
}

.loading {
    text-align: center;
    padding: 50px;
    color: #666;
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

.error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

/* Modluk Modu */
.main-content.compact {
    grid-template-columns: 1fr;
}

.main-content.compact .sidebar {
    display: none;
}

/* Performance optimizations */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    body {
        min-height: -webkit-fill-available;
    }
    
    .container {
        min-height: -webkit-fill-available;
    }
    
    .sidebar {
        -webkit-overflow-scrolling: touch;
    }
}

/* Fullscreen Mode */
body.fullscreen-mode {
    padding: 0;
}

.container.fullscreen-mode {
    max-width: 100%;
    margin: 0;
    border-radius: 0;
    min-height: 100vh;
}

.container.fullscreen-mode .header {
    display: none;
}

.container.fullscreen-mode .main-content {
    min-height: 100vh;
}

/* Rotalar Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999998;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    width: 90%;
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    border-bottom: 2px solid #f0f0f0;
}

.modal-header h2 {
    font-size: 20px;
    color: #333;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
}

.close-btn:hover {
    color: #333;
}

/* ==========================================
   HAR\u0130TA ARAMA BUTONU VE PANEL\u0130
   ========================================== */

/* Arama Butonu - Hamburger'ın altında */
.map-search-btn {
    position: fixed !important;
    top: 280px;
    left: 20px;
    z-index: 999999 !important;
    width: 50px;
    height: 50px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    display: flex !important;
    justify-content: center;
    align-items: center;
    font-size: 22px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    transition: all 0.3s;
    pointer-events: auto !important;
}

.map-search-btn:hover {
    background: #f8f9fa;
    border-color: #667eea;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.map-search-btn:active {
    transform: scale(0.95);
}

.map-search-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
}

/* Menü açıkken arama butonunu da sağa kaydır */
.map-search-btn.sidebar-open {
    left: 370px !important;
}

/* Arama Paneli */
.map-search-panel {
    position: fixed !important;
    top: 280px;
    left: 80px;
    width: 350px;
    max-height: 450px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 999998 !important;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: searchPanelSlide 0.3s ease;
}

.map-search-panel.active {
    display: flex;
}

/* Sidebar açıkken panel de sağa kayar */
.map-search-panel.sidebar-open {
    left: 430px !important;
}

@keyframes searchPanelSlide {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.map-search-header {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
    gap: 10px;
}

.map-search-header input {
    flex: 1;
    border: none;
    background: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    border: 2px solid #e0e0e0;
    transition: border-color 0.3s;
}

.map-search-header input:focus {
    border-color: #667eea;
}

.map-search-close {
    width: 36px;
    height: 36px;
    border: none;
    background: #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.map-search-close:hover {
    background: #ff6b6b;
    color: white;
}

/* Arama Sekmeleri */
.map-search-tabs {
    display: flex;
    padding: 10px 15px;
    gap: 8px;
    border-bottom: 1px solid #e0e0e0;
    background: #fafafa;
}

.search-tab {
    flex: 1;
    padding: 8px 12px;
    border: none;
    background: #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s;
    white-space: nowrap;
}

.search-tab:hover {
    background: #d0d0d0;
}

.search-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Arama Sonuçları */
.map-search-results {
    flex: 1;
    overflow-y: auto;
    max-height: 300px;
    padding: 10px;
}

.map-search-results::-webkit-scrollbar {
    width: 8px;
}

.map-search-results::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

.map-search-results::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

.search-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #999;
    text-align: center;
}

.search-empty-state span {
    font-size: 40px;
    margin-bottom: 10px;
    opacity: 0.5;
}

.search-empty-state p {
    margin: 0;
    font-size: 14px;
}

/* Arama Sonuç Öğesi */
.search-result-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s;
    gap: 12px;
    border: 2px solid transparent;
}

.search-result-item:hover {
    background: #e8f0fe;
    border-color: #667eea;
    transform: translateX(5px);
}

.search-result-item:last-child {
    margin-bottom: 0;
}

.search-result-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.search-result-icon.vehicle {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.search-result-icon.station {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.search-result-info {
    flex: 1;
    overflow: hidden;
}

.search-result-title {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-subtitle {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
}

.search-result-badge.vehicle {
    background: #e8f0fe;
    color: #667eea;
}

.search-result-badge.station {
    background: #e8f8f0;
    color: #11998e;
}

/* Yükleniyor durumu */
.search-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    color: #666;
}

.search-loading::before {
    content: '';
    width: 24px;
    height: 24px;
    border: 3px solid #e0e0e0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: searchSpin 0.8s linear infinite;
    margin-right: 10px;
}

@keyframes searchSpin {
    to { transform: rotate(360deg); }
}

/* Sonuç bulunamadı */
.search-no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #999;
    text-align: center;
}

.search-no-results span {
    font-size: 40px;
    margin-bottom: 10px;
}

.search-no-results p {
    margin: 0;
    font-size: 14px;
}

/* Tam ekran modunda arama butonunun görünürlüğü */
body:fullscreen .map-search-btn,
body:-webkit-full-screen .map-search-btn,
body:-moz-full-screen .map-search-btn,
.fullscreen-mode .map-search-btn,
:fullscreen .map-search-btn,
:-webkit-full-screen .map-search-btn,
:-moz-full-screen .map-search-btn {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 999999 !important;
    position: fixed !important;
    pointer-events: auto !important;
}

body:fullscreen .map-search-panel,
body:-webkit-full-screen .map-search-panel,
body:-moz-full-screen .map-search-panel,
.fullscreen-mode .map-search-panel,
:fullscreen .map-search-panel,
:-webkit-full-screen .map-search-panel,
:-moz-full-screen .map-search-panel {
    z-index: 999998 !important;
    position: fixed !important;
}

