/* Файл: local/modules/custom.forms/templates/form.css */
.custom-form-spacer{
    height: 30px;
}

div[id^=cf-modal] .custom-form-wrapper {
    margin: 0px auto;
    padding: 0px 20px;
    border: none;
    box-shadow: none;
}

.custom-form-wrapper p,
.custom-modal-text p
{
    margin: 8px 0 !important;
    padding: 0 !important;
}

.custom-form-wrapper ul,
.custom-form-wrapper ul li,
ul.custom-modal-list,
ul.custom-modal-list li
{
    list-style: none !important;
    margin: 5px 0 !important;
    padding: 0 !important;
}
ul.custom-modal-list li label
{
    display: block;
    width: 90%;
    padding: 5px !important;
    cursor: pointer;
}

.custom-form-title {
    text-align: center;
    font-size: 20px;
    line-height: 1.4;
    font-weight: 700;
    margin-bottom: 20px;
}
.custom-form-wrapper h3{
    text-align: center;
    font-size: 20px;
    line-height: 1.4;
    font-weight: 700;
    margin: 20px 0;
}

.custom-form-description {
    margin: 20px 0;
    text-align: left;
    font-size: 14px;
    color: #333;
    margin-bottom: 20px;
}

.custom-form-group {
    margin-bottom: 15px;
    position: relative;
}

.custom-form-group label {
    display: block;
    font-size: 14px;
    color: #333;
    margin-bottom: 5px;
}

.custom-form-required {
    color: red;
    margin-left: 2px;
}

.custom-form-input,
.custom-form-select {
    width: 100%;
    padding: 12px 15px;
    font-size: 14px;
    color: #333;
    background-color: #f7f7f7;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}
.custom-form-input.error,
.custom-form-select.error {
    background-color: #ffefef;
}

span.error_message{
    display: none;
}
.custom-form-input.error + span.error_message{
    display: inline-block;
    background: #0171c0;
    color: white;
    font-style: italic;
    font-size: 13px;
    padding: 2px 10px;
    border-radius: 3px 3px 3px 3px;
    margin-left: 10px;
    margin-top: -5px;
    position: relative;
}
.custom-form-input.error + span.error_message::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 10px;
    width: 0;
    height: 0;
    /* Формируем треугольник:
       - границы слева и справа прозрачные, чтобы получить «плавные» боковые стороны
       - нижняя граница цветная, чтобы треугольник указывал вверх */
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #0171c0;
}


.custom-form-input:focus,
.custom-form-select:focus {
    border-color: #0171c0;
    outline: none;
    background-color: #fff;
}
.custom-form-directory-btn{
    position: absolute;
    top: 6px;
    right: 5px;
    display: flex;
    width: 26px;
    height: 26px;
    align-items: center;
    justify-content: center;
    background: #DD3928;
    color: white;
    border: none;
    border-radius: 5px;
    z-index: 1;
    font-weight: bold;
    cursor: pointer;
}
.custom-form-checkbox {
    display: flex;
    align-items: center;
}

.custom-form-checkbox input[type="checkbox"] {
    margin-right: 8px;
    width: 16px;
    height: 16px;
}

.custom-form-submit {
    display: block;
    width: 100%;
    padding: 15px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    color: #fff;
    background-color: #0171c0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
}

.custom-form-submit:hover {
    background-color: #0171c0;
}

/* Модальные окна */
.custom-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}
.custom-modal-content {
    background: #fff;
    padding: 20px;
    max-width: 600px;
    width: 100%;
    border-radius: 4px;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.custom-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
}

