﻿.app-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(31, 41, 55, 0.38);
    backdrop-filter: blur(4px);
}

.app-modal {
    width: min(680px, 100%);
    max-height: min(720px, 90dvh);
    display: flex;
    flex-direction: column;
    border: 1px solid #e8e8e8;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .20);
    overflow: hidden;
}

.app-modal-comunicazione {
    animation: app-modal-enter 160ms ease-out;
}

.app-modal-sopra {
    z-index: 1050;
}



@keyframes app-modal-enter {
    from {
        opacity: 0;
        transform: translateY(8px) scale(.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.app-modal-header {
    flex: 0 0 auto;
    min-height: 76px;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid #edf2ea;
    background: #ffffff;
}

.app-modal-title {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #3b312d;
    font-size: 22px;
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: .01em;
}

.app-modal-title-icon {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

    .app-modal-title-icon i {
        font-size: 22px;
        line-height: 1;
    }

.app-modal-close {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f4f7f2;
    color: #3b312d;
    font-size: 18px;
    cursor: pointer;
    transition: background-color .15s ease, transform .15s ease;
}

    .app-modal-close:hover {
        background: #e8f4e2;
    }

    .app-modal-close:active {
        transform: scale(.96);
    }

.app-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 24px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

    .app-modal-body::-webkit-scrollbar {
        display: none;
    }

.app-modal-loading {
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 16px;
    font-weight: 600;
}


.app-modal-footer {
    flex: 0 0 auto;
    padding: 16px 22px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    border-top: 1px solid #edf2ea;
    background: #ffffff;
}

.app-modal-button {
    min-width: 120px;
    height: 44px;
    padding: 0 22px;
    border: 0;
    border-radius: 14px;
    background: #58bf17;
    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(88, 191, 23, .26);
    transition: background-color .15s ease, transform .15s ease;
}

    .app-modal-button:hover {
        background: #4fac12;
    }

    .app-modal-button:active {
        transform: scale(.98);
    }


/* Mobile */
@media (max-width: 640px) {
    .app-modal-backdrop {
        padding: 12px;
        align-items: flex-end;
    }

    .app-modal {
        width: 100%;
        max-height: 92dvh;
        border-radius: 22px 22px 18px 18px;
    }

    .app-modal-header {
        min-height: 70px;
        padding: 16px;
    }

    .app-modal-title {
        font-size: 20px;
        gap: 10px;
    }

    .app-modal-title-icon {
        width: 40px;
        height: 40px;
    }

        .app-modal-title-icon i {
            font-size: 20px;
        }

    .app-modal-close {
        width: 40px;
        height: 40px;
        border-radius: 13px;
    }

    .app-modal-body {
        padding: 18px 16px;
    }

    .app-modal-footer {
        padding: 14px 16px 16px;
    }

    .app-modal-button {
        width: 100%;
    }
}
