
.custom-form-container {
    font-family: Montserrat, sans-serif;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.custom-form-container form {
    width: 100%;
}

/* Сетка формы */
.custom-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 30px;
}

.custom-form-group {
    display: flex;
    flex-direction: column;
}

.custom-form-group--full {
    grid-column: 1 / -1;
}

.custom-form-label {
    margin-top: 0;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 16px;
    line-height: 20px;
    color: #FFFFFF;
}

.custom-form-group input[type=text],
.custom-form-group input[type=email],
.custom-form-group textarea {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px 20px;
    color: #FFFFFF;
    font-family: inherit;
    font-size: 16px;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.custom-form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.custom-form-input::placeholder {
    color: #ffffff;
    opacity: 0.3;
}

.custom-form-group input[type=text]:focus,
.custom-form-group input[type=email]:focus,
.custom-form-group textarea:focus {
    outline: none;
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 0 10px rgba(140, 137, 211, 0.2);
}

.custom-form-group input[type="text"]:focus::placeholder,
.custom-form-group input[type="email"]:focus::placeholder,
.custom-form-group textarea:focus::placeholder {
    color: #ffffff !important;
    opacity: 0.7;
}

/* Чекбоксы */
.custom-checkbox-group {
    margin-top: 30px;
    margin-bottom: 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.75);
    font-size: 16px;
    line-height: 1.3;
}

.custom-checkbox input {
    display: none;
}

.custom-checkbox-box {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.03);
    position: relative;
    transition: 0.2s ease;
}

.custom-checkbox input:checked + .custom-checkbox-box {
    background: #9a4dff;
    border-color: #9a4dff;
}

.custom-checkbox input:checked + .custom-checkbox-box::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Кнопка */
.custom-form-container .custom-form-button {
    width: 100%;
    background-image: linear-gradient(100deg, #3B82F6, #8B5CF6);
    color: #ffffff;
    font-family: Montserrat, sans-serif;
    font-size: 18px;
    line-height: 24px;
    font-weight: 600;
    border: none;
    border-radius: 99px;
    padding: 22px 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0;
    position: relative;
    z-index: 1;
}

.custom-form-button:hover {
    transform: scale(1.00);
    box-shadow: 0 4px 20px rgba(94, 0, 255, 0.49);
}

.custom-form-button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Адаптив */
@media (max-width: 767px) {
    .custom-form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .custom-form-label {
        font-size: 14px;
        line-height: 18px;
    }

    .custom-form-group input[type=text],
    .custom-form-group input[type=email],
    .custom-form-group textarea {
        font-size: 14px;
        padding: 16px 18px;
    }

    .custom-checkbox {
        font-size: 14px;
        align-items: flex-start;
    }

    .custom-form-container .custom-form-button {
        font-size: 16px;
        line-height: 20px;
        padding: 20px 25px;
        height: 60px;
    }
}

/* Стили для модального окна */
.course-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.course-modal[open] { display: flex; max-width: none; max-height: none; width: 100%; height: 100dvh; margin: 0; border: 0; padding: 20px; color: #fff; }
.course-modal::backdrop { background: rgb(0 0 0 / 65%); }
.cf-cex-page.light-mode .custom-form-input { background: #0e01401a; color: #0f1542; caret-color: #0f1542; }
.cf-cex-page.light-mode .custom-form-input::placeholder { color: #0f1542; opacity: .5; }
.cf-cex-page.light-mode .custom-checkbox-box { background: #0e01401a; }
.cf-cex-page.light-mode .custom-form-label { color: #0f1542; }
.cf-cex-page.light-mode .custom-checkbox { color: #0f1542bf; }
.cf-cex-page .custom-checkbox input { display: block; position: absolute; width: 1px; height: 1px; opacity: 0; }
.cf-cex-page .custom-checkbox input:focus-visible + .custom-checkbox-box { outline: 2px solid #4386ff; outline-offset: 3px; }

.course-modal__content {
    background: linear-gradient(135deg, #1a1f36 0%, #2d1b69 100%);
    border: 1px solid #7C5CFF;
    border-radius: 16px;
    padding: 40px 30px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    color: white;
    position: relative;
}

.course-modal__close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
}

.course-modal__icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.course-modal__title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #00E5A8;
}

.course-modal__text {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 25px;
    opacity: 0.9;
}

.course-modal__button {
    background: linear-gradient(100deg, #7C5CFF, #00E5A8);
    color: #0E0B33;
    border: none;
    border-radius: 12px;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.course-modal__button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(0, 255, 194, 0.3);
}
