.alla-modal[hidden] {
    display: none !important;
}

.alla-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.alla-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.alla-modal-panel {
    position: relative;
    z-index: 1;
    width: min(520px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    background: var(--alla-surface);
    border: 1px solid var(--alla-border);
    border-radius: 0.75rem;
    padding: 1.25rem;
    box-shadow: var(--alla-shadow);
}

.alla-modal-panel--wide {
    width: min(720px, 100%);
}

.alla-modal-panel--preview {
    width: min(960px, 96vw);
    max-height: 92vh;
    padding: 0.85rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.alla-modal-panel--preview .alla-modal-header-bar {
    flex-shrink: 0;
    margin-bottom: 0.65rem;
}

.alla-pedido-preview-body {
    flex: 1 1 auto;
    min-height: 0;
    border: 1px solid var(--alla-border);
    border-radius: 0.5rem;
    overflow: hidden;
    background: #f1f5f9;
}

.alla-pedido-preview-frame {
    display: block;
    width: 100%;
    height: min(72vh, 720px);
    border: none;
    background: #fff;
}

.alla-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: transparent;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--alla-text-muted);
    line-height: 1;
}

.alla-modal-title {
    margin: 0 0 0.35rem;
    font-size: 1.1rem;
}

.alla-modal-sub {
    margin: 0 0 1rem;
    font-size: 0.85rem;
    color: var(--alla-text-muted);
}

.alla-modal-sub--wrap {
    white-space: normal;
    line-height: 1.5;
}

.alla-modal-sub strong {
    color: var(--alla-text);
    font-weight: 600;
}

.alla-confirm-message {
    margin: 0 0 1rem;
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--alla-text-muted);
}

.alla-confirm-actions {
    margin-top: 0;
}

body.alla-modal-open {
    overflow: hidden;
}
