/* Jasa Titip Page Styles */

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: calc(100vh - 80px);
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.page-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Filter Section */
.filter-section {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    align-items: center;
}

.add-offer-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    white-space: nowrap;
}

.add-offer-btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

.add-offer-btn:active {
    transform: translateY(0);
}

.search-container {
    position: relative;
    flex: 2;
    min-width: 250px;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

.search-input {
    width: 100%;
    padding: 12px 20px 12px 50px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.route-filter {
    flex: 1;
    min-width: 200px;
}

.route-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.route-select:focus {
    outline: none;
    border-color: var(--accent-color);
}

/* Listings Grid */
.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 60px;
}

.listing-card {
    background: var(--bg-primary);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

.listing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.route-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.route-info {
    flex: 1;
}

.route-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.route-arrow {
    margin: 0 15px;
    color: var(--accent-color);
    font-size: 1.5rem;
}

.price-tag {
    background: var(--accent-color);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 1.1rem;
}

.listing-details {
    margin-bottom: 20px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.detail-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.detail-value {
    color: var(--text-primary);
    font-weight: 600;
    text-align: right;
    max-width: 60%;
}

.departure-time {
    color: var(--accent-color);
    font-weight: 600;
}

.capacity-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-top: 1px solid #e0e0e0;
    margin-top: 15px;
}

.capacity-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.capacity-value {
    color: var(--text-primary);
    font-weight: 600;
}

.dropoff-info {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.dropoff-deadline {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.dropoff-locations {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.contact-button {
    width: 100%;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-shrink: 0;
}

.contact-button:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

.contact-button:active {
    transform: translateY(0);
}

/* Loading and No Results States */
.loading-state, .no-results {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: var(--text-secondary);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.no-results-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.modal-subtitle {
    color: var(--text-secondary);
    margin-bottom: 25px;
    font-size: 1rem;
}

.contact-info {
    margin-bottom: 25px;
}

.contact-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 12px 15px;
    background: #f8f9fa00;
    border-radius: 8px;
}

.contact-field.notes-field {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    background: transparent;
}

.contact-field.notes-field label {
    margin-bottom: 0;
}

.contact-field.notes-field span {
    font-size: 0.9rem;
    font-weight: 400;
}

.contact-field label {
    font-weight: 600;
    color: var(--text-secondary);
}

.contact-field span {
    color: var(--text-primary);
    font-weight: 600;
}

.modal-disclaimer {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 25px;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #856404;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-container {
        padding: 15px;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .filter-section {
        flex-direction: column;
        gap: 15px;
    }
    
    .listings-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .route-header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .route-text {
        font-size: 1.1rem;
    }
    
    .price-tag {
        align-self: center;
    }
    
    .detail-row {
        flex-direction: column;
        gap: 2px;
    }
    
    .detail-value {
        text-align: left;
        max-width: 100%;
    }
    
    .contact-field {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .listing-card {
        padding: 20px;
    }
    
    .modal-content {
        padding: 25px;
        margin: 20px;
    }
}