/* ========================================
   DRIVER SEARCH CARDS STYLES
   Extracted from filters.js for maintainability
   ======================================== */

/* ========================================
   EXPANDABLE DRIVER SEARCH CARDS
   ======================================== */
.driver-search-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.driver-search-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.15);
}

.driver-search-card.expanded {
    border-color: var(--color-primary);
    box-shadow: 0 4px 16px rgba(52, 152, 219, 0.2);
}

/* Header - always visible */
.driver-search-card-header {
    padding: 14px 18px;
    cursor: pointer;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border-bottom: 1px solid transparent;
}

.driver-search-card.expanded .driver-search-card-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

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

.expand-icon {
    font-size: 0.8rem;
    color: #7f8c8d;
    transition: transform 0.3s ease;
}

.driver-search-card.expanded .expand-icon {
    transform: rotate(90deg);
    color: white;
}

.driver-avatar-mini {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
}

.driver-search-card.expanded .driver-avatar-mini {
    background: rgba(255,255,255,0.2);
}

.driver-name-header {
    font-weight: 600;
    font-size: 1rem;
    color: var(--color-secondary);
    flex: 1;
    min-width: 120px;
}

.driver-search-card.expanded .driver-name-header {
    color: white;
}

.verified-badge-mini {
    color: var(--color-success);
    font-size: 0.9rem;
}

.driver-search-card.expanded .verified-badge-mini {
    color: #2ecc71;
}

.header-rating {
    font-size: 0.85rem;
    color: #f39c12;
}

.driver-search-card.expanded .header-rating {
    color: #ffd700;
}

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

.driver-search-card.expanded .header-price {
    color: #fff;
    background: rgba(39, 174, 96, 0.3);
    padding: 2px 8px;
    border-radius: 4px;
}

/* Price comparison display (original vs offered) */
.header-price.price-comparison {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    background: none;
    padding: 0;
}

.header-price.price-comparison .price-original {
    font-size: 0.8em;
    font-weight: 400;
}

.header-price.price-comparison .price-offered {
    font-size: 1em;
}

/* Responsive: inline on larger screens */
@media (min-width: 480px) {
    .header-price.price-comparison {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }
}

.header-status {
    font-size: 0.9rem;
}

.header-status.available { color: var(--color-success); }
.header-status.unavailable { color: #f39c12; }

.driver-search-card.expanded .header-status {
    background: rgba(255,255,255,0.2);
    padding: 2px 6px;
    border-radius: 4px;
}

.header-info-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.header-city, .header-vehicle, .header-radius, .header-km-price {
    font-size: 0.8rem;
    color: #555;
}

.driver-search-card.expanded .header-city,
.driver-search-card.expanded .header-vehicle,
.driver-search-card.expanded .header-radius,
.driver-search-card.expanded .header-km-price {
    color: rgba(255,255,255,0.9);
}

.header-vehicle {
    background: #e8f4f8;
    padding: 2px 8px;
    border-radius: 10px;
    color: var(--color-primary-dark);
}

.driver-search-card.expanded .header-vehicle {
    background: rgba(255,255,255,0.2);
    color: white;
}

/* Expanded content */
.driver-search-card-content {
    display: none;
    padding: 18px;
    background: #fff;
}

.driver-search-card.expanded .driver-search-card-content {
    display: block;
}

/* Driver info row */
.driver-expanded-info {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.driver-info-row {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.driver-avatar-large {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.3rem;
}

.driver-details {
    flex: 1;
}

.driver-full-name {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    color: var(--color-secondary);
}

.verified-badge {
    background: var(--color-success);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    margin-left: 8px;
}

.driver-rating-full {
    color: #f39c12;
    font-size: 0.9rem;
}

.jobs-count {
    color: #666;
    font-size: 0.85rem;
}

.btn-view-profile {
    padding: 8px 16px;
    background: #ecf0f1;
    color: var(--color-secondary);
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-view-profile:hover {
    background: #d5dbdb;
}

/* Stats row */
.driver-stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    background: #f8f9fa;
    padding: 12px 16px;
    border-radius: 8px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-label {
    font-size: 0.75rem;
    color: #95a5a6;
    font-weight: 600;
}

.stat-value {
    color: var(--color-secondary);
    font-weight: 500;
}

/* Availability section */
.availability-section {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    margin-bottom: 15px;
}

.availability-status {
    font-weight: 600;
}

.availability-status.available { color: var(--color-success); }
.availability-status.unavailable { color: #f39c12; }

.availability-dates {
    color: #555;
    font-size: 0.9rem;
}

.response-time {
    color: #7f8c8d;
    font-size: 0.85rem;
}

/* Tags */
.driver-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.tag {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.tag-vehicle {
    background: #e8f4f8;
    color: var(--color-primary-dark);
}

.tag-goods {
    background: #fef5e7;
    color: #d68910;
}

.tag-cert {
    background: #d4edda;
    color: #155724;
}

/* Bio */
.driver-bio {
    background: #f8f9fa;
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 3px solid var(--color-primary);
    margin-bottom: 15px;
}

.driver-bio p {
    margin: 0;
    color: #555;
    font-style: italic;
    line-height: 1.5;
}

/* Actions */
.card-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.btn-send-offer {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-send-offer:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* ============================================
   JOB MAP STYLES
   ============================================ */

.job-map-wrapper {
    margin: 12px 0;
}

.job-map-container {
    border: 1px solid var(--color-border, #e0e0e0);
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
}

.job-map-container .map-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--color-text-muted, #666);
    font-size: 0.9rem;
}

/* Custom map markers */
.job-map-marker {
    background: transparent;
    border: none;
}

.marker-pin {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 42px;
    position: relative;
}

.marker-pin span {
    font-size: 28px;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.3));
}

.marker-pin.pickup span {
    color: var(--color-error);
}

.marker-pin.delivery span {
    color: var(--color-success);
}

/* Map popup styling */
.map-popup {
    font-size: 13px;
    line-height: 1.4;
}

.map-popup strong {
    display: block;
    margin-bottom: 4px;
    color: var(--color-text-primary, #2c3e50);
}

/* Leaflet overrides for better styling */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

.leaflet-popup-content {
    margin: 10px 12px;
}

.leaflet-container a.leaflet-popup-close-button {
    color: #666;
}

/* Map toggle button */
.map-toggle-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--color-surface-secondary, #f8f9fa);
    border: 1px solid var(--color-border, #e0e0e0);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--color-text-secondary, #666);
    cursor: pointer;
    transition: all 0.2s;
    margin: 8px 0;
    width: 100%;
    justify-content: center;
}

.map-toggle-btn:hover {
    background: var(--color-bg-hover, #e9ecef);
    border-color: var(--color-primary, #3498db);
    color: var(--color-primary, #3498db);
}

.map-toggle-btn.active {
    background: var(--color-primary, #3498db);
    color: white;
    border-color: var(--color-primary, #3498db);
}
