/* =====================================================
   New Request Page - Specific Styles
   ===================================================== */

/* Page Layout */
.new-request-page {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--app-header-height) - var(--mobile-nav-height));
}

@media (min-width: 992px) {
    .new-request-page {
        flex-direction: row;
        height: calc(100vh - var(--app-header-height));
    }
}

/* =====================================================
   Map Container
   ===================================================== */
.map-container {
    position: relative;
    flex: 1;
    min-height: 250px;
}

@media (min-width: 992px) {
    .map-container {
        flex: 1;
        min-height: auto;
    }
}

.map-view {
    width: 100%;
    height: 100%;
    background-color: var(--bg-surface-hover);
}

/* Map Controls */
.map-controls {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 1000;
}

.map-controls .btn {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
}

.map-controls .btn:hover {
    background-color: var(--bg-surface-hover);
}

/* Map Legend */
.map-legend {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background-color: var(--bg-surface);
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 12px;
    font-size: 0.75rem;
    z-index: 1000;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.legend-marker {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-marker.motorcycle { background-color: #17a2b8; }
.legend-marker.car { background-color: #28a745; }
.legend-marker.van { background-color: #fd7e14; }

/* Map Hint */
.map-hint {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--bg-surface);
    padding: 10px 16px;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    font-size: 0.85rem;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: pulse 2s infinite;
}

.map-hint i {
    color: var(--primary-color);
}

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

/* =====================================================
   Request Panel
   ===================================================== */
.request-panel {
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    max-height: 50vh;
    overflow-y: auto;
}

@media (min-width: 992px) {
    .request-panel {
        width: 380px;
        max-height: none;
        border-top: none;
        border-right: 1px solid var(--border-color);
        box-shadow: var(--shadow-md);
    }
}

/* =====================================================
   Panel Sections
   ===================================================== */
.panel-section {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    animation: slideUp 0.3s ease;
}

.panel-section:last-child {
    border-bottom: none;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.step-badge {
    width: 24px;
    height: 24px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

.section-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.btn-back {
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background-color: var(--bg-surface-hover);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-primary);
}

.btn-back:hover {
    background-color: var(--border-color);
}

/* =====================================================
   Vehicle Tabs
   ===================================================== */
.vehicle-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.vehicle-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background-color: var(--bg-surface);
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-primary);
}

.vehicle-tab i {
    font-size: 1.5rem;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.vehicle-tab .tab-name {
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
}

.vehicle-tab:hover {
    border-color: var(--primary-color);
    background-color: rgba(13, 110, 253, 0.05);
}

.vehicle-tab.active {
    border-color: var(--primary-color);
    background-color: rgba(13, 110, 253, 0.1);
}

.vehicle-tab.active i {
    color: var(--primary-color);
}

.vehicle-description {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
    padding: 8px;
    background-color: var(--bg-surface-hover);
    border-radius: 8px;
}

/* =====================================================
   Location Input
   ===================================================== */
.location-input {
    display: flex;
    align-items: center;
    background-color: var(--bg-surface);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 0 12px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.location-input:hover {
    border-color: var(--text-secondary);
}

.location-input.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.location-input .input-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
}

.location-input .origin-icon {
    color: var(--success-color);
}

.location-input .origin-icon i {
    font-size: 0.6rem;
}

.location-input .destination-icon {
    color: var(--danger-color);
}

.location-input .destination-icon i {
    font-size: 1.1rem;
}

.location-input .form-control {
    border: none;
    background: transparent;
    padding: 12px 8px;
    font-size: 0.9rem;
    cursor: pointer;
}

.location-input .form-control:focus {
    box-shadow: none;
}

.btn-clear {
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    background-color: var(--bg-surface-hover);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.btn-clear:hover {
    background-color: var(--danger-color);
    color: white;
}

/* =====================================================
   Bookmarks - Horizontal Scroll
   ===================================================== */
.bookmarks-wrapper {
    margin-top: 10px;
    margin-right: -16px;
    margin-left: -16px;
    padding: 0 16px;
}

.bookmarks-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar but keep functionality */
.bookmarks-scroll::-webkit-scrollbar {
    height: 4px;
}

.bookmarks-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.bookmarks-scroll::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

.bookmark-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background-color: var(--bg-surface-hover);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-primary);
    white-space: nowrap;
    scroll-snap-align: start;
}

.bookmark-btn i {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.bookmark-btn:hover {
    border-color: var(--primary-color);
    background-color: rgba(13, 110, 253, 0.05);
}

.bookmark-btn.selected {
    border-color: var(--primary-color);
    background-color: var(--primary-color);
    color: white;
}

.bookmark-btn.selected i {
    color: white;
}

/* =====================================================
   Result Box (Price / Error)
   ===================================================== */
.result-box {
    margin-bottom: 16px;
}

.price-display {
    background-color: rgba(25, 135, 84, 0.1);
    border: 1px solid rgba(25, 135, 84, 0.3);
    border-radius: 10px;
    padding: 12px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.price-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--success-color);
}

.credit-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding-top: 8px;
    border-top: 1px solid rgba(25, 135, 84, 0.2);
}

.credit-value {
    color: var(--text-primary);
}

.error-display {
    background-color: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 10px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--danger-color);
}

.error-display i {
    font-size: 1.2rem;
}

/* =====================================================
   Vehicle Markers on Map
   ===================================================== */
.vehicle-marker {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    border: 2px solid white;
}

.vehicle-marker.motorcycle { background-color: #17a2b8; }
.vehicle-marker.car { background-color: #28a745; }
.vehicle-marker.van { background-color: #fd7e14; }

/* User Location Marker */
.user-location-marker {
    width: 20px;
    height: 20px;
    background-color: #0d6efd;
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 0 0 2px #0d6efd, 0 2px 6px rgba(0,0,0,0.3);
}

/* Origin Marker */
.origin-marker {
    width: 28px;
    height: 28px;
    background-color: var(--success-color);
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.5rem;
}

/* Destination Marker */
.destination-marker {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--danger-color);
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* =====================================================
   Animations
   ===================================================== */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =====================================================
   Responsive Adjustments
   ===================================================== */
@media (max-width: 575.98px) {
    .panel-section {
        padding: 12px;
    }

    .vehicle-tab {
        padding: 10px 6px;
    }

    .vehicle-tab i {
        font-size: 1.25rem;
    }

    .vehicle-tab .tab-name {
        font-size: 0.7rem;
    }

    .bookmark-btn {
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    .bookmarks-wrapper {
        margin-right: -12px;
        margin-left: -12px;
        padding: 0 12px;
    }
}

/* =====================================================
   Dark Mode Adjustments
   ===================================================== */
[data-bs-theme="dark"] .price-display {
    background-color: rgba(25, 135, 84, 0.15);
}

[data-bs-theme="dark"] .error-display {
    background-color: rgba(220, 53, 69, 0.15);
}