/* === Каталог участников сообщества — Стили === */

/* Общая обёртка формы заявки */
#community-members-application-form {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Заголовок и описание формы */
.cmc-header h3 {
    color: #2271b1;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 24px;
}

.cmc-description {
    color: #6c757d;
    margin-bottom: 30px;
    font-size: 16px;
}

/* Блок с описанием методологии */
.cmc-methodology-info {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #2271b1;
    margin-bottom: 30px;
}

.cmc-methodology-info h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2271b1;
}

.cmc-methodology-content p {
    margin-bottom: 15px;
}

.cmc-calculation-steps {
    margin-top: 10px;
}

.cmc-step {
    margin-bottom: 8px;
    padding-left: 10px;
    border-left: 2px solid #dee2e6;
}

.cmc-step strong {
    display: block;
    color: #495057;
}

.cmc-step span {
    display: block;
    font-family: monospace;
    font-size: 14px;
    color: #6c757d;
}

/* Секции формы (группы полей) */
.cmc-form-section {
    background: #f8f9fa;
    padding: 25px;
    margin-bottom: 25px;
    border-radius: 8px;
    border-left: 4px solid #2271b1;
}

.cmc-form-section h4 {
    color: #2271b1;
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

.cmc-section-description {
    color: #6c757d;
    margin-bottom: 20px;
}

/* Группы полей ввода */
.cmc-form-group {
    margin-bottom: 20px;
}

.cmc-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.cmc-form-row .cmc-form-group {
    flex: 1;
    margin-bottom: 0;
}

/* Подписи к полям */
.cmc-form-group label,
.cmc-capability-group label,
.cmc-factor-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
}

/* Поля ввода: текст, email, выпадающие списки, текстовые области */
#community-members-application-form input[type="text"],
#community-members-application-form input[type="email"],
#community-members-application-form select,
#community-members-application-form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

#community-members-application-form input[type="text"]:focus,
#community-members-application-form input[type="email"]:focus,
#community-members-application-form select:focus,
#community-members-application-form textarea:focus {
    border-color: #2271b1;
    outline: none;
}

#community-members-application-form textarea {
    resize: vertical;
    min-height: 80px;
}

/* Группы радиокнопок (позиции и оценки) */
.cmc-position-options,
.cmc-factor-options {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 8px;
}

.cmc-position-options label,
.cmc-factor-options label {
    margin-bottom: 0;
    font-weight: normal;
    color: #495057;
    cursor: pointer;
}

.cmc-position-options input[type="radio"],
.cmc-factor-options input[type="radio"] {
    margin-right: 5px;
}

/* Блоки F-факторов */
.cmc-factor-group {
    margin-bottom: 25px;
    padding: 15px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
}

.cmc-factor-group h5 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2271b1;
}

/* Блоки предварительного просмотра расчётов */
.cmc-calculation-preview,
.cmc-factor-score,
.cmc-total-calculations {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed #dee2e6;
}

.cmc-preview-item,
.cmc-factor-score,
.cmc-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.cmc-preview-item span,
.cmc-factor-score span,
.cmc-result-item span {
    font-weight: 600;
    color: #495057;
}

.cmc-preview-item strong,
.cmc-factor-score strong,
.cmc-result-item strong {
    color: #2271b1;
    font-size: 16px;
}

.cmc-result-item em {
    color: #6c757d;
    font-size: 12px;
    margin-left: 8px;
}

/* Кнопка отправки заявки */
.cmc-form-actions {
    margin-top: 20px;
    text-align: center;
}

.cmc-submit-btn {
    background: #2271b1;
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
    max-width: 300px;
}

.cmc-submit-btn:hover:not(:disabled) {
    background: #135e96;
}

.cmc-submit-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* Сообщения об успехе, ошибках и информации */
#cmc-form-message .cmc-message {
    padding: 15px;
    border-radius: 6px;
    margin-top: 15px;
    font-weight: 500;
}

.cmc-message-success {
    background: #d1edff;
    color: #0c5460;
    border-left: 4px solid #2271b1;
}

.cmc-message-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.cmc-message-info {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

/* === Каталог участников (заглушка) === */
.community-members-catalog {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
    color: #6c757d;
}

/* === Адаптивный дизайн для мобильных устройств === */
@media (max-width: 768px) {
    #community-members-application-form {
        padding: 15px;
    }

    .cmc-form-row {
        flex-direction: column;
        gap: 0;
    }

    .cmc-position-options,
    .cmc-factor-options {
        flex-direction: column;
        gap: 8px;
    }

    .cmc-submit-btn {
        max-width: 100%;
    }
}