/* City Modal Popup Styles */
.city-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 99999; /* Higher z-index to ensure it's on top */
    display: none; /* Initially hidden, will be shown via JavaScript */
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    transition: opacity 0.3s ease;
}

.city-modal {
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    position: relative;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.city-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.city-modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
}

.city-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #777;
    cursor: pointer;
    transition: all 0.3s ease;
}

.city-modal-close:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
}

.location-selection-container {
    margin-bottom: 25px;
}

.step-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    position: relative;
}

.selection-step {
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.dropdown-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: #555;
    margin-bottom: 8px;
}

.dropdown-container {
    margin-bottom: 15px;
}

.location-dropdown {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    color: #333;
    background-color: #fff;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%238c091f' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
}

.location-dropdown:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(140, 9, 31, 0.1);
    outline: none;
}

.confirm-location-btn {
    width: 100%;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    background-color: var(--primary-color);
    color: white;
    margin-top: 10px;
}

.confirm-location-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.confirm-location-btn:not(:disabled):hover {
    background-color: #6b071a;
    transform: translateY(-2px);
}

.location-divider {
    text-align: center;
    margin: 25px 0;
    position: relative;
}

.location-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: #ddd;
    z-index: 1;
}

.location-divider span {
    position: relative;
    background-color: #fff;
    padding: 0 15px;
    color: #777;
    font-size: 0.9rem;
    z-index: 2;
}

.detect-location {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    padding: 10px 20px;
    background: none;
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    color: var(--primary-color);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.detect-location:hover {
    background-color: rgba(140, 9, 31, 0.05);
    transform: translateY(-2px);
}

.detect-location i {
    margin-right: 8px;
    font-size: 1rem;
}

.popular-cities-section {
    margin-top: 30px;
}

.popular-cities-title {
    font-size: 1.2rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.popular-cities-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.city-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    padding: 15px 10px;
    border-radius: 10px;
}

.city-item:hover {
    background-color: rgba(140, 9, 31, 0.05);
    transform: translateY(-5px);
}

.city-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 10px;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.city-item:hover .city-icon {
    opacity: 1;
}

.city-name {
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
}

.view-all-cities {
    display: block;
    text-align: center;
    margin: 20px auto 10px;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 30px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.view-all-cities:hover {
    background-color: #6b071a;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(140, 9, 31, 0.2);
}

/* Responsive styles */
@media (max-width: 767px) {
    .city-modal {
        padding: 20px;
        width: 95%;
    }

    .popular-cities-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .city-icon {
        width: 50px;
        height: 50px;
    }
}

/* All Cities Page Styles */
.all-cities-container {
    padding: 50px 0;
}

.all-cities-header {
    text-align: center;
    margin-bottom: 40px;
}

.all-cities-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.all-cities-subtitle {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.cities-search-container {
    max-width: 600px;
    margin: 0 auto 40px;
    position: relative;
}

.cities-filter-container {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 10px;
}

.city-filter-btn {
    padding: 8px 20px;
    background: #f5f5f5;
    border: none;
    border-radius: 20px;
    color: #555;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.city-filter-btn.active,
.city-filter-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.all-cities-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

@media (max-width: 1199px) {
    .all-cities-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 991px) {
    .all-cities-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .all-cities-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .all-cities-grid {
        grid-template-columns: 1fr;
    }
}
