﻿/* Harita için sadece karanlık tema engelleme */
.map-container,
.map-content {
    color-scheme: light;
}

/* Admin Sol Toolbar */
.admin-left-toolbar {
    position: fixed;
    left: 20px;
    top: 120px;
    z-index: 999;
    background: rgba(10, 25, 47, 0.95);
    /* var(--navy-dark) with opacity */
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0;
    min-width: 200px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    animation: slideInLeft 0.4s ease-out;
}

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

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.admin-left-toolbar .toolbar-header {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-dark) 100%);
    color: white;
    padding: 12px 16px;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-left-toolbar .toolbar-header i {
    font-size: 16px;
}

.admin-left-toolbar .toolbar-buttons {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.admin-left-toolbar .toolbar-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    width: 100%;
}

.admin-left-toolbar .toolbar-btn:hover {
    background: rgba(237, 28, 36, 0.1);
    /* var(--primary-red) with opacity */
    transform: translateX(4px);
    border-color: var(--primary-red);
}

.admin-left-toolbar .toolbar-btn:active {
    transform: translateX(2px);
}

.admin-left-toolbar .toolbar-btn.active {
    background: var(--primary-red);
    border-color: var(--primary-red);
    box-shadow: var(--shadow-md);
}

.admin-left-toolbar .toolbar-btn-danger {
    background: rgba(220, 53, 69, 0.1);
    border-color: rgba(220, 53, 69, 0.3);
    color: #ff6b6b;
}

.admin-left-toolbar .toolbar-btn-danger:hover {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
    box-shadow: var(--shadow-md);
}

.admin-left-toolbar .toolbar-btn i {
    font-size: 16px;
    min-width: 16px;
}

.admin-left-toolbar .toolbar-btn span {
    flex: 1;
}

@media (max-width: 768px) {
    .admin-left-toolbar {
        left: 10px;
        top: 80px;
        min-width: 160px;
    }

    .admin-left-toolbar .toolbar-btn {
        padding: 10px 12px;
        font-size: 12px;
    }

    .admin-left-toolbar .toolbar-btn i {
        font-size: 14px;
    }
}

/* ===== PROFESYONEL HEADER - MODERN MAP DESIGN ===== */
.professional-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: var(--shadow-md) !important;
    backdrop-filter: blur(10px) saturate(120%) !important;
    -webkit-backdrop-filter: blur(10px) saturate(120%) !important;
    border-bottom: 1px solid var(--border-color) !important;
    transform: none !important;
    transform-origin: top left !important;
    touch-action: auto !important;
    transition: var(--transition-base) !important;
    height: 80px !important;
    min-height: 80px !important;
    max-height: 80px !important;
}

.professional-header.collapsed {
    max-height: 0 !important;
    overflow: hidden !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    box-shadow: none !important;
    border: none !important;
}

.header-top {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 24px !important;
    height: 100% !important;
    max-width: 1400px;
    margin: 0 auto;
}

.header-inner {
    width: 100%;
}

