/* Container pour le sélecteur de statut */
.application-status-selector {
    display: inline-block;
    position: relative;
}

.status-selector-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Styles du select */
.status-select {
    appearance: none;
    padding: 8px 32px 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 180px;
    background-repeat: no-repeat;
    background-position: right 10px center;
}

/* Couleurs de fond selon le statut */
.status-select option[value="pending"]:checked,
.status-select:has(option[value="pending"]:checked) {
    background-color: #f59e0b;
    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='white' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

.status-select option[value="under_review"]:checked,
.status-select:has(option[value="under_review"]:checked) {
    background-color: #3b82f6;
    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='white' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

.status-select option[value="accepted"]:checked,
.status-select:has(option[value="accepted"]:checked) {
    background-color: #10b981;
    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='white' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

.status-select option[value="rejected"]:checked,
.status-select:has(option[value="rejected"]:checked) {
    background-color: #ef4444;
    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='white' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

.status-select option[value="withdrawn"]:checked,
.status-select:has(option[value="withdrawn"]:checked) {
    background-color: #6b7280;
    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='white' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

.status-select option[value="on_hold"]:checked,
.status-select:has(option[value="on_hold"]:checked) {
    background-color: #8b5cf6;
    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='white' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

.status-select:hover {
    opacity: 0.9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.status-select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.status-select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Options du select */
.status-select option {
    font-weight: 600;
    padding: 8px 12px;
}

.status-select option[value="pending"] {
    background-color: #f59e0b;
    color: white;
}

.status-select option[value="under_review"] {
    background-color: #3b82f6;
    color: white;
}

.status-select option[value="accepted"] {
    background-color: #10b981;
    color: white;
}

.status-select option[value="rejected"] {
    background-color: #ef4444;
    color: white;
}

.status-select option[value="withdrawn"] {
    background-color: #6b7280;
    color: white;
}

.status-select option[value="on_hold"] {
    background-color: #8b5cf6;
    color: white;
}

/* Loader */
.status-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3b82f6;
    font-size: 16px;
}

.status-loader.hidden {
    display: none;
}

/* Animation du loader */
.status-loader i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Tailles */
.status-selector--sm .status-select {
    padding: 6px 28px 6px 10px;
    font-size: 13px;
    min-width: 160px;
}

.status-selector--sm .status-loader {
    font-size: 14px;
}

.status-selector--lg .status-select {
    padding: 10px 36px 10px 14px;
    font-size: 15px;
    min-width: 200px;
}

.status-selector--lg .status-loader {
    font-size: 18px;
}

/* États de feedback visuel */
.status-select.success {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3);
}

.status-select.error {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3);
    animation: shake 0.3s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .status-select {
        min-width: 150px;
        font-size: 13px;
    }
}