.izf-popover,
.izf-popover *,
.izf-dialog,
.izf-dialog * {
    box-sizing: border-box;
}

.izf-popover,
.izf-dialog {
    --izf-ink: #171717;
    --izf-muted: #687181;
    --izf-line: #dfe4ea;
    --izf-line-strong: #c7d0da;
    --izf-soft: #f5f7fa;
    --izf-blue: #2457d6;
    --izf-yellow: #ffdd2d;
    --izf-danger: #b42318;
    color: var(--izf-ink);
    font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.izf-popover {
    position: fixed;
    z-index: 12400;
    width: 264px;
    overflow: hidden;
    border: 1px solid var(--izf-line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 14px 36px rgba(15, 23, 42, .16);
}

.izf-profile {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 11px;
    padding: 14px;
    border-bottom: 1px solid var(--izf-line);
}

.izf-avatar {
    display: inline-grid;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    place-items: center;
    overflow: hidden;
    border: 1px solid #ead47a;
    border-radius: 50%;
    color: #3a3210;
    background: #fff5bd;
    font-size: 16px;
    font-weight: 750;
    line-height: 1;
}

.izf-avatar-small {
    width: 36px;
    height: 36px;
    font-size: 14px;
}

.izf-profile-name {
    min-width: 0;
    overflow: hidden;
    font-size: 15px;
    font-weight: 720;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.izf-menu-action {
    display: flex;
    width: 100%;
    min-height: 46px;
    align-items: center;
    padding: 10px 14px;
    border: 0;
    color: var(--izf-ink);
    background: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 680;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.izf-menu-action::before {
    width: 20px;
    height: 20px;
    margin-right: 9px;
    border: 1.5px solid currentColor;
    border-radius: 50%;
    content: "+";
    font-size: 17px;
    font-weight: 500;
    line-height: 17px;
    text-align: center;
}

.izf-menu-action:hover {
    background: var(--izf-soft);
}

.izf-menu-action:focus-visible,
.izf-dialog button:focus-visible,
.izf-dialog input:focus-visible,
.izf-dialog a:focus-visible {
    outline: 2px solid var(--izf-blue);
    outline-offset: -2px;
}

.izf-dialog {
    width: min(430px, calc(100% - 32px));
    max-width: 430px;
    max-height: min(680px, calc(100dvh - 32px));
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--izf-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 22px 64px rgba(15, 23, 42, .22);
}

.izf-dialog:not([open]) {
    display: none;
}

.izf-dialog[open] {
    display: flex;
    flex-direction: column;
}

.izf-dialog::backdrop {
    background: rgba(18, 24, 32, .46);
}

.izf-dialog-head {
    display: flex;
    min-height: 62px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 10px 9px 18px;
    border-bottom: 1px solid var(--izf-line);
}

.izf-dialog-title {
    min-width: 0;
    margin: 0;
    font-size: 19px;
    font-weight: 760;
    letter-spacing: -.035em;
    line-height: 1.35;
}

.izf-icon-button {
    position: relative;
    display: inline-grid;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    place-items: center;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 8px;
    color: transparent;
    background: transparent;
    font: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.izf-icon-button::before,
.izf-icon-button::after {
    position: absolute;
    width: 18px;
    height: 1.5px;
    background: var(--izf-ink);
    content: "";
}

.izf-icon-button::before {
    transform: rotate(45deg);
}

.izf-icon-button::after {
    transform: rotate(-45deg);
}

.izf-icon-button:hover {
    background: var(--izf-soft);
}

.izf-dialog-body {
    min-height: 170px;
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 20px 18px;
    overscroll-behavior: contain;
}

.izf-person-card {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--izf-line);
    border-radius: 10px;
    background: #fff;
}

.izf-person-copy,
.izf-choice-copy {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
}

.izf-person-copy strong,
.izf-choice-copy strong {
    overflow: hidden;
    color: var(--izf-ink);
    font-size: 15px;
    font-weight: 720;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.izf-person-copy span,
.izf-choice-copy small {
    margin-top: 3px;
    overflow: hidden;
    color: var(--izf-muted);
    font-size: 12px;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.izf-confirm-copy {
    margin: 15px 1px 0;
    color: var(--izf-muted);
    font-size: 13px;
    line-height: 1.65;
}

.izf-choice-intro {
    margin: 0 0 13px;
    color: var(--izf-muted);
    font-size: 13px;
    line-height: 1.6;
}

.izf-choice-list {
    display: grid;
    gap: 8px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.izf-choice {
    display: flex;
    min-height: 58px;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    border: 1px solid var(--izf-line);
    border-radius: 9px;
    background: #fff;
    cursor: pointer;
}

.izf-choice:hover {
    border-color: var(--izf-line-strong);
    background: var(--izf-soft);
}

.izf-choice:has(.izf-choice-radio:checked) {
    border-color: #b38b00;
    background: #fffbed;
}

.izf-choice-radio {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    margin: 0;
    accent-color: #171717;
}

.izf-choice-status {
    min-height: 48px;
    margin-top: 12px;
    padding: 11px 12px;
    border-left: 3px solid var(--izf-line-strong);
    color: var(--izf-muted);
    background: var(--izf-soft);
    font-size: 12px;
    line-height: 1.55;
}

.izf-choice-status-title,
.izf-choice-status-copy {
    display: block;
}

.izf-choice-status-title {
    color: var(--izf-ink);
    font-size: 13px;
}

.izf-choice-status-copy {
    margin-top: 3px;
}

.izf-state {
    display: flex;
    min-height: 150px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--izf-muted);
    text-align: center;
}

.izf-state-title {
    color: var(--izf-ink);
    font-size: 16px;
    line-height: 1.45;
}

.izf-state-copy {
    max-width: 320px;
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.6;
}

.izf-state-error .izf-state-title {
    color: var(--izf-danger);
}

.izf-spinner {
    width: 26px;
    height: 26px;
    margin-bottom: 14px;
    border: 3px solid #e5e9ee;
    border-top-color: var(--izf-ink);
    border-radius: 50%;
    animation: izf-spin .75s linear infinite;
}

.izf-dialog-foot {
    display: flex;
    min-height: 69px;
    flex: 0 0 auto;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 14px;
    border-top: 1px solid var(--izf-line);
    background: #fff;
}

.izf-button {
    display: inline-flex;
    min-width: 88px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    border-radius: 8px;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.izf-button[hidden] {
    display: none;
}

.izf-button-secondary {
    border: 1px solid var(--izf-line-strong);
    color: var(--izf-ink);
    background: #fff;
}

.izf-button-primary {
    border: 1px solid var(--izf-ink);
    color: var(--izf-ink);
    background: var(--izf-yellow);
}

.izf-button-secondary:hover {
    background: var(--izf-soft);
}

.izf-button-primary:hover {
    background: #ffd31a;
}

.izf-button:disabled,
.izf-icon-button:disabled {
    cursor: not-allowed;
    opacity: .5;
}

.izf-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@keyframes izf-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 480px) {
    .izf-popover {
        width: min(264px, calc(100vw - 16px));
    }

    .izf-dialog {
        width: calc(100% - 24px);
        max-height: calc(100dvh - 24px);
        border-radius: 12px;
    }

    .izf-dialog-body {
        padding: 18px 14px;
    }

    .izf-dialog-foot {
        padding: 10px 12px max(10px, env(safe-area-inset-bottom));
    }

    .izf-button {
        min-width: 0;
        flex: 1 1 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .izf-spinner {
        animation: none;
    }
}

@media (forced-colors: active) {
    .izf-avatar,
    .izf-choice:has(.izf-choice-radio:checked),
    .izf-button-primary {
        border-color: ButtonText;
    }

    .izf-menu-action:focus-visible,
    .izf-dialog button:focus-visible,
    .izf-dialog input:focus-visible,
    .izf-dialog a:focus-visible {
        outline-color: Highlight;
    }
}
