/**
 * Professional Route Finding Header CSS
 * Kompakt ve modern yol tarifi başlık tasarımı
 */

/* Ana header container */
.route-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--navy-dark);
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Header içerik */
.route-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    max-width: 1400px;
    margin: 0 auto;
    gap: 12px;
    height: 60px;
}

/* Sol taraf - Arama butonu */
.route-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.route-search-btn {
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-family: var(--font-body);
}

.route-search-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

/* Orta kısım - Stant seçimi */
.route-selection-container {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    justify-content: center;
    min-width: 0;
}

.route-stand-selector {
    position: relative;
    min-width: 200px;
    max-width: 200px;
}

.route-stand-button {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    height: 36px;
    font-family: var(--font-body);
}

.route-stand-button:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}

.route-stand-button.selected {
    background: rgba(95, 198, 148, 0.2);
    /* Green tint */
    border-color: #5fc694;
}

.route-stand-button .stand-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.route-stand-button .stand-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    background: rgba(255, 255, 255, 0.2);
}

.route-stand-button .stand-text {
    flex: 1;
    text-align: left;
}

.route-stand-button .stand-number {
    font-weight: 600;
    margin-right: 4px;
}

.route-stand-button .stand-company {
    font-size: 12px;
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

/* Dropdown arama */
.route-dropdown-search {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-body);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.route-dropdown-search input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 12px;
    outline: none;
    font-family: var(--font-body);
}

.route-dropdown-search input:focus {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 2px rgba(237, 28, 36, 0.1);
}

.route-stand-dropdown.show {
    display: block;
    animation: slideDown 0.2s ease-out;
}

.route-stand-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 12px;
}

.route-stand-item:hover {
    background-color: var(--bg-body);
}

.route-stand-item:last-child {
    border-bottom: none;
}

.route-stand-item .stand-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    background: var(--primary-red);
    color: white;
    flex-shrink: 0;
}

.route-stand-item .stand-info {
    flex: 1;
    min-width: 0;
}

.route-stand-item .stand-number {
    font-weight: 600;
    color: var(--navy-dark);
    font-size: 14px;
    margin: 0 0 2px 0;
}

.route-stand-item .stand-company {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.route-stand-item .stand-status {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    background: #e8f5e8;
    color: #27ae60;
    white-space: nowrap;
}

.route-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1001;
    margin-top: 4px;
    display: none;
    border: 1px solid var(--border-color);
}

.route-search-result {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.route-search-result:last-child {
    border-bottom: none;
}

.route-search-result-icon {
    width: 24px;
    height: 24px;
    background: var(--primary-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    flex-shrink: 0;
}

.route-search-result-text {
    flex: 1;
    min-width: 0;
}

.route-search-result-title {
    font-weight: 600;
    color: var(--navy-dark);
    font-size: 14px;
    margin: 0 0 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.route-search-result-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Sağ taraf - Aksiyon butonları */
.route-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.route-action-btn {
    padding: 10px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-family: var(--font-heading);
}

.route-action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

.route-action-btn:active {
    transform: translateY(0);
}

.route-action-btn.primary {
    background: var(--primary-red);
    border-color: var(--primary-red);
}

.route-action-btn.primary:hover {
    background: var(--primary-red-dark);
    border-color: var(--primary-red-dark);
    box-shadow: var(--shadow-md);
}

.route-action-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.route-action-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.route-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Rota bilgi paneli */
.route-info-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 16px;
    display: none;
    z-index: 999;
    border: 1px solid var(--border-color);
    border-top: none;
}

.route-info-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.route-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-body);
    border-radius: var(--radius-sm);
    flex: 1;
}

.route-info-icon {
    width: 20px;
    height: 20px;
    background: var(--primary-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    flex-shrink: 0;
}

.route-info-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--navy-dark);
}

.route-info-value {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: 4px;
}

/* Mobil optimizasyon */
@media (max-width: 768px) {
    .route-header-content {
        flex-direction: column;
        gap: 12px;
        padding: 12px;
        height: auto;
    }

    .route-header-left {
        width: 100%;
        justify-content: center;
    }

    .route-selection-container {
        width: 100%;
        flex-direction: column;
        gap: 8px;
    }

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

    .route-header-actions {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .route-action-btn {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }

    .route-info-content {
        flex-direction: column;
        gap: 8px;
    }

    .route-info-item {
        width: 100%;
    }
}

/* Animasyonlar */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

/* Toast mesajları */
.toast {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    color: white;
    font-weight: 600;
    animation: slideIn 0.3s ease;
    box-shadow: var(--shadow-lg);
    max-width: 300px;
    word-wrap: break-word;
    font-family: var(--font-body);
}

.toast-success {
    background: #2ecc71;
}

.toast-error {
    background: #e74c3c;
}

.toast-info {
    background: #3498db;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

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

/* Rota çizgisi */
.route-line {
    z-index: 1000 !important;
    pointer-events: none;
}

.route-header {
    animation: slideDown 0.3s ease-out;
}

.route-search-results.show {
    display: block;
    animation: slideDown 0.2s ease-out;
}

.route-info-panel.show {
    display: block;
    animation: slideDown 0.2s ease-out;
}