/* Application Modal Styles based on Figma */
.application-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.application-modal.show {
    display: flex;
}

.application-modal__content {
    position: relative;
    width: 540px;
    height: 620px;
    background: #0fc998;
    border-radius: 30px;
    padding: 0;
    box-sizing: border-box;
}

.application-modal__close {
    position: absolute;
    right: 24px;
    top: 24px;
    width: 28.43px;
    height: 28.28px;
    cursor: pointer;
    z-index: 1;
}

.application-modal__close::before,
.application-modal__close::after {
    content: '';
    position: absolute;
    width: 38px;
    height: 2px;
    background: #ffffff;
    border-radius: 1px;
}

.application-modal__close::before {
    left: 0;
    top: 26.87px;
    transform-origin: 0 0;
    transform: rotate(-45deg) scale(1, 1);
}

.application-modal__close::after {
    left: 28.43px;
    top: 26.87px;
    transform-origin: 0 0;
    transform: rotate(45deg) scale(-1, 1);
}

.application-modal__title {
    position: absolute;
    left: 110px;
    top: 97px;
    width: 341px;
    height: 48px;
    color: #ffffff;
    font-family: "Inter", sans-serif;
    font-size: 40px;
    line-height: 48px;
    letter-spacing: -0.03em;
    font-weight: 700;
    margin: 0;
}

.application-modal__field {
    position: absolute;
    width: 320px;
    left: 110px;
    margin: 0;
}

.application-modal__field--phone {
    top: 164px;
}

.application-modal__field--email {
    top: 232px;
}

.application-modal__field--name {
    top: 300px;
}

.application-modal__field--comment {
    top: 372px;
    height: 150px;
}

.application-modal__field--button {
    top: 548px;
}

.application-modal__label {
    position: absolute;
    left: 22px;
    top: -21px;
    width: 280px;
    height: 21px;
    color: #ffffff;
    font-family: "Inter", sans-serif;
    font-size: 11px;
    line-height: 21px;
    letter-spacing: -0.03em;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.application-modal__input,
.application-modal__textarea {
    width: 100%;
    height: 40px;
    background: #ffffff;
    border-radius: 20px;
    padding: 0 22px;
    color: #0fc998;
    font-family: "Inter", sans-serif;
    font-size: 16px;
    line-height: 40px;
    letter-spacing: -0.03em;
    font-weight: 600;
    border: none;
    outline: none;
    box-sizing: border-box;
}

.application-modal__input:focus,
.application-modal__textarea:focus {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.4);
}

.application-modal__input::placeholder,
.application-modal__textarea::placeholder {
    color: #0fc998;
}

.application-modal__input.required::after,
.application-modal__textarea.required::after {
    content: '*';
    color: #0fc998;
    margin-left: 4px;
}

.application-modal__textarea {
    height: 166px;
    resize: none;
    line-height: 1.5;
}

.application-modal__required {
    color: #0fc998;
    font-family: "Inter", sans-serif;
    font-size: 16px;
    line-height: 36px;
    letter-spacing: -0.03em;
    font-weight: 600;
    display: inline-block;
}

.application-modal__button {
    width: 320px;
    height: 40px;
    background: #5c6063;
    border-radius: 20px;
    color: #ffffff;
    font-family: "Inter", sans-serif;
    font-size: 16px;
    line-height: 36px;
    letter-spacing: -0.03em;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.application-modal__button:hover {
    background: #4a4d50;
}

.application-modal__button:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

.application-modal__field-wrapper {
    position: relative;
}

.application-modal__field-wrapper .application-modal__required {
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.application-modal__success {
    display: none;
    text-align: center;
    color: #ffffff;
    font-family: "Inter", sans-serif;
    font-size: 16px;
    line-height: 24px;
    margin-top: 20px;
}

.application-modal__success.show {
    display: block;
}

.application-modal__error {
    display: none;
    margin-top: 18px;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 99, 71, 0.35);
    background: rgba(255, 99, 71, 0.12);
    color: #B53B27;
    font-family: "Inter", sans-serif;
    font-size: 14px;
    line-height: 1.45;
}

.application-modal__error.show {
    display: block;
}

/* Глобальный toast */
.app-toast {
    position: fixed;
    left: 50%;
    bottom: 32px;
    transform: translateX(-50%) translateY(20px);
    min-width: 260px;
    max-width: 90%;
    padding: 12px 16px;
    border-radius: 999px;
    background: rgba(15, 201, 152, 0.95);
    color: #ffffff;
    font-family: "Inter", sans-serif;
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 11000;
}

.app-toast--show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

/* Поле с ошибкой */
.application-modal__field.has-error .application-modal__input,
.application-modal__field.has-error .application-modal__textarea {
    box-shadow: 0 0 0 2px rgba(255, 99, 71, 0.7);
}

.application-modal__field-error {
    margin-top: 6px;
    color: #ffe6de;
    font-family: "Inter", sans-serif;
    font-size: 12px;
    line-height: 1.4;
    min-height: 16px;
}

/* Success Modal - по макету из raschetS */
.application-success-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10001;
    justify-content: center;
    align-items: center;
}

.application-success-modal.show {
    display: flex;
}

.application-success-modal__content {
    position: relative;
    width: 540px;
    height: 504px;
    background: #0fc998;
    border-radius: 30px;
    padding: 0;
    box-sizing: border-box;
}

.application-success-modal__title {
    position: absolute;
    left: 62px;
    top: 51px;
    width: 422px;
    height: 45px;
    color: #ffffff;
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: 24px;
    line-height: 45px;
    letter-spacing: -0.03em;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.application-success-modal__icon {
    position: absolute;
    left: 191px;
    top: 162px;
    width: 159px;
    height: 159.66px;
}

.application-success-modal__icon svg {
    width: 100%;
    height: 100%;
}

.application-success-modal__button {
    position: absolute;
    left: 62px;
    top: 405px;
    width: 416px;
    height: 40px;
    background: #5c6063;
    border-radius: 20px;
    cursor: pointer;
    border: none;
    transition: background 0.3s ease;
}

.application-success-modal__button:hover {
    background: #4a4d50;
}

.application-success-modal__button-text {
    color: #ffffff;
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 36px;
    letter-spacing: -0.03em;
    font-weight: 600;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

