/*
 * Administrator edit-modal standard.
 * Keep the header and footer fixed while only the form body scrolls.
 */
.admin-modal-shell {
    display: flex;
    flex-direction: column;
    width: min(100%, 920px);
    max-height: min(90vh, 920px);
    overflow: hidden;
    border: 1px solid #dbe4ef;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
}

.admin-modal-shell > .admin-modal-header,
.admin-modal-shell > .admin-modal-footer {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
}

.admin-modal-shell > .admin-modal-header {
    padding: 20px 24px 18px;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 12px 24px rgba(148, 163, 184, 0.1);
}

.admin-modal-shell > .admin-modal-header h3 {
    margin: 0;
    color: #0f172a;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.admin-modal-shell > .admin-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    padding: 24px;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 22%, #ffffff 100%);
}

.admin-modal-shell > .admin-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 18px 24px;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -12px 24px rgba(148, 163, 184, 0.12);
}

.admin-modal-shell > .admin-modal-header .modal-close,
.admin-modal-shell > .admin-modal-header .services-modal-close {
    flex: 0 0 auto;
}

.admin-modal-shell > .admin-modal-footer .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 112px;
    min-height: 42px;
    height: 42px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.admin-modal-shell > .admin-modal-footer .btn:disabled {
    cursor: not-allowed;
    opacity: 0.56;
}

.admin-modal-shell > .admin-modal-footer .btn.btn-primary {
    border-color: #2563eb;
    background: #2563eb;
    color: #ffffff;
}

.admin-modal-shell > .admin-modal-footer .btn.btn-primary:hover:not(:disabled) {
    border-color: #1d4ed8;
    background: #1d4ed8;
}

.admin-modal-shell > .admin-modal-footer .btn.btn-secondary {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.admin-modal-shell > .admin-modal-footer .btn.btn-secondary:hover:not(:disabled) {
    border-color: #93c5fd;
    background: #dbeafe;
}

.admin-modal-shell > .admin-modal-footer .btn.btn-success {
    border-color: #86efac;
    background: #dcfce7;
    color: #15803d;
}

.admin-modal-shell > .admin-modal-footer .btn.btn-success:hover:not(:disabled) {
    border-color: #4ade80;
    background: #bbf7d0;
}

.admin-modal-shell > .admin-modal-footer .btn.btn-danger {
    border-color: #fecaca;
    background: #fee2e2;
    color: #b91c1c;
}

.admin-modal-shell > .admin-modal-footer .btn.btn-danger:hover:not(:disabled) {
    border-color: #fca5a5;
    background: #fecaca;
}

.admin-modal-shell > .admin-modal-footer .btn.btn-warning {
    border-color: #fcd34d;
    background: #fef3c7;
    color: #b45309;
}

.admin-modal-shell > .admin-modal-footer .btn.btn-warning:hover:not(:disabled) {
    border-color: #fbbf24;
    background: #fde68a;
}

@media (max-width: 720px) {
    .admin-modal-shell {
        width: min(100%, calc(100vw - 24px));
        max-height: calc(100vh - 24px);
        border-radius: 14px;
    }

    .admin-modal-shell > .admin-modal-header,
    .admin-modal-shell > .admin-modal-body,
    .admin-modal-shell > .admin-modal-footer {
        padding-left: 16px;
        padding-right: 16px;
    }

    .admin-modal-shell > .admin-modal-footer {
        flex-wrap: wrap;
    }

    .admin-modal-shell > .admin-modal-footer .btn {
        /* 세로 푸터를 사용하는 화면에서도 140px flex-basis가 버튼 높이로
           전환되지 않도록 표준 42px 높이를 유지한다. */
        flex: 0 0 auto;
    }
}
