

/* Search container styles */
.country-search-container {
    max-width: 600px;
    margin: 2rem auto;
    position: relative;
}

.search-box {
    width: 100%;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.search-suggestions.active {
    display: block;
}

.suggestion-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.suggestion-item:hover {
    background-color: #f8f9fa;
}

/* Country details card */
.country-details {
    margin-top: 2rem;
}

.country-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.country-card.hidden {
    display: none;
}

.card-header {
    padding: 1.5rem;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.flag-img {
    width: 120px;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card-header h3 {
    margin: 0;
    font-size: 1.8rem;
    color: #333;
}

.card-body {
    padding: 1.5rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.label {
    font-weight: 600;
    color: #666;
    font-size: 0.9rem;
}

.value {
    font-size: 1.1rem;
    color: #333;
}

/* Initial message */
.initial-message {
    text-align: center;
    padding: 3rem;
    color: #666;
    font-size: 1.1rem;
}

.initial-message.hidden {
    display: none;
}

/* Loader */
.loader {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.loader.hidden {
    display: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-header {
        flex-direction: column;
        text-align: center;
    }

    .flag-img {
        width: 100px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }
}