.professional-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* Stand Selectors */
.stand-selectors {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.stand-dropdown {
    position: relative;
    flex: 1;
    max-width: 300px;
    display: flex;
    align-items: center;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 4px 12px;
    transition: var(--transition-base);
}

.stand-dropdown:focus-within {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(237, 28, 36, 0.1);
    background: white;
}

.stand-dropdown i {
    color: var(--text-muted);
    font-size: 14px;
    margin-right: 10px;
}

.searchable-select {
    flex: 1;
    position: relative;
}

.search-input {
    width: 100%;
    border: none;
    background: transparent;
    padding: 8px 0;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-main);
    outline: none;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-results {
    position: absolute;
    top: 100%;
    left: -12px;
    /* Compensate for parent padding */
    right: -12px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    margin-top: 8px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1001;
    display: none;
    padding: 8px 0;
}

.search-results:not(:empty) {
    display: block;
}

.search-result-item {
    padding: 10px 16px;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-result-item:hover {
    background-color: var(--bg-body);
}

.search-result-item .stand-badge {
    background: var(--primary-red);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.search-result-item .stand-info {
    display: flex;
    flex-direction: column;
}

.search-result-item .stand-name {
    font-weight: 500;
    font-size: 14px;
    color: var(--text-main);
}

.search-result-item .stand-desc {
    font-size: 12px;
    color: var(--text-muted);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    border: none;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition-base);
}

.route-btn {
    background: var(--primary-red);
    color: white;
    box-shadow: var(--shadow-sm);
}

.route-btn:hover:not(:disabled) {
    background: var(--primary-red-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.route-btn:disabled {
    background: var(--text-muted);
    opacity: 0.5;
    cursor: not-allowed;
}

.clear-btn {
    background: white;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.clear-btn:hover:not(:disabled) {
    background: var(--bg-body);
    border-color: var(--text-muted);
}

.clear-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Zoom Controls */
.zoom-controls {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 900;
}

.zoom-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition-base);
    box-shadow: var(--shadow-md);
}

.zoom-btn:hover {
    background: var(--bg-body);
    transform: translateY(-2px);
    color: var(--primary-red);
    box-shadow: var(--shadow-lg);
}

.zoom-btn.zoom-fit {
    margin-top: 8px;
    color: var(--primary-red);
}

/* Info Panel */
#infoPanel {
    position: fixed;
    top: 100px;
    left: 20px;
    width: 320px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 24px;
    z-index: 950;
    border: 1px solid var(--border-color);
    display: none;
    /* JS toggles this */
}

#infoPanel.active {
    display: block;
    animation: slideInLeft 0.3s ease-out;
}

#pTitle {
    font-family: var(--font-heading);
    font-size: 18px;
    color: var(--text-main);
}

#pStatus.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 12px;
}

#pCompany {
    font-size: 16px;
    font-weight: 500;
    color: var(--navy-dark);
    margin-bottom: 16px;
}

/* Responsive */
@media (max-width: 992px) {
    .professional-header {
        height: auto !important;
        padding: 16px 0 !important;
    }

    .professional-navigation {
        flex-direction: column;
        gap: 16px;
    }

    .stand-selectors {
        width: 100%;
        flex-direction: column;
    }

    .stand-dropdown {
        width: 100%;
        max-width: none;
    }

    .action-buttons {
        width: 100%;
    }

    .action-btn {
        flex: 1;
        justify-content: center;
    }

    #infoPanel {
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        width: 100%;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        padding: 20px;
        transform: translateY(100%);
        transition: transform 0.3s ease-out;
    }

    #infoPanel.active {
        transform: translateY(0);
    }

    .zoom-controls {
        bottom: 240px;
        /* Adjust based on panel height */
        right: 16px;
    }
}

/* Image List Panel */
.image-list-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1998;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
    backdrop-filter: blur(4px);
}

.image-list-overlay.active {
    opacity: 1;
    visibility: visible;
}

.image-list-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 1000px;
    height: 80vh;
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.image-list-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.image-list-header {
    background: var(--navy-dark);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.image-list-title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.image-list-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.image-list-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.image-list-content {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    background: var(--bg-body);
}

/* Stand Clickable Styles */
svg .stand,
svg .stand-rect,
svg g[data-stand-id] {
    cursor: pointer;
}

svg .stand:hover .stand-rect,
svg g[data-stand-id]:hover rect {
    opacity: 0.9;
}

svg .stand.available .stand-rect,
svg g[data-stand-id].available rect {
    cursor: pointer;
}

/* Fixed Map Images */
.map-image-fixed {
    pointer-events: none;
    user-select: none;
    cursor: default;
    position: relative;
    transform-origin: 0 0;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

.map-image-fixed image,
.map-image-fixed text {
    pointer-events: none;
    user-select: none;
    cursor: default;
    position: relative;
    transform-origin: 0 0;
    transform: translateZ(0);
    backface-visibility: hidden;
}