.f-main-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;   /* Центрирование по вертикали */
    justify-content: center; /* Центрирование по горизонтали */
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.f-main-modal.show {
    opacity: 1;
    pointer-events: auto;
    display: flex !important;
}

.f-main-modal-content {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    width: 600px;
    max-width: 85%;
    position: relative;
    padding: 30px;
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    /* Центрирование по вертикали и горизонтали */
    margin: 0 auto;
}

.f-main-modal.show .f-main-modal-content {
    transform: scale(1);
}

.f-main-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: normal;
    color: #888;
    cursor: pointer;
    transition: all 0.2s ease;
}

.f-main-modal-close:hover {
    background: #f5f5f5;
    color: #000;
    border-color: #ccc;
}

.f-main-modal-image {
    width: 180px;
    flex-shrink: 0;
}

.f-main-modal-text {
    flex: 1;
}

.f-main-modal-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #000;
}

.f-main-modal-subtitle {
    color: #333;
    margin-bottom: 16px;
    line-height: 1.4;
}

.f-main-modal-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.f-main-modal-input {
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 9999px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s ease;
}

.f-main-modal-input:focus {
    border-color: #8be26a;
}

.f-main-modal-input::placeholder {
    font-style: italic;
}

.f-main-modal-button {
    background: #8be26a;
    border: none;
    border-radius: 9999px;
    padding: 12px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.f-main-modal-button:hover {
    background: #76d457;
}

.f-main-modal-body {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
}

@media (max-width: 768px) {
    .f-main-modal-body {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }

    .f-main-modal-image {
        width: 100%;
        max-width: 240px; /* чтобы не растягивалось слишком сильно */
        margin: 0 auto;
    }

    .f-main-modal-text {
        width: 100%;
        padding: 0;
    }

    .f-main-modal-title {
        font-size: 28px; /* чуть больше, чем 20px — чтобы читалось */
        margin-bottom: 8px;
    }

    .f-main-modal-subtitle {
        font-size: 16px;
        margin-bottom: 20px;
        line-height: 1.5;
    }

    .f-main-modal-form {
        width: 100%;
        gap: 16px;
    }

    .f-main-modal-input {
        padding: 14px 18px;
        font-size: 16px;
        border-radius: 9999px;
    }

    .f-main-modal-button {
        padding: 14px;
        font-size: 16px;
        border-radius: 9999px;
    }

    /* Кнопка закрытия — чуть меньше и ближе к краю */
    .f-main-modal-close {
        top: 12px;
        right: 12px;
        width: 28px;
        height: 28px;
        font-size: 18px;
    }
}

/* Уведомления */
.f-main-modal-notifications {
    display: none;
    margin-bottom: 15px;
    padding: 15px;
    border-radius: 12px;
    font-size: 15px;
    text-align: center;
    line-height: 1.4;
}

.f-main-modal-notifications.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.f-main-modal-notifications.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Для успешного сообщения с галочкой */
.f-main-modal-notifications.success::before {
    content: '✅';
    font-size: 40px;
    display: block;
    margin: 0 auto 10px;
}

/* Стили для текста в успешном сообщении */
.f-main-modal-notifications.success p {
    margin: 0;
    font-weight: 600;
    font-size: 18px;
}

.f-main-modal-notifications.success span {
    display: block;
    font-size: 14px;
    font-weight: normal;
    margin-top: 5px;
    color: #155724;
}

/* Стили для успешного сообщения — точное соответствие макету */
.f-main-modal-success {
    background: white;
    border-radius: 12px; /* Закруглённые углы, как на скриншоте */
    padding: 40px 20px;
    text-align: center;
    position: relative;
    max-width: 360px;
    margin: 0 auto;
}

.f-main-modal-success .f-main-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.f-main-modal-success .f-main-modal-close:hover {
    opacity: 1;
}

.f-main-modal-success-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.f-main-modal-success-icon {
    max-width: 80px;
    height: auto;
    margin: 0 auto 20px;
    display: block;
}

.f-main-modal-success-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0;
    color: #222;
    line-height: 1.4;
}


.f-main-modal-success-subtitle {
    font-size: 20px;
    color: #666;
    margin: 0;
    line-height: 1.5;
}