/* Sidebar - Slide-in Menü */
.sidebar {
    position: fixed !important;
    left: -380px;
    top: 0;
    bottom: 0;
    width: 350px;
    background: #f8f9fa;
    padding: 20px;
    overflow-y: auto;
    z-index: 999998 !important;
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.15);
    transition: left 0.3s ease;
    -webkit-overflow-scrolling: touch;
}

.sidebar.active {
    left: 0 !important;
    display: block !important;
    visibility: visible !important;
}

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

/* Arama Kutusu */
.search-box {
    margin-bottom: 25px;
}

.search-box input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    -webkit-appearance: none;
    appearance: none;
}

.search-box input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Sidebar Accordion */
.sidebar-accordion {
    margin-bottom: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    background: white;
}

.sidebar-accordion-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
    font-weight: 600;
}

.sidebar-accordion-header:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
}

.sidebar-accordion-header .accordion-arrow {
    font-size: 14px;
    transition: transform 0.3s;
    display: inline-block;
}

.sidebar-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0;
    background: #f8f9fa;
}

.sidebar-accordion-content.active {
    max-height: 3000px;
    padding: 15px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.sidebar-accordion-content .search-box {
    margin-bottom: 15px;
}

.sidebar-accordion-content .item-list {
    max-height: calc(100vh - 300px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* Bölüm Başlığı */
.section {
    margin-bottom: 25px;
}

.section h3 {
    font-size: 16px;
    margin-bottom: 12px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.section-title {
    font-size: 16px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Item Listesi */
.item-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    max-height: calc(100vh - 250px);
    padding-right: 4px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.item-list::-webkit-scrollbar {
    width: 8px;
}

.item-list::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 4px;
}

.item-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.item-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.item {
    background: white;
    padding: 12px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.item.selected {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.item-name {
    font-weight: 500;
    font-size: 14px;
}

.item-count {
    background: #e0e0e0;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.item.selected .item-count {
    background: rgba(255,255,255,0.3);
    color: white;
}

.no-results {
    padding: 20px;
    text-align: center;
    color: #666;
    font-style: italic;
}

/* Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #667eea;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.item-with-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 12px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
}

.item-with-switch:hover {
    border-color: #667eea;
    transform: translateX(5px);
}

.item-with-switch.active {
    background: #f0f4ff;
    border-color: #667eea;
}

.item-content {
    flex: 1;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.schedule-quick-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.schedule-quick-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(102, 126, 234, 0.4);
}

.schedule-quick-btn:active {
    transform: scale(0.95);
}

/* Butonlar */
.toggle-all-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.3s;
}

.toggle-all-btn:hover {
    background: #5568d3;
}

.refresh-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    margin-top: 10px;
    transition: all 0.3s;
}

.refresh-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Mobil Uyumlu Stiller */
@media (max-width: 768px) {
    .sidebar-accordion {
        margin-bottom: 12px;
    }
    
    .sidebar-accordion-header {
        padding: 14px 12px;
        font-size: 15px;
    }
    
    .sidebar-accordion-content {
        max-height: 0;
        overflow: hidden;
    }
    
    .sidebar-accordion-content.active {
        max-height: 800px;
        padding: 12px;
        overflow-y: auto;
    }
    
    .sidebar-accordion-content .item-list {
        max-height: 500px;
        overflow-y: auto;
    }
    
    .search-box {
        margin-bottom: 15px;
    }

    .search-box input {
        padding: 14px 16px;
        font-size: 16px;
        border-radius: 10px;
        min-height: 48px;
    }

    .section {
        margin-bottom: 15px;
    }

    .section-title {
        font-size: 15px;
    }

    .item {
        padding: 14px 12px;
        font-size: 14px;
        min-height: 52px;
        border-radius: 10px;
    }

    .item-list {
        gap: 8px;
        max-height: calc(100vh - 200px);
    }

    .toggle-all-btn {
        padding: 8px 14px;
        font-size: 12px;
        min-height: 36px;
        border-radius: 8px;
    }

    .section-header {
        margin-bottom: 12px;
    }
    
    .item-with-switch {
        padding: 14px 12px;
        min-height: 52px;
        border-radius: 10px;
    }
    
    .switch {
        width: 50px;
        height: 26px;
    }
    
    .slider:before {
        height: 20px;
        width: 20px;
        left: 3px;
        bottom: 3px;
    }
    
    input:checked + .slider:before {
        transform: translateX(24px);
    }
}

@media (max-width: 480px) {
    .item {
        padding: 14px 10px;
        flex-direction: row;
        align-items: center;
        gap: 10px;
        min-height: 56px;
    }

    .item-name {
        font-size: 14px;
    }

    .item-count {
        font-size: 12px;
        padding: 4px 10px;
    }

    .toggle-all-btn {
        padding: 8px 12px;
        font-size: 12px;
        min-height: 36px;
    }

    .section-header {
        flex-direction: row;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
    }

    .switch {
        width: 50px;
        height: 26px;
    }

    .slider:before {
        height: 20px;
        width: 20px;
    }

    input:checked + .slider:before {
        transform: translateX(24px);
    }
    
    .item-with-switch {
        min-height: 56px;
        padding: 14px 10px;
    }
    
    .schedule-quick-btn {
        padding: 8px 12px;
        font-size: 16px;
        min-width: 44px;
        min-height: 44px;
    }
}

/* Accordion */
.accordion-header {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.accordion-header:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.accordion-arrow {
    font-size: 10px;
    font-weight: bold;
}

.accordion-content {
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f5f5f5;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.accordion-content::-webkit-scrollbar {
    width: 8px;
}

.accordion-content::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 4px;
}

.accordion-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.accordion-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Sefer Saatleri Paneli */
.schedule-panel {
    position: fixed;
    right: -750px;
    top: 0;
    bottom: 0;
    width: 750px;
    background: white;
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.2);
    transition: right 0.3s ease;
    z-index: 1001;
    display: flex;
    flex-direction: column;
}

.schedule-panel.active {
    right: 0;
}

.schedule-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.schedule-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.schedule-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.schedule-selector {
    margin-bottom: 20px;
}

.schedule-selector label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.schedule-selector select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
}

.schedule-selector select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.schedule-day-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.day-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    transition: all 0.3s;
}

.day-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

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

.schedule-action-btn {
    margin-bottom: 20px;
}

.load-schedule-btn {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.load-schedule-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.load-schedule-btn:active {
    transform: translateY(0);
}

.load-schedule-btn span {
    font-size: 18px;
}

.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.schedule-direction-section {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.schedule-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    margin-bottom: 0;
    border-bottom: 2px solid #f0f0f0;
    cursor: pointer;
    user-select: none;
    transition: background 0.3s;
    border-radius: 12px 12px 0 0;
}

.schedule-section-header:hover {
    background: #f8f9fa;
}

.accordion-arrow {
    font-size: 12px;
    transition: transform 0.3s;
    display: inline-block;
    color: #667eea;
}

.schedule-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 16px;
}

.schedule-accordion-content.active {
    max-height: 5000px;
    padding: 16px;
}

.section-icon {
    font-size: 24px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    flex: 1;
}

.section-count {
    background: #667eea;
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
}

.schedule-hour-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.hour-label {
    background: #28a745;
    color: white;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    min-width: 50px;
    text-align: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(40, 167, 69, 0.3);
}

.hour-times {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    flex: 1;
}

.time-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    cursor: default;
    min-width: 65px;
    flex-shrink: 0;
    text-align: center;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.time-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.schedule-empty {
    padding: 40px 20px;
    text-align: center;
    color: #999;
    font-style: italic;
}

.schedule-sample-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 12px;
    font-size: 12px;
    color: #856404;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.4;
}

/* Responsive */
@media (max-width: 768px) {
    .schedule-panel {
        width: 100%;
        right: -100%;
    }
    
    .schedule-header {
        padding: 18px;
    }
    
    .schedule-header h3 {
        font-size: 18px;
    }
    
    .close-btn {
        width: 44px;
        height: 44px;
        font-size: 24px;
    }
    
    .schedule-content {
        padding: 18px;
    }
    
    .schedule-selector select {
        padding: 14px;
        font-size: 16px;
        min-height: 48px;
        border-radius: 10px;
    }
    
    .day-btn {
        padding: 14px;
        font-size: 15px;
        min-height: 48px;
        border-radius: 10px;
    }
    
    .load-schedule-btn {
        padding: 16px 20px;
        font-size: 16px;
        min-height: 52px;
        border-radius: 10px;
    }
    
    .hour-label {
        padding: 12px 14px;
        font-size: 16px;
        min-width: 50px;
        border-radius: 10px;
    }
    
    .time-badge {
        padding: 10px 14px;
        font-size: 14px;
        min-width: 65px;
        border-radius: 10px;
    }
    
    .section-title {
        font-size: 17px;
    }
    
    .section-count {
        font-size: 13px;
        padding: 6px 12px;
    }
    
    .hour-times {
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .schedule-hour-row {
        gap: 10px;
        margin-bottom: 14px;
    }
    
    .schedule-section-header {
        padding: 14px;
        min-height: 56px;
    }
    
    .accordion-arrow {
        font-size: 16px;
    }
}
