/* Container principal - Responsive */
.nutudeo-country-selector {
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e8ecef;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    max-width: 100%;
}

/* Titre */
.nutudeo-country-selector h3 {
    margin: 0 0 16px 0;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
}

/* Layout horizontal sur desktop, vertical sur mobile */
.nutudeo-country-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Select - Responsive */
.nutudeo-country-select {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.5;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #1f2937;
}

/* Augmenter la taille du dropdown */
.nutudeo-country-select option {
    padding: 10px;
    font-size: 15px;
    line-height: 1.6;
}

.nutudeo-country-select:hover {
    border-color: #1FB5B9;
}

.nutudeo-country-select:focus {
    outline: none;
    border-color: #1FB5B9;
    box-shadow: 0 0 0 3px rgba(31, 181, 185, 0.1);
}

/* Bouton - Responsive */
.nutudeo-country-apply {
    padding: 12px 24px;
    background: #1FB5B9;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
}


.nutudeo-country-apply:hover {
    background: #17a2a6;
}

.nutudeo-country-apply:active {
    transform: scale(0.98);
}

.nutudeo-country-apply:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

/* Messages */
.nutudeo-country-message {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
    display: none;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nutudeo-country-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.nutudeo-country-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* Version compacte (pour sidebar) */
.nutudeo-country-selector.compact {
    padding: 12px;
}

.nutudeo-country-selector.compact h3 {
    font-size: 14px;
    margin-bottom: 10px;
}

.nutudeo-country-selector.compact .nutudeo-country-select,
.nutudeo-country-selector.compact .nutudeo-country-apply {
    padding: 10px 12px;
    font-size: 13px;
}

/* Responsive - Tablette et Desktop */
@media (min-width: 768px) {
    .nutudeo-country-form {
        flex-direction: row;
        align-items: stretch;
        gap: 15px;
    }
    
    .nutudeo-country-select {
        flex: 1;
    }
    
    .nutudeo-country-apply {
        flex-shrink: 0;
        min-width: 150px;
    }
}

/* Responsive - Desktop large */
@media (min-width: 1024px) {
    .nutudeo-country-selector {
        padding: 20px;
    }
    
    .nutudeo-country-selector h3 {
        font-size: 18px;
        margin-bottom: 15px;
    }
}

/* Version inline (pour header/navbar) */
.nutudeo-country-selector.inline {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
}

.nutudeo-country-selector.inline h3 {
    display: none;
}

.nutudeo-country-selector.inline .nutudeo-country-form {
    flex-direction: row;
    gap: 8px;
}

.nutudeo-country-selector.inline .nutudeo-country-select {
    max-width: 200px;
    padding: 8px 12px;
    font-size: 13px;
}

.nutudeo-country-selector.inline .nutudeo-country-apply {
    padding: 8px 16px;
    font-size: 13px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .nutudeo-country-selector {
        background: #1e1e1e;
        border-color: #333;
    }
    
    .nutudeo-country-selector h3 {
        color: #fff;
    }
    
    .nutudeo-country-select {
        background-color: #2a2a2a;
        border-color: #444;
        color: #fff;
    }
}
