/**
 * Weather Module Styles
 */

/* Weather display in header */
.weather-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 15px;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.weather-info:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.weather-info i {
    font-size: 1.2em;
}

.weather-icon {
    color: #ffd700;
    transition: transform 0.3s ease;
}

.weather-info:hover .weather-icon {
    transform: scale(1.1);
}

.weather-info .temp {
    font-weight: bold;
    font-size: 1.1em;
    color: white;
    transition: opacity 0.3s ease;
}

.weather-info .location {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.edit-location-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.edit-location-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(15deg);
}

/* City search modal customization */
.swal2-popup {
    padding-bottom: 2.5rem;
    border-radius: 15px;
}

.city-search-container {
    position: relative;
    width: 100%;
    margin-bottom: 220px;
}

.city-search-container .input-group {
    margin-bottom: 0;
}

.city-search-container .input-group-text {
    background: #f8f9fa;
    border-right: none;
}

.city-search-container .form-control {
    border-left: none;
    padding: 12px;
    font-size: 16px;
}

.city-search-container .form-control:focus {
    box-shadow: none;
    border-color: #ced4da;
}

.city-search-container .form-control.is-valid {
    background-color: #e8f0fe;
    border-color: #0d6efd;
}

/* City results dropdown */
.city-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 220px;
    overflow-y: auto;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-top: 0;
    z-index: 1000;
}

/* Individual city result item */
.city-result {
    padding: 12px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.city-result:last-child {
    border-bottom: none;
}

.city-result i {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0d6efd;
    transition: transform 0.2s ease;
}

.city-result:hover {
    background-color: #f8f9fa;
    padding-left: 20px;
}

.city-result:hover i {
    transform: scale(1.2);
}

.city-result span {
    flex: 1;
}

/* Loading animation */
.city-result .fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Custom scrollbar */
.city-results::-webkit-scrollbar {
    width: 8px;
}

.city-results::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 0 0 4px 0;
}

.city-results::-webkit-scrollbar-thumb {
    background: #0d6efd;
    border-radius: 4px;
}

.city-results::-webkit-scrollbar-thumb:hover {
    background: #0b5ed7;
}

/* Weather icon tooltips */
.tooltip {
    font-size: 0.9em;
}

.tooltip .tooltip-inner {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    padding: 8px 12px;
    border-radius: 8px;
}

/* Weather animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .weather-info {
        padding: 6px 12px;
        margin-left: 10px;
    }

    .weather-info .temp {
        font-size: 1em;
    }

    .weather-info .location {
        font-size: 0.8em;
    }
} 