/* Split Layout */
body {
    overflow-x: hidden;
    overflow-y: auto;
    background-color: #020b16;
    /* Deep Blue Background */
}

.hero-split-section {
    display: grid;
    grid-template-columns: 550px 1fr;
    /* Widened calculator column */
    height: 85vh;
    /* Keep fixed height for the hero area */
    margin-top: var(--nav-height);
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* ... existing code ... */

/* Add Via Wrapper */
.add-via-wrapper {
    margin-top: 5px;
    text-align: right;
}

/* Add Stop Link */
.add-stop-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 180, 216, 0.1);
    border: 1px solid rgba(0, 180, 216, 0.3);
    color: var(--accent);
    font-size: 0.8rem;
    cursor: pointer;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    margin-top: 5px;
}

.add-stop-link:hover {
    background: var(--accent);
    color: #020b16;
    box-shadow: 0 0 15px rgba(0, 180, 216, 0.4);
    transform: translateY(-1px);
    border-color: var(--accent);
}

.add-stop-link:active {
    transform: translateY(0);
}

.add-stop-link::before {
    content: '+';
    font-size: 1.1em;
    font-weight: bold;
}

/* Via Input Container */
.input-with-remove {
    position: relative;
    width: 100%;
}

.remove-via-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.remove-via-btn:hover {
    color: #ff6b6b;
}

.hero-calculator-column {
    background: #020b16;
    /* Frostline Dark Background */
    padding: 30px;
    overflow-y: auto;
    /* Distinct frame/border as requested - subtle light blue */
    border-right: 1px solid rgba(0, 180, 216, 0.3);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
}

.hero-map-column {
    position: relative;
    height: 100%;
    width: 100%;
    z-index: 1;
}

#map-container {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    width: auto;
    height: auto;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 180, 216, 0.3);
}

#map {
    width: 100%;
    height: 100%;
}

.leaflet-routing-container {
    display: none;
}

.custom-map-marker {
    background: transparent;
    border: none;
}

/* Static Calculator Panel (Non-Floating) */
.calculator-panel-static {
    width: 100%;
    max-width: 100%;
    color: var(--text-light);
}

.calculator-header {
    margin-bottom: 25px;
    text-align: left;
}

.calculator-header h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: white;
    margin-bottom: 5px;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.calculator-header p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 300;
}

/* Custom Scrollbar for Panel */
.hero-calculator-column::-webkit-scrollbar {
    width: 6px;
}

.hero-calculator-column::-webkit-scrollbar-track {
    background: transparent;
}

.hero-calculator-column::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
}

.calculator-wrapper {
    background: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    /* Dark transparent bg */
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: white;
    transition: all 0.3s ease;
}

.form-group input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-group select option {
    background: #0a192d;
    color: white;
}

.form-group input[type="text"]:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 180, 216, 0.2);
}

.city-suggestions {
    position: absolute;
    background: rgba(20, 30, 50, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-top: 4px;
    max-height: 200px;
    overflow-y: auto;
    width: calc(100% - 4px);
    z-index: 100;
    display: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.city-suggestions.active {
    display: block;
}

.suggestion-item {
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 14px;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.calc-result {
    margin-top: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border-left: 3px solid var(--accent);
    color: white;
}

.result-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin-bottom: 5px;
}

.result-route {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
}

.result-breakdown {
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 8px;
    border: none;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
}

.breakdown-item:last-child {
    border-bottom: none;
}

.breakdown-total {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
}

.result-note {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 10px;
}

.result-sources {
    display: none;
    /* Hide verbose sources in demo */
}

/* Hide map container that was at bottom */
#map-container-bottom {
    display: none;
}

.loading-spinner p {
    color: rgba(255, 255, 255, 0.7) !important;
}

.spinner {
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--accent);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Utility Classes for JS States */
.hidden {
    display: none !important;
}

.error-message {
    display: none;
    color: #ff6b6b;
    font-size: 12px;
    margin-top: 5px;
    font-weight: 500;
}

.error-message.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.warning-message {
    display: none;
    color: #feca57;
    font-size: 13px;
    margin-top: 10px;
    padding: 10px;
    background: rgba(254, 202, 87, 0.1);
    border: 1px solid rgba(254, 202, 87, 0.3);
    border-radius: 6px;
}

.warning-message.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

#loading {
    display: none;
    text-align: center;
    padding: 20px;
}

#loading.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}