.custom-modal-search {
    width: 90%;
    padding: 10px;
    margin-bottom: 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.custom-modal-list {
    list-style: none;
    max-height: 500px;
    overflow-y: auto;
    padding: 0;
    margin: 0 0 10px 0;
}

.custom-modal-list li {
    padding: 8px 10px;
    cursor: pointer;
}

.custom-modal-list li:hover {
    background-color: #f0f0f0;
}

.custom-modal-confirm {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    color: #fff;
    background-color: #0171c0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.custom-modal-confirm:hover {
    background-color: #0171c0;
}

.custom-form-group.conditional-question{
    font-size: 16px;
    font-weight: 500;
    margin: 30px 0;
    border-radius: 10px;
    border: 1px solid #cccccc;
    padding: 20px 30px 20px;
}
.custom-form-group.conditional-question input[type="radio"]{
    transform: scale(1.3);
    margin-right: 10px;
}
.custom-form-group.conditional-question label{
    cursor: pointer;
    margin: 10px 0;
    font-size: 16px;
    font-weight: 600;
}
.custom-form-group.conditional-question label:hover{
    color: #1f5f9f;
}

.custom-form-field-description{
    color: #1f5f9f;
    font-style: italic;
    font-size: 13px;
    margin: 5px 0 20px;
}

.custom-form-block.disabled {
    opacity: 0.6;
    pointer-events: none;
    transition: opacity 0.2s ease;
    padding: 20px;
    background: #eeeeee;
    border-radius: 10px;
}
.custom-form-success{
    text-align: center;
    max-width: 500px;
    padding: 30px;
    box-sizing: border-box;
    margin: 30px auto;
}

.block_condition_alert_message{
    border-radius: 10px;
    border: 1px solid #dd3928;
    padding: 20px 30px;
    background: #fffbfa;
    font-size: 14px;
}
/* events_reg_form__agreement_block */

.agreementCheckbox_wrapper{
    text-align: left;
    margin: 30px 0;
    color: #3b3938;
    font-weight: 300;
    padding-left: 10px;
}
.agreementCheckbox_wrapper label{
    cursor: pointer;
    display: block;
}
.agreementCheckbox_wrapper label.error{
    padding: 10px;
    border-radius: 5px;
    background-color: #ffefef;
}

#agreementCheckbox{
    transform: scale(1.2);
    margin-right: 10px;
}

.custom-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7);
}

.custom-modal-content {
    background-color: #fff;
    margin: 3% auto;
    padding: 20px;
    width: 80%;
    max-width: 800px;
    border-radius: 8px;
    position: relative; /* для позиционирования надписи */
}

.custom-modal-body {
    max-height: 500px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #ddd;
}

.custom-modal-buttons {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 1px 0 30px;
}

.custom-modal-buttons button {
    flex: 1 0 calc(50% - 10px);
    margin: 0 10px;
    padding: 20px 20px;
    max-width: 300px;
    margin: 0 !important;
    font-size: 15px !important;
    letter-spacing: 2px;
    background: #0171c0;
    color: #ffffff;
    border-radius: 5px;
    border: none;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
}

.custom-modal .close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 100;
    background: #0171c0;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
}

.custom-modal .close-button:hover {
    background: #0a66a6;
}

.custom-modal .close-button svg {
    display: block;
}



.custom-modal-buttons button:hover {
    background: #962e20;
    transition: 0.2s;
}
.custom-modal-buttons button:nth-child(2) {
    background: white;
    border: 1px solid #666666;
    color: #333333;
}

.custom-read-to-end {
    position: absolute;
    bottom: 5px;
    left: 50%;
    margin-left: -121px;
    background: rgba(255,255,255,0.9);
    border-radius: 30px;
    box-shadow: 0 0 5px #ffffff;
    padding: 5px 10px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 18px;
    font-weight: bold;
    z-index: 10;
    color: #333333;
    user-select: none;
}

.custom-modal-text h1,
.custom-modal-text h2,
.custom-modal-text h3,
.custom-modal-text h4,
.custom-modal-text h5
{
    text-align: center;
    line-height: 1.3;
    font-weight: 700;
}
.custom-modal-text ul{
    margin: 10px;
}
.custom-modal-text ul li{
    margin: 10px;
    list-style: disc;
}

.custom-arrow-icon {
    width: 20px;
    height: 20px;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0);}
    50% { transform: translateY(5px);}
}

/**/


@media (max-width: 1024px) {
    .custom-form-wrapper {
        margin: 20px auto;
        padding: 0px 0px;
        font-size: 15px;
    }
    .custom-modal-list {
        max-height: 70vh;
    }
    .custom-form-group.conditional-question {
        padding: 20px 20px 30px;
    }
}
@media (max-width: 450px) {
    .custom-modal-buttons {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 15px;
    }
    .custom-modal-buttons button{
        width: 100%;
        max-width: 200px;
    }
    .custom-modal-content {
        padding: 20px 10px;
    }

}

