/* Modal orchestrator styling for consistent iframe-based dialogs. */
.smart-modal .modal-dialog {
    margin: 40px auto;
}

.smart-modal .modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 16px 60px rgba(15, 23, 42, 0.28);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 40px);
    overflow: hidden;
}

.smart-modal__container {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 260px;
}

.smart-modal__header {
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    padding: 18px 24px;
}

.smart-modal__title {
    color: #111827;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.smart-modal__close {
    background: transparent;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    padding: 4px;
}

.smart-modal__close:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.smart-modal__body {
    background: #fff;
    flex: 1 1 auto;
    padding: 0;
    position: relative;
}

.smart-modal__body--padded {
    padding: 24px;
}

.smart-modal__iframe {
    border: 0;
    display: block;
    height: 100%;
    min-height: 420px;
    width: 100%;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.smart-modal__iframe.is-loaded {
    opacity: 1;
}

.smart-modal__custom {
    height: 100%;
    overflow: auto;
}

.smart-modal__loading {
    align-items: center;
    background: rgba(255, 255, 255, 0.85);
    bottom: 0;
    display: flex;
    justify-content: center;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    z-index: 2;
}

.smart-modal__footer {
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 16px 24px;
}

.smart-modal__footer .btn {
    min-width: 96px;
}

.smart-modal--size-sm .modal-dialog {
    max-width: 420px;
    width: calc(100vw - 32px);
}

.smart-modal--size-md .modal-dialog {
    max-width: 640px;
    width: calc(100vw - 48px);
}

.smart-modal--size-lg .modal-dialog {
    max-width: 860px;
    width: calc(100vw - 64px);
}

.smart-modal--size-xl .modal-dialog {
    max-width: 1040px;
    width: calc(100vw - 80px);
}

.smart-modal--size-full .modal-dialog,
.smart-modal--size-stretch .modal-dialog {
    height: 92vh;
    margin: 4vh auto;
    max-width: 96vw;
    width: 96vw;
}

.smart-modal--size-full .modal-content,
.smart-modal--size-stretch .modal-content {
    height: 100%;
    max-height: none;
}

.smart-modal--size-full .smart-modal__body,
.smart-modal--size-stretch .smart-modal__body {
    flex: 1 1 auto;
}

.smart-modal--size-full .smart-modal__iframe,
.smart-modal--size-stretch .smart-modal__iframe {
    min-height: 100%;
}

.smart-modal-backdrop {
    background: rgba(15, 23, 42, 0.72);
}

.smart-modal-backdrop.in {
    opacity: 1;
}
