/* NkfDialog — standard NKF popup (design B1: everything centred, no logo).
   See public/theme/assets/js/nkf-dialog.js for usage. */

:root {
    --nkf-dialog-brand: #d10a45;
    --nkf-dialog-brand-hover: #b0083a;
    --nkf-dialog-title: #2f2b3d;
    --nkf-dialog-text: #5d596c;
    --nkf-dialog-border: #dbdade;
}

.swal2-container .swal2-popup.nkf-dialog {
    max-width: calc(100vw - 32px);
    padding: 0;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(47, 43, 61, 0.28);
    text-align: center;
    font-family: inherit;
    overflow: hidden;
}

.swal2-container .swal2-popup.nkf-dialog .nkf-dialog__content {
    margin: 0;
    padding: 0;
    text-align: center;
    overflow: visible;
}

/* Icon, title and message, stacked and centred. */
.nkf-dialog__body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 32px 40px 24px;
}

.nkf-dialog__icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nkf-dialog__icon svg {
    width: 28px;
    height: 28px;
}

.nkf-dialog__icon--confirm,
.nkf-dialog__icon--warning { background: #fff0e1; color: #b35f00; }
.nkf-dialog__icon--danger,
.nkf-dialog__icon--error   { background: #fdeaea; color: #c62828; }
.nkf-dialog__icon--success { background: #e3f6ea; color: #1b7a43; }
.nkf-dialog__icon--info    { background: #e0f4f8; color: #00708a; }

.nkf-dialog__text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-width: 0;
}

.swal2-container .swal2-popup.nkf-dialog .nkf-dialog__title {
    margin: 4px 0 0;
    padding: 0;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--nkf-dialog-title);
}

.nkf-dialog__message {
    width: 100%;
    font-size: 15px;
    line-height: 1.5;
    color: var(--nkf-dialog-text);
    white-space: pre-line;
    overflow-wrap: anywhere;
}

/* Detailed bodies (summary rows, warning boxes) read left-to-right, so they stay
   left-aligned inside the centred popup. */
.nkf-dialog__message dl,
.nkf-dialog__message .alert,
.nkf-dialog__message table,
.nkf-dialog__message ul,
.nkf-dialog__message ol {
    text-align: left;
}

/* Buttons, centred. */
.swal2-container .swal2-popup.nkf-dialog .nkf-dialog__actions {
    width: 100%;
    margin: 0;
    padding: 0 24px 28px;
    box-sizing: border-box;
    justify-content: center;
    gap: 12px;
}

.nkf-dialog__btn {
    min-width: 120px;
    height: 44px;
    margin: 0;
    padding: 0 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.nkf-dialog__btn:focus-visible {
    outline: 2px solid var(--nkf-dialog-brand);
    outline-offset: 2px;
}

.nkf-dialog__btn--primary {
    border: 0;
    background: var(--nkf-dialog-brand);
    color: #ffffff;
}

.nkf-dialog__btn--primary:hover {
    background: var(--nkf-dialog-brand-hover);
}

.nkf-dialog__btn--secondary {
    border: 1px solid var(--nkf-dialog-brand);
    background: transparent;
    color: var(--nkf-dialog-brand);
}

.nkf-dialog__btn--secondary:hover {
    background: rgba(209, 10, 69, 0.06);
}

/* ✕ alone in the top-right corner. */
.swal2-container .swal2-popup.nkf-dialog .nkf-dialog__close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    margin: 0;
    border-radius: 8px;
    color: #6d6b77;
    font-size: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
}

.swal2-container .swal2-popup.nkf-dialog .nkf-dialog__close:hover {
    color: var(--nkf-dialog-title);
    background: #f3f2f5;
}

/* A field under the message (input / textarea): full width, label and text left-aligned
   (centred text is hard to type into), the error right under it. */
.swal2-container .swal2-popup.nkf-dialog .nkf-dialog__input-label {
    justify-content: flex-start;
    margin: -8px 40px 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--nkf-dialog-title);
    text-align: left;
}

.swal2-container .swal2-popup.nkf-dialog .nkf-dialog__input {
    width: auto;
    max-width: none;
    margin: 0 40px 24px;
    padding: 10px 12px;
    border: 1px solid var(--nkf-dialog-border);
    border-radius: 8px;
    box-shadow: none;
    font-size: 15px;
    color: var(--nkf-dialog-title);
    text-align: left;
}

.swal2-container .swal2-popup.nkf-dialog .nkf-dialog__input:focus {
    border-color: var(--nkf-dialog-brand);
    box-shadow: 0 0 0 3px rgba(209, 10, 69, 0.15);
    outline: none;
}

.swal2-container .swal2-popup.nkf-dialog .nkf-dialog__validation {
    justify-content: flex-start;
    margin: -16px 40px 20px;
    padding: 0;
    background: transparent;
    color: #c62828;
    font-size: 14px;
    text-align: left;
}

.swal2-container .swal2-popup.nkf-dialog .nkf-dialog__validation::before {
    display: none;
}

.swal2-container .swal2-popup.nkf-dialog .swal2-timer-progress-bar {
    background: var(--nkf-dialog-brand);
    opacity: 0.5;
}

@media (max-width: 480px) {
    .nkf-dialog__body {
        padding: 28px 20px 20px;
    }

    .swal2-container .swal2-popup.nkf-dialog .nkf-dialog__actions {
        padding: 0 20px 20px;
    }

    .swal2-container .swal2-popup.nkf-dialog .nkf-dialog__input-label,
    .swal2-container .swal2-popup.nkf-dialog .nkf-dialog__input,
    .swal2-container .swal2-popup.nkf-dialog .nkf-dialog__validation {
        margin-left: 20px;
        margin-right: 20px;
    }

    .nkf-dialog__btn {
        flex: 1 1 0;
        min-width: 0;
    }
}
