/* API Integration Styles */

/* Search Results Container */
.search-results-container {
    margin: 2rem 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* City Result Card */
.city-result-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--gray-200);
    margin-bottom: 2rem;
}

.city-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.city-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0;
}

.overall-score {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 1.1rem;
}

.city-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.city-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-600);
}

.city-stat i {
    color: var(--primary-color);
    width: 16px;
}

/* Quality Scores */
.quality-scores h4 {
    color: var(--gray-800);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.scores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.score-card {
    background: var(--gray-50);
    padding: 1rem;
    border-radius: var(--radius-lg);
    text-align: center;
    border: 1px solid var(--gray-200);
}

.score-name {
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.score-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* City Actions */
.city-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}

/* Error Cards */
.city-error-card, .weather-error-card, .deals-error {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 2rem;
    text-align: center;
    border: 1px solid var(--gray-200);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.error-icon {
    font-size: 3rem;
    color: var(--error-color);
    margin-bottom: 1rem;
}

.error-suggestion {
    color: var(--gray-600);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Loading States */
.loading-card, .deals-loading {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 2rem;
    text-align: center;
    border: 1px solid var(--gray-200);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-200);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Weather Display */
.weather-container {
    margin: 2rem 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.weather-card {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    color: white;
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(116, 185, 255, 0.3);
}

.weather-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.weather-location h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.weather-time {
    font-size: 0.9rem;
    opacity: 0.9;
}

.weather-icon img {
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.weather-main {
    text-align: center;
    margin-bottom: 2rem;
}

.temperature {
    margin-bottom: 0.5rem;
}

.temp-value {
    font-size: 3rem;
    font-weight: 700;
}

.feels-like {
    font-size: 1rem;
    opacity: 0.9;
    margin-left: 1rem;
}

.weather-description p {
    font-size: 1.2rem;
    margin: 0;
    text-transform: capitalize;
}

.weather-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.weather-detail {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
}

.weather-detail i {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.weather-detail span {
    display: block;
    font-size: 0.85rem;
    opacity: 0.8;
    margin-bottom: 0.3rem;
}

.weather-detail strong {
    font-size: 1rem;
    font-weight: 600;
}

.sun-times {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.sun-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Weather Widget for Destination Cards */
.weather-widget {
    margin-bottom: 1rem;
}

.weather-mini {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.weather-mini-icon {
    width: 32px;
    height: 32px;
}

.weather-mini-info {
    display: flex;
    flex-direction: column;
}

.weather-temp {
    font-weight: 600;
    color: var(--gray-800);
    font-size: 0.9rem;
}

.weather-desc {
    font-size: 0.75rem;
    color: var(--gray-600);
}

/* Trending Photos Section */
.trending-section {
    padding: 4rem 0;
    background: var(--gray-50);
    margin: 4rem 0;
}

.trending-header {
    text-align: center;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.trending-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 1rem;
}

.trending-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1.5rem;
    border: 2px solid var(--gray-300);
    background: white;
    color: var(--gray-600);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.trending-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.trending-photo-card {
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.trending-photo-card:hover {
    transform: translateY(-5px);
}

.photo-container {
    position: relative;
    overflow: hidden;
}

.photo-container img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.7) 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.trending-photo-card:hover .photo-overlay {
    opacity: 1;
}

.photo-actions {
    display: flex;
    gap: 0.5rem;
    align-self: flex-end;
}

.photo-action-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--gray-700);
}

.photo-action-btn:hover {
    background: white;
    transform: scale(1.1);
}

.photo-action-btn.liked {
    color: var(--error-color);
}

.photo-info {
    color: white;
    align-self: flex-start;
}

.photo-description {
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.photo-credit,
.photo-location {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    opacity: 0.9;
    margin-bottom: 0.3rem;
}

.photo-credit a {
    color: white;
    text-decoration: none;
}

.photo-credit a:hover {
    text-decoration: underline;
}

/* Photo Modal */
.photo-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 1001;
}

.modal-content img {
    width: 100%;
    height: auto;
    display: block;
}

.modal-info {
    padding: 1rem;
    background: white;
}

/* Skeleton Loading */
.trending-photo-skeleton {
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    animation: pulse 2s infinite;
}

.skeleton-image {
    width: 100%;
    height: 250px;
    background: var(--gray-200);
}

.skeleton-info {
    padding: 1rem;
}

.skeleton-text {
    height: 1rem;
    background: var(--gray-200);
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.skeleton-text.short {
    width: 60%;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Deals Display */
.deals-container {
    margin: 2rem 0;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
}

.deals-header {
    text-align: center;
    margin-bottom: 3rem;
}

.deals-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.deals-section {
    margin-bottom: 3rem;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gray-200);
}

.section-title h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.results-count {
    color: var(--gray-600);
    font-size: 0.9rem;
}

.deals-grid {
    display: grid;
    gap: 1.5rem;
}

.flights-grid {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

.hotels-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

/* Deal Cards */
.deal-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
}

.deal-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
}

.deal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.airline-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.airline-code {
    font-weight: 600;
    color: var(--gray-700);
}

.hotel-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0 0 0.5rem 0;
}

.hotel-rating {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.hotel-rating i {
    color: #ffc107;
    font-size: 0.8rem;
}

.rating-number {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-left: 0.3rem;
}

.deal-price {
    text-align: right;
}

.price-amount {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
}

.price-label {
    font-size: 0.8rem;
    color: var(--gray-600);
}

/* Flight Details */
.flight-route {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.flight-time {
    text-align: center;
}

.flight-time .time {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-800);
    display: block;
}

.flight-time .airport {
    font-size: 0.8rem;
    color: var(--gray-600);
    margin-top: 0.2rem;
}

.flight-duration {
    flex: 1;
    text-align: center;
    padding: 0 1rem;
}

.flight-duration i {
    color: var(--primary-color);
    margin-bottom: 0.3rem;
}

.flight-duration span {
    display: block;
    font-size: 0.9rem;
    color: var(--gray-600);
}

.nonstop {
    color: var(--success-color) !important;
    font-weight: 500;
}

.stops {
    color: var(--warning-color) !important;
}

/* Hotel Details */
.hotel-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--gray-600);
}

.distance {
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--primary-color);
}

.hotel-amenities {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.amenity-tag {
    background: var(--gray-100);
    color: var(--gray-700);
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
}

/* Deal Actions */
.deal-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.btn-small {
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
}

.deals-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-200);
}

.disclaimer {
    color: var(--gray-600);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Notifications */
.notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    background: white;
    border-radius: var(--radius-lg);
    padding: 1rem 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-left: 4px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 400px;
    animation: slideIn 0.3s ease;
}

.notification-success {
    border-left-color: var(--success-color);
}

.notification-error {
    border-left-color: var(--error-color);
}

.notification-warning {
    border-left-color: var(--warning-color);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.notification-content i {
    font-size: 1.1rem;
}

.notification-success .notification-content i {
    color: var(--success-color);
}

.notification-error .notification-content i {
    color: var(--error-color);
}

.notification-warning .notification-content i {
    color: var(--warning-color);
}

.notification-info .notification-content i {
    color: var(--primary-color);
}

.notification-close {
    background: none;
    border: none;
    color: var(--gray-500);
    cursor: pointer;
    padding: 0.2rem;
    border-radius: 4px;
}

.notification-close:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Search Suggestions */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--gray-300);
    border-top: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    z-index: 100;
    max-height: 300px;
    overflow-y: auto;
}

.suggestion-item {
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid var(--gray-100);
}

.suggestion-item:hover {
    background: var(--gray-50);
}

.suggestion-item:last-child {
    border-bottom: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .trending-photos-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }
    
    .deals-grid {
        grid-template-columns: 1fr !important;
    }
    
    .city-details {
        grid-template-columns: 1fr;
    }
    
    .scores-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .weather-details {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .flight-route {
        flex-direction: column;
        gap: 1rem;
    }
    
    .notification {
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
    
    .trending-filters {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
    
    .filter-btn {
        flex-shrink: 0;
    }
}