/* ============================================
   1. HERO SECTION
   ============================================ */
   body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}
.hero{
    margin-top: 70px;
}
.sender-hero {
    margin-top: 80px;
    padding: 80px 0;
    background: linear-gradient(135deg, #011983 0%, #f1f1f0 100%);
    color: white;
}

.sender-hero .hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}


.sender-hero .hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.sender-hero .hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.sender-hero .hero-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.sender-hero .stat {
    text-align: center;
}

.sender-hero .stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.sender-hero .stat-text {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ============================================
   2. RESULTS SECTION
   ============================================ */
.results-section {
    padding: 60px 0;
    background: #f8fafc;
    min-height: 500px;
}

.results-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Loading, Error, Empty States */
.loading-container,
.error-container,
.empty-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    text-align: center;
}

.loading-spinner h3,
.error-message h3,
.empty-message h3 {
    font-size: 1.5rem;
    color: #1e293b;
    margin: 1rem 0;
}

.loading-spinner p,
.error-message p,
.empty-message p {
    color: #64748b;
    margin-bottom: 1.5rem;
}

.btn-retry,
.btn-refresh {
    background: #2563eb;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
}

.btn-retry:hover,
.btn-refresh:hover {
    background: #1d4ed8;
}

/* ============================================
   3. TRAVELERS LIST
   ============================================ */
.travelers-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.traveler-card {
    background: rgb(255, 255, 255);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.traveler-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Traveler Header */
.traveler-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.traveler-info {
    display: flex;
    gap: 1rem;
}

.traveler-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e5e7eb;
}

.traveler-details h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.traveler-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
    font-size: 0.875rem;
}

.verified-badge {
    background: #dcfce7;
    color: #166534;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Travel Route */
.travel-route {
    margin-bottom: 2rem;
}

.route-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: white;
    padding: 1rem;
    border-radius: 8px;
}

