.form-invitation {
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    max-width: 541px;
    /* padding-bottom: 107px; */
    margin-left: auto;
    margin-right: auto;
    z-index: 10;

    left: 0;
    right: 0;
}

.invite-text {
    color: var(--white, #fff);
    text-align: center;
    font-family: "Inter", sans-serif;
    font-size: 24px;
    font-style: normal;
    font-weight: 450;
    line-height: 130%;
    letter-spacing: -2%;
}

.form__wrap {
    box-sizing: border-box;
    position: relative;
    display: flex;
    align-items: center;
    width: 570px;
    height: 100%;
    padding: 50px 50px 0 50px;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    border-radius: 10px 10px 0 0;
    background: var(--white, #fff);
}
.close-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
}
.form {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    align-self: stretch;
    padding-bottom: 50px;
    overflow-y: scroll;
}

.form {
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.form::-webkit-scrollbar {
    display: none;
}

.form__input {
    display: flex;
    padding: 11px 0;
    align-items: center;
    gap: 10px;
    align-self: stretch;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--, #000);
    text-overflow: ellipsis;
    font-family: "Inter", sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 450;
    line-height: 110%;
    letter-spacing: -0.32px;
}

.form__input:focus {
    outline: none;
    border: none;
    box-shadow: none;
}
.form__textarea:focus {
    outline: none;
    border: none;
    box-shadow: none;
}

.form__textarea {
    display: flex;
    padding: 11px 0;
    align-items: center;
    gap: 10px;
    align-self: stretch;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);

    color: var(--, #000);
    font-family: "Inter", sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 450;
    line-height: 110%;
    letter-spacing: -0.32px;
}
.form__input-file {
    position: relative;
    box-sizing: border-box;
    display: flex;
    width: 100%;
    /* height: auto; */
    height: 264px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    align-self: stretch;
    overflow: hidden;

    border: 3px dashed #cfcfcf;
    border-radius: 3px;
}
.form__input-file:has(.file-preview) {
    border: none;
    border-radius: 3px;
}

.form__input-file--m20 {
    margin-bottom: 20px;
}

.form__input-file-title {
    color: #000000;
    opacity: 20%;
    text-align: center;
    font-family: "Inter", sans-serif;
    font-size: 30px;
    font-style: normal;
    font-weight: 450;
    line-height: 100%;
    letter-spacing: -0.6px;
    margin: 0;
}

.form__input-file-subtitle {
    color: #000000;
    opacity: 20%;
    text-align: center;
    font-family: "Inter", sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 450;
    line-height: 120%;
    letter-spacing: -0.32px;
    margin: 0;
}

.form__input.error,
.form__textarea.error {
    border-color: red;
    background-color: rgba(229, 57, 53, 0.04);
}

.form__input-file-error {
    color: var(--error-color, #d6000d);
    text-align: center;

    font-family: "Inter", sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 450;
    line-height: 120%;
    letter-spacing: -0.32px;
    margin: 0;
    margin-top: -2px;
    display: none;
}

/* Класс для отображения ошибки */
.form__input-file--has-error .form__input-file-error {
    display: block;
}

.form__header {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    padding-top: 16px;
    padding-bottom: 16px;
    margin-bottom: 20px;
}
.title {
    color: var(--, #000);
    font-family: "Inter", sans-serif;
    font-size: 60px;
    font-style: normal;
    font-weight: 500;
    line-height: 110%; /* 66px */
    letter-spacing: -2.4px;
}
.suptitle {
    color: var(--, #000);
    text-align: center;
    font-family: "Inter", sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 450;
    line-height: 110%; /* 17.6px */
    letter-spacing: -0.32px;
}
.form__inputs {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    align-self: stretch;

    /* overflow: hidden; */
    color: var(--, #000);
    text-overflow: ellipsis;
    font-family: "Inter", sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 450;
    line-height: 110%; /* 17.6px */
    letter-spacing: -0.32px;
}

.checkboxes {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.custom-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.checkbox-svg {
    display: inline-block;
    width: 24px;
    height: 24px;
    cursor: pointer;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.custom-checkbox input[type="checkbox"] + .checkbox-svg {
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20width=%2721%27%20height=%2721%27%20viewBox=%270%200%2021%2021%27%20fill=%27none%27%3E%3Crect%20x=%270.5%27%20y=%270.5%27%20width=%2720%27%20height=%2720%27%20rx=%273%27%20stroke=%27black%27%20stroke-opacity=%270.2%27/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
}

.custom-checkbox input[type="checkbox"]:checked + .checkbox-svg {
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20width=%2721%27%20height=%2721%27%20viewBox=%270%200%2021%2021%27%20fill=%27none%27%3E%3Crect%20x=%270.5%27%20y=%270.5%27%20width=%2720%27%20height=%2720%27%20rx=%273%27%20stroke=%27black%27%20stroke-opacity=%270.2%27/%3E%3Cpath%20d=%27M3.546875%2010.18572L8.04688%2014.9857L16.5469%204.985718%27%20stroke=%27black%27%20stroke-width=%271.5%27%20stroke-linecap=%27round%27%20stroke-linejoin=%27round%27/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
}

.custom-checkbox input[type="checkbox"]:focus + .checkbox-svg {
    outline-offset: 2px;
}

.agreement__link {
    font-family: "Suisse Intl", sans-serif;
    font-weight: 450;
    font-style: normal;
    font-size: 16px;
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-decoration: underline solid;
    text-underline-offset: 25%;
    text-decoration-thickness: 1%;
    color: #000000;
}

.personal-span {
    font-family: "Inter", sans-serif;
    font-weight: 450;
    font-size: 16px;
    line-height: 110.00000000000001%;
    letter-spacing: -2%;
}

.submit-button {
    box-sizing: border-box;
    width: 100%;
    /* max-width: 470px; */
    height: 83px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    padding: 20px 50px 28px 50px;
    justify-content: center;
    align-items: center;
    align-self: stretch;
    border-radius: 4px;
    background: linear-gradient(
        143.56deg,
        #0d2a6b 13.57%,
        #019898 70.06%,
        #1e4268 89.74%
    );

    color: var(--white, #fff);

    font-family: "Inter", sans-serif;
    font-size: 48px;
    font-style: normal;
    font-weight: 450;
    line-height: 100%;
    letter-spacing: -0.96px;
    border: none;

    cursor: pointer;
    transition: var(--hover-transition);
}

button:disabled,
.submit-button:disabled {
    background: #cccccc;
    cursor: not-allowed;
    pointer-events: none;
    transition: var(--hover-transition);
}

.modal-window:has(.success-wrap) {
    margin-top: auto;
}

.success-wrap {
    width: 570px;
    height: 90vh;
    max-height: 750px;
    padding-left: 110px;
    padding-right: 110px;
    padding-top: 80px;
    margin-bottom: auto;
    position: relative;
    border-top: 10px;
    box-sizing: border-box;
    position: relative;
    display: flex;
    align-items: center;
    flex-direction: column;
    align-items: center;
    border-radius: 10px 10px 0 0;
    background: var(--white, #fff);
}

.success {
    /* padding-left: 60px;
  padding-right: 60px; */
    height: 100%;
}

.success__close {
    position: absolute;
    right: 10px;
    top: 10px;
}

.success-logo {
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.success-title {
    font-family: "Inter", sans-serif;
    font-weight: 500;
    font-style: Medium;
    font-size: 60px;
    line-height: 110.00000000000001%;
    letter-spacing: -4%;
    text-align: center;
}

.success-subtitle {
    text-align: center;
    font-family: "Inter", sans-serif;
    font-weight: 450;
    font-size: 16px;
    line-height: 110.00000000000001%;
    letter-spacing: -2%;
    text-align: center;
}

.invite-new {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    /* color: #7000c8; */
    color: #157f8a;
    font-family: "Inter", sans-serif;
    font-weight: 450;
    font-size: 16px;
    line-height: 110.00000000000001%;
    letter-spacing: -2%;
    text-align: center;
    background: none;
    border: none;
    cursor: pointer;
}

/* ===== Drag-and-drop зона ===== */
.form__input-file-placeholder {
    box-sizing: border-box;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;

    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.video-border {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.form__input-file-placeholder.drag-over {
    border-color: #b95500;
    background: #fff0e0;
    transform: scale(1.02);
}

/* ===== Превью файла ===== */
.form__input-file-preview-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.file-preview {
    width: 100%;
    background: #000;
}

.form__input-file-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
}

.form__input-file-info {
    flex: 1;
    text-align: left;
    min-width: 0;
}

.form__input-file-name {
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.form__input-file-size {
    font-size: 12px;
    color: #666;
}

.form__input-file-remove {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: none;
    background: #eee;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.form__input-file-remove:hover {
    background: #000000;
}

.form__input-file-remove:hover svg path {
    stroke: #fff;
}

/* ===== Ошибка файла ===== */
.form__input-file-error {
    display: none;
    margin-top: 8px;
    color: #d6000d;
    font-size: 13px;
}

.form__input-file-error:empty {
    display: none;
}

.file-name,
.file-size {
    max-width: 370px;
    word-wrap: break-word;
    text-align: center;
    margin: auto;
    color: #000000;
    opacity: 20%;
    text-align: center;
    font-family: "Inter", sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 450;
    line-height: 120%;
    letter-spacing: -0.32px;
    padding-left: 20px;
    padding-right: 20px;
}

.file-remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
}

@media (max-width: 1536px) {
    .invite-text {
        font-size: 16px;
    }

    .form-invitation {
        top: unset;
    }

    .form__wrap {
        width: 100%;
    }

    .title {
        font-weight: 500;
        font-size: 48px;
        line-height: 110.00000000000001%;
        letter-spacing: -4%;
    }
    .suptitle {
        font-size: 16px;
        line-height: 110.00000000000001%;
        letter-spacing: -2%;
        text-align: center;
    }

    .form__input-file-placeholder {
        width: 100%;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .agreement__link {
        font-weight: 450;
        font-size: 16px;
        line-height: 110.00000000000001%;
        letter-spacing: -2%;
    }
}

@media (max-width: 768px) {
    .invite-text {
        font-size: 14px;
    }

    .video-gallery {
        font-size: 14px;
    }

    .form-invitation {
        width: 100%;
        max-width: unset;
    }

    .form-invitation {
        width: 100%;
        max-width: unset;
    }

    .form__wrap {
        width: 100%;
        padding-left: 20px;
        padding-right: 20px;
        padding-top: 80px;
        padding-bottom: 50px;
    }

    .title {
        font-size: 48px;
    }

    .suptitle {
        font-size: 16px;
    }

    .form__input {
        font-size: 16px;
    }

    .submit-button {
        max-width: unset;
    }

    .success-wrap {
        width: 100%;
        max-width: 375px;
        padding-left: 8px;
        padding-right: 8px;
        padding-bottom: 50px;
    }

    .success-title {
        font-size: 48px;
    }

    .success-logo {
        width: 100%;
    }
}

.error-field {
    border: 1px solid red;
    border-radius: 5px;
    padding: 16px 8px;
    box-sizing: border-box;
    color: red;
}

.error-field::placeholder {
    color: red;
}

@media (max-width: 768px) {
    .form-invitation {
        gap: 10px;
    }
}
