/* User form specific styles */

.role-selector-wrapper {
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 6px;
}

/* Style pour la structure Symfony sans form-check */
.role-selector {
    display: block;
    line-height: 2.5;
}

.role-selector input[type="radio"] {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin: 0 4px 0 15px !important;
    vertical-align: middle;
    cursor: pointer;
}

.role-selector input[type="radio"]:first-child {
    margin-left: 0 !important;
}

.role-selector label {
    display: inline-block !important;
    width: auto !important;
    padding: 4px 10px !important;
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    font-size: 13px !important;
    margin: 0 !important;
    white-space: nowrap;
    line-height: 1.4;
    vertical-align: middle;
}

/* État normal (enabled) */
.role-selector input[type="radio"]:not(:disabled) + label {
    border-color: #6c757d;
}

.role-selector input[type="radio"]:not(:disabled) + label:hover {
    background-color: #f0f8ff;
    border-color: #0d6efd;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* État sélectionné */
.role-selector input[type="radio"]:checked + label {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
    font-weight: 500;
}

/* État sélectionné avec hover */
.role-selector input[type="radio"]:checked:not(:disabled) + label:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* État désactivé */
.role-selector input[type="radio"]:disabled + label {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    color: #adb5bd;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Ligne barrée pour les désactivés */
.role-selector input[type="radio"]:disabled + label::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background-color: #adb5bd;
    transform: rotate(-5deg);
}

.role-selector .form-check input[type="radio"]:disabled + label::after {
    content: " (" attr(data-disabled-text) ")";
    font-size: 0.85em;
    color: #999;
    font-style: normal;
    text-decoration: none;
}

/* Fallback for browsers that don't support attr() */
html[lang="fr"] .role-selector input[type="radio"]:disabled + label::after {
    content: " (Non disponible pour ce type d'utilisateur)";
    position: static;
    font-size: 0.85em;
    color: #999;
    font-style: normal;
    text-decoration: none;
    background: none;
}

html[lang="en"] .role-selector input[type="radio"]:disabled + label::after {
    content: " (Not available for this user type)";
    position: static;
    font-size: 0.85em;
    color: #999;
    font-style: normal;
    text-decoration: none;
    background: none;
}

/* Radio button styling */
.role-selector-wrapper input[type="radio"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
}

.role-selector-wrapper input[type="radio"]:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.role-selector-wrapper .form-check-label {
    font-size: 16px;
    margin-left: 5px;
}

.role-selector-wrapper .form-check input[type="radio"]:checked + label {
    font-weight: 600;
    color: #0d6efd;
}

.role-selector-wrapper .form-check input[type="radio"]:checked:not(:disabled) + label::before {
    content: "✓ ";
    color: #198754;
    font-weight: bold;
    margin-right: 5px;
}

/* Hide roles that are not available */
.role-selector label[style*="none"] {
    display: none !important;
}

/* Guest user type notice */
.guest-notice {
    padding: 15px;
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 5px;
    color: #856404;
    margin-top: 10px;
}

.guest-notice i {
    margin-right: 8px;
}

/* User type selector */
.user-type-selector {
    font-weight: 500;
}