.departure,
.arrival {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.departure i,
.arrival i {
    color: #2563eb;
    font-size: 1.25rem;
}

.city {
    font-weight: 600;
    color: #1e293b;
    display: block;
}

.date {
    font-size: 0.875rem;
    color: #6b7280;
    display: block;
}

.route-line {
    display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
}
.route-arrow {
  width: 60px;
  height: 2px;
  background-color: #007bff; /* Blue line */
  position: relative;
}

.route-arrow::after {
  content: "";
  position: absolute;
  right: -6px;
  top: -4px;
  border: 6px solid transparent;
  border-left-color: #007bff; /* Arrowhead */
}

/* Capacity Info */
.traveler-capacity {
    margin-bottom: 1.5rem;
}

.capacity-info {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.capacity-info span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.capacity-info i {
    color: #2563eb;
}

.item-types {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.item-tag {
    background: #e0f2fe;
    color: #0369a1;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.special-items {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.special-tag {
    background: #fef3c7;
    color: #92400e;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Actions */
.traveler-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.btn-request {
    background: #2563eb;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-request:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

/* ============================================
   PAGINATION SECTION - REPLACES LOAD MORE
   ============================================ */

/* Remove the old load-more-section styles and add these */
.pagination-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding: 2rem 0;
    border-top: 1px solid #e5e7eb;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    flex-wrap: wrap;
    gap: 1rem;
}

.pagination-info {
    display: flex;
    align-items: center;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
}

.page-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem;
}

.page-info::before {
    content: "📊";
    font-size: 1rem;
}

.pagination-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 12px 20px;
    border: 2px solid #e5e7eb;
    background: white;
    color: #374151;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    min-width: 100px;
    justify-content: center;
}

.btn-pagination:hover:not(:disabled) {
    border-color: #2563eb;
    background: #eff6ff;
    color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.btn-pagination:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #e5e7eb;
    background: #f8fafc;
    color: #9ca3af;
    transform: none;
    box-shadow: none;
}

.btn-pagination:disabled:hover {
    border-color: #e5e7eb;
    background: #f8fafc;
    color: #9ca3af;
}

.btn-prev {
    order: 1;
}

.btn-next {
    margin: 1rem;
    order: 2;
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.btn-next:hover:not(:disabled) {
    background: white;
    border-color: #1d4ed8;
    color: #1d4ed8;
}

.btn-next:disabled {
    background: #f8fafc;
    color: #9ca3af;
    border-color: #e5e7eb;
}

/* Page transition animation */
.travelers-list {
    animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading state for pagination */
.pagination-section.loading {
    opacity: 0.6;
    pointer-events: none;
}

.pagination-section.loading .btn-pagination {
    cursor: not-allowed;
}

/* ============================================
   RESPONSIVE PAGINATION STYLES
   ============================================ */

@media (max-width: 768px) {
    .pagination-section {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
        padding: 1.5rem;
        margin-top: 2rem;
    }

    .pagination-info {
        order: 2;
        justify-content: center;
    }

    .pagination-controls {
        order: 1;
        width: 100%;
        justify-content: space-between;
    }

    .btn-pagination {
        flex: 1;
        max-width: 140px;
        padding: 14px 20px;
        font-size: 0.9rem;
    }

    .page-info {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .pagination-section {
        margin-top: 1.5rem;
        padding: 1rem;
        border-radius: 8px;
    }

    .pagination-controls {
        gap: 0.75rem;
    }

    .btn-pagination {
        padding: 12px 16px;
        font-size: 0.875rem;
        min-width: 90px;
    }

    .btn-pagination span {
        display: none;
    }

    .btn-pagination i {
        font-size: 1rem;
    }

    /* Show only icons on very small screens */
    .btn-prev::after {
        content: "Prev";
        margin-left: 0.25rem;
        font-size: 0.75rem;
    }

    .btn-next::before {
        content: "Next";
        margin-right: 0.25rem;
        font-size: 0.75rem;
    }
}

/* ============================================
   SMOOTH SCROLL TO TOP AFTER PAGE CHANGE
   ============================================ */

.smooth-scroll {
    scroll-behavior: smooth;
}

/* ============================================
   ENHANCED PAGINATION ACCESSIBILITY
   ============================================ */

.btn-pagination:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.btn-pagination:focus:not(:disabled) {
    border-color: #2563eb;
    background: #eff6ff;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .btn-pagination {
        border-width: 3px;
    }
    
    .btn-pagination:disabled {
        opacity: 0.7;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .travelers-list,
    .btn-pagination {
        animation: none;
        transition: none;
    }
}

/* ============================================
   PAGINATION LOADING STATES
   ============================================ */

.pagination-loading {
    position: relative;
}

.pagination-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #f3f4f6;
    border-top: 2px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.pagination-section.success {
    border-top-color: #10b981;
}

.pagination-section.error {
    border-top-color: #ef4444;
}

.pagination-section.error .page-info {
    color: #ef4444;
}

.pagination-section.error .page-info::before {
    content: "⚠️";
}

/* ============================================
   JOURNEY CARD LOADING ANIMATION
   ============================================ */

.traveler-card.loading {
    opacity: 0;
    transform: translateY(20px);
    animation: cardFadeIn 0.4s ease-out forwards;
}

.traveler-card:nth-child(1) { animation-delay: 0.1s; }
.traveler-card:nth-child(2) { animation-delay: 0.2s; }
.traveler-card:nth-child(3) { animation-delay: 0.3s; }
.traveler-card:nth-child(4) { animation-delay: 0.4s; }
.traveler-card:nth-child(5) { animation-delay: 0.5s; }
.traveler-card:nth-child(6) { animation-delay: 0.6s; }
.traveler-card:nth-child(7) { animation-delay: 0.7s; }

@keyframes cardFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   LANGUAGE SUPPORT FOR PAGINATION
   ============================================ */

.pagination-section[data-lang="ti"] .page-info::before {
    content: "📊";
}

.pagination-section[data-lang="ti"] .btn-prev span {
    font-family: 'Noto Sans Ethiopic', sans-serif;
}

.pagination-section[data-lang="ti"] .btn-next span {
    font-family: 'Noto Sans Ethiopic', sans-serif;
}

/* ============================================
   EMPTY STATE WITH PAGINATION
   ============================================ */

.empty-container.with-pagination {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}



/* ============================================
   4. REQUEST MODAL 
   ============================================ */
#requestModal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-color: rgba(0, 0, 0, 0.7) !important;
    display: none !important;
    z-index: 999999 !important;
    overflow-y: auto !important;
}

#requestModal.active {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    margin: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background: white;
    border-radius: 16px 16px 0 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.modal-close {
    background: #f3f4f6;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 1.25rem;
    color: #6b7280;
}

.modal-close:hover {
    background: #e5e7eb;
    color: #374151;
}

/* Request Form */
.request-form {
    padding: 2rem;
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.form-section h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background: white;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group label {
    position: absolute;
    top: 12px;
    left: 16px;
    color: #6b7280;
    font-size: 1rem;
    pointer-events: none;
    transition: all 0.3s ease;
    background: white;
    padding: 0 4px;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group select:focus + label,
.form-group select:not([value=""]) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label {
    top: -10px;
    left: 12px;
    font-size: 0.75rem;
    color: #2563eb;
    font-weight: 600;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.btn-secondary {
    padding: 12px 24px;
    background: #f8fafc;
    color: #374151;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.btn-primary {
    padding: 12px 24px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #1d4ed8;
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden !important;
}

/* ============================================
   5. HOW IT WORKS SECTION
   ============================================ */
.how-it-works-senders {
    padding: 80px 0;
    background: white;
}

.how-it-works-senders .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.how-it-works-senders .section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 3rem;
}

.how-it-works-senders .steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.how-it-works-senders .step {
    text-align: center;
    padding: 2rem;
    background: #f8fafc;
    border-radius: 12px;
    position: relative;
}

.step-number {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: #2563eb;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.step-icon {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem auto 1.5rem;
    color: white;
    font-size: 2rem;
}

.how-it-works-senders .step h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
}

.how-it-works-senders .step p {
    color: #6b7280;
    line-height: 1.6;
}

/* ============================================
   6. WHY CHOOSE SECTION
   ============================================ */
.why-choose-senders {
    padding: 80px 0;
    background: #f8fafc;
}

.why-choose-senders .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.why-choose-senders .section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 3rem;
}

.why-choose-senders .benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.why-choose-senders .benefit-card {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.why-choose-senders .benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.why-choose-senders .benefit-card i {
    font-size: 2.5rem;
    color: #2563eb;
    margin-bottom: 1rem;
}

.why-choose-senders .benefit-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
}

.why-choose-senders .benefit-card p {
    color: #6b7280;
    line-height: 1.6;
}

/* ============================================
   7. MOBILE RESPONSIVENESS
   ============================================ */
@media (max-width: 768px) {
    .sender-hero .hero-title {
        font-size: 2rem;
    }
    
    .traveler-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .route-info {
        flex-direction: column;
        gap: 1rem;
    }
    
    .route-line {
        display: none;
    }
    
    .capacity-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .traveler-actions {
        justify-content: stretch;
    }
    
    .btn-request {
        width: 100%;
        justify-content: center;
    }
    
    .modal-content {
        max-height: 95vh;
        margin: 10px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .sender-hero {
        padding: 60px 0;
    }
    
    .sender-hero .hero-title {
        font-size: 1.75rem;
    }
    
    .sender-hero .hero-stats {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .traveler-card {
        padding: 1rem;
    }
    
    .traveler-avatar {
        width: 50px;
        height: 50px;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-header h3 {
        font-size: 1.25rem;
    }
    
    .request-form {
        padding: 1rem;
    }
}


.pagination-section.loading {
    opacity: 0.6;
    pointer-events: none;
}

.pagination-section.loading .btn-pagination {
    cursor: not-allowed;
}

.pagination-section.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #f3f4f6;
    border-top: 2px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Journey card loading animation */
.traveler-card.loading {
    opacity: 0;
    transform: translateY(20px);
    animation: cardFadeIn 0.4s ease-out forwards;
}

@keyframes cardFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Server pagination indicator */
.page-info::after {
    content: " (live)";
    font-size: 0.7rem;
    color: #10b981;
    font-weight: 500;
}


/* ============================================
   SEARCH FILTER STYLES
   ============================================ */

.search-filter-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
    overflow: visible;
    z-index: 10;
    border: 1px solid #e5e7eb;
}

.search-filter-wrapper {
    padding: 2rem;
    position: relative;
    z-index: 11;
}

.search-header {
    text-align: center;
    margin-bottom: 2rem;
}

.search-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.search-title i {
    color: #2563eb;
}

.search-subtitle {
    color: #6b7280;
    font-size: 0.95rem;
    margin: 0;
}

.search-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
}

.search-input-wrapper {
    flex: 1;
    position: relative; /* CRITICAL: Parent for absolute positioning */
    z-index: 100;
}

.search-input-group {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative; /* Keep this */
}

.search-input-group:focus-within {
    border-color: #2563eb;
    background: white;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-icon {
    position: absolute;
    left: 1rem;
    color: #6b7280;
    font-size: 1.1rem;
}

.city-search-input {
    width: 100%;
    padding: 0.875rem 3rem;
    border: none;
    background: transparent;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    color: #1e293b;
}

.city-search-input::placeholder {
    color: #9ca3af;
}

.clear-search-btn {
    position: absolute;
    right: 1rem;
    background: #e5e7eb;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.3s ease;
}

.clear-search-btn:hover {
    background: #cbd5e1;
    color: #374151;
}

.search-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-search,
.btn-reset {
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    border: none;
    font-size: 0.95rem;
    white-space: nowrap;
}

.btn-search {
    background: #2563eb;
    color: white;
}

.btn-search:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-reset {
    background: white;
    color: #6b7280;
    border: 2px solid #e5e7eb;
}

.btn-reset:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #374151;
}

.search-results-info {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f0f9ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    text-align: center;
}

.results-text {
    color: #0369a1;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.results-text strong {
    color: #0c4a6e;
    font-weight: 600;
}


/* ============================================
   OPTIMIZED SEARCH FILTER WITH FIXED POSITIONING
   ============================================ */

.search-filter-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
    overflow: visible; /* Changed to visible */
    position: relative;
    z-index: 10;
    border: 1px solid #e5e7eb;
}

.search-filter-wrapper {
    padding: 2rem;
    position: relative;
    z-index: 11;
}

.search-header {
    text-align: center;
    margin-bottom: 2rem;
}

.search-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.search-title i {
    color: #2563eb;
}

.search-subtitle {
    color: #6b7280;
    font-size: 0.95rem;
    margin: 0;
}

.search-controls {
    display: flex;
    gap: 1rem;
    align-items: flex-start; /* Changed from center */
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.search-input-group {
    flex: 1;
    position: relative; /* CRITICAL: Makes this the positioning parent */
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.3s ease;
    z-index: 100; /* Higher than wrapper */
}

.search-input-group:focus-within {
    border-color: #2563eb;
    background: white;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-icon {
    position: absolute;
    left: 1rem;
    color: #6b7280;
    font-size: 1.1rem;
    pointer-events: none;
}

.city-search-input {
    width: 100%;
    padding: 0.875rem 3rem;
    border: none;
    background: transparent;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    color: #1e293b;
}

.city-search-input::placeholder {
    color: #9ca3af;
}

.clear-search-btn {
    position: absolute;
    right: 1rem;
    background: #e5e7eb;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.3s ease;
    z-index: 10;
}

.clear-search-btn:hover {
    background: #cbd5e1;
    color: #374151;
}

.search-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
    align-self: flex-start;
}

.btn-search,
.btn-reset {
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    border: none;
    font-size: 0.95rem;
    white-space: nowrap;
}

.btn-search {
    background: #2563eb;
    color: white;
}

.btn-search:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-reset {
    background: white;
    color: #6b7280;
    border: 2px solid #e5e7eb;
}

.btn-reset:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #374151;
}

/* ============================================
   CITY SUGGESTIONS DROPDOWN - FIXED POSITIONING
   ============================================ */

.city-suggestions {
    position: absolute;
    top: 100%; /* Full height of input group */
    left: 0;
    right: 0;
    margin-top: 4px; /* Small gap */
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    max-height: 240px;
    overflow-y: auto;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.city-suggestion-item {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
}

.city-suggestion-item:last-child {
    border-bottom: none;
}

.city-suggestion-item:hover {
    background: #f0f9ff;
    color: #2563eb;
}

.city-suggestion-item i {
    color: #2563eb;
    font-size: 0.875rem;
    flex-shrink: 0;
}

/* Loading suggestions */
.loading-suggestions {
    padding: 1rem;
    text-align: center;
    color: #6b7280;
}

.loading-suggestions i {
    animation: spin 1s linear infinite;
}

/* Custom scrollbar */
.city-suggestions::-webkit-scrollbar {
    width: 6px;
}

.city-suggestions::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.city-suggestions::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.city-suggestions::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ============================================
   SEARCH RESULTS INFO
   ============================================ */

.search-results-info {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f0f9ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    text-align: center;
    position: relative;
    z-index: 1; /* Below suggestions */
}

.results-text {
    color: #0369a1;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.results-text strong {
    color: #0c4a6e;
    font-weight: 600;
}

/* ============================================
   SEARCH STATES
   ============================================ */

/* Loading state */
.search-filter-container.searching {
    opacity: 0.7;
    pointer-events: none;
}

.search-filter-container.searching .search-icon {
    animation: spin 1s linear infinite;
}

/* Active state */
.search-filter-container.active {
    background: linear-gradient(to bottom, #f0f9ff, white);
    border-color: #2563eb;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .search-filter-wrapper {
        padding: 1.5rem 1rem;
    }
    
    .search-input-wrapper {
        width: 100%;
    }
    .search-title {
        font-size: 1.5rem;
    }
    
    .search-controls {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .search-input-group {
        width: 100%;
    }
    
    /* Full width suggestions on mobile */
    .city-suggestions {
        left: 0;
        right: 0;
        width: 100%;
        max-height: 200px;
    }
    
    .search-actions {
        width: 100%;
        gap: 0.5rem;
        align-self: stretch;
    }
    
    .btn-search,
    .btn-reset {
        flex: 1;
        justify-content: center;
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .search-title {
        font-size: 1.25rem;
    }
    
    .search-subtitle {
        font-size: 0.875rem;
    }
    
    .city-search-input {
        font-size: 0.9rem;
        padding: 0.75rem 2.5rem;
    }
    
    .city-suggestions {
        max-height: 180px;
        font-size: 0.875rem;
    }
    
    .city-suggestion-item {
        padding: 0.625rem 0.875rem;
    }
    
    .search-actions {
        flex-direction: column;
    }
    
    .btn-search,
    .btn-reset {
        width: 100%;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.city-suggestion-item:focus {
    outline: 2px solid #2563eb;
    outline-offset: -2px;
    background: #f0f9ff;
}

@media (prefers-contrast: high) {
    .city-suggestions {
        border-width: 2px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .city-suggestions {
        animation: none;
    }
}

/* Loading state for search */
.search-filter-container.searching {
    opacity: 0.7;
    pointer-events: none;
}

.search-filter-container.searching .search-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Highlighted search result */
.traveler-card.search-result {
    border: 2px solid #2563eb;
    background: linear-gradient(to right, #eff6ff, white);
}

/* Search filter active state */
.search-filter-container.active {
    background: linear-gradient(to bottom, #f0f9ff, white);
    border-color: #2563eb;
}

/* Accepted Item Types */
.accepted-types {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
}

.types-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.75rem;
}

.types-header i {
    color: #10b981;
    font-size: 0.875rem;
}

.item-types {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.item-tag {
    background: #e0f2fe;
    color: #0369a1;
    padding: 4px 8px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    border: 1px solid #0891b2;
}

.item-tag i {
    font-size: 0.7rem;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .item-types {
        gap: 0.25rem;
    }
    
    .item-tag {
        font-size: 0.7rem;
        padding: 2px 6px;
    }
}

.own-journey-badge {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}