/* Стили для кастомной формы активации сертификата */
.certificate-form {
    max-width: 100%;
    margin: 0 auto;
    font-family: 'Roboto', 'Open Sans', sans-serif;
}

/* Успешное сообщение */
.certificate-success {
    text-align: center;
    padding: 30px 20px;
}

.success-icon {
    margin-bottom: 20px;
}

.success-icon svg {
    width: 64px;
    height: 64px;
}

.success-content h3 {
    color: rgb(152, 14, 81);
    font-size: 24px;
    margin-bottom: 15px;
    font-weight: 600;
}

.success-content p {
    color: #555;
    font-size: 16px;
    line-height: 1.5;
}

.success-actions {
    margin-top: 25px;
}

/* Заголовок формы */
.certificate-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.certificate-icon {
    margin-bottom: 15px;
}

.certificate-icon svg {
    width: 48px;
    height: 48px;
}

.certificate-title h2 {
    color: rgb(152, 14, 81);
    font-size: 24px;
    margin-bottom: 10px;
    font-weight: 600;
}

.certificate-title p {
    color: #666;
    font-size: 16px;
    line-height: 1.5;
}

/* Ошибки формы */
.certificate-error {
    display: flex;
    align-items: center;
    background: #fff3f3;
    border: 1px solid #ffcdd2;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.error-icon {
    background: #f44336;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 15px;
    flex-shrink: 0;
}

.error-text {
    color: #d32f2f;
    font-size: 14px;
}

/* Поля формы */
.certificate-body {
    margin-bottom: 25px;
}

.certificate-field {
    margin-bottom: 20px;
}

.field-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.required-star {
    color: #e53935;
    margin-left: 3px;
}

/* Сбрасываем браузерные стили */
.certificate-form input, 
.certificate-form textarea {
    appearance: none; /* убираем системный стиль */
    -webkit-appearance: none; /* для Safari */
    -moz-appearance: none; /* для Firefox */
    background: #fff; /* белый фон */
    border: 1px solid #ccc; /* мягкая рамка */
    border-radius: 8px; /* больше скругление */
    padding: 12px 15px;
    font-size: 16px;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: none; /* убираем внутренние тени браузера */
}

/* Фокусное состояние */
.certificate-form input:focus,  
.certificate-form textarea:focus {
    border-color: rgb(152, 14, 81);
    outline: none;
    box-shadow: 0 0 8px rgba(152, 14, 81, 0.15);
}

.certificate-form select {
    background-size: 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 15px;
    width: 100%;
    box-sizing: border-box; 
    height: auto;
    line-height: 1.5; /* выравниваем текст */
}

/* При фокусе */
.certificate-form select:focus {
    border-color: rgb(152, 14, 81);
    outline: none;
    box-shadow: 0 0 8px rgba(152, 14, 81, 0.15);
}

.field-hint {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* Капча */
.certificate-captcha {
    margin: 25px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.captcha-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.captcha-image {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.captcha-image img {
    margin-bottom: 10px;
    border-radius: 4px;
}

.captcha-refresh {
    display: flex;
    align-items: center;
    gap: 5px;
    color: rgb(152, 14, 81);
    font-size: 12px;
    text-decoration: none;
}

.captcha-refresh:hover {
    color: rgb(120, 10, 65);
}

.captcha-input input {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* Соглашение на обработку данных */
.certificate-processing {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
}

.processing-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    margin: 0;
}

.processing-label input {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin-right: 12px;
    position: relative;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.3s ease;
    background: white;
}

.processing-label input:checked + .checkmark {
    background: rgb(152, 14, 81);
    border-color: rgb(152, 14, 81);
}

.processing-label input:checked + .checkmark:after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.processing-text {
    line-height: 1.5;
    color: #555;
}

/* Футер формы */
.certificate-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 25px;
    border-top: 1px solid #eee;
    margin-top: 10px;
}

.required-note {
    font-size: 13px;
    color: #666;
}

.submit-button {
    flex-shrink: 0;
}

/* КРАСИВАЯ КНОПКА ОТПРАВКИ - ОСНОВНОЙ ЦВЕТ RGB(152,14,81) */
.certificate-btn {
    background: linear-gradient(135deg, rgb(152, 14, 81) 0%, rgb(180, 40, 110) 100%);
    color: white;
    border: none;
    padding: 15px 35px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(152, 14, 81, 0.3);
}

.certificate-btn:hover {
    background: linear-gradient(135deg, rgb(140, 12, 73) 0%, rgb(165, 35, 100) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(152, 14, 81, 0.4);
}

.certificate-btn:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(152, 14, 81, 0.3);
}

/* Кнопка закрытия */
.certificate-close-btn {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
    padding: 10px 25px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.certificate-close-btn:hover {
    background: #e9e9e9;
    color: #333;
}

/* Ошибки валидации */
.error {
    color: #e53935;
    font-size: 12px;
    margin-top: 5px;
}
/* Заголовки полей формы (без жирного) */
.field-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 400; /* БЫЛО 600 */
    color: #333;
    font-size: 14px;
}
.btn.btn-primary {
    background: #980e51; /* основной цвет кнопки */
    border: none; /* убираем рамку */
    border-radius: 12px; /* скругленные углы */
    padding: 12px 24px; /* размер */
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    text-transform: none; /* уберём капс */
    transition: all 0.3s ease;
}

.btn.btn-primary:hover {
    background: #b81664; /* цвет при наведении */
    transform: translateY(-2px); /* лёгкий эффект */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}


/* Адаптивность */
@media (max-width: 768px) {
    .certificate-footer {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .captcha-container {
        flex-direction: column;
        align-items: stretch;
    }

    .certificate-header {
        padding-bottom: 15px;
    }

    .certificate-title h2 {
        font-size: 20px;
    }
    
    .certificate-btn {
        padding: 12px 25px;
        font-size: 15px;
        width: 100%;
    }
    
    .required-note {
        order: 2;
    }
    
    .submit-button {
        order: 1;
        width: 100%;
    }

}