/* =========================================================
   도움말 라벨 / 툴팁
========================================================= */

.labelWithHelp {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.helpWrap,
.uploadHelpWrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.uploadHelpWrap {
    overflow: visible;
}

/* helpIcon은 button 공통 스타일(width:100%, 노랑 배경) 무시 */
.helpIcon {
    all: unset;
    box-sizing: border-box;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;

    width: 24px !important;
    height: 24px !important;
    padding: 0 !important;

    border: 1px solid var(--line) !important;
    border-radius: 999px !important;

    background: var(--acc) !important;
    color: var(--muted) !important;

    font-size: 13px !important;
    font-weight: 900 !important;
    line-height: 24px !important;

    cursor: pointer !important;
    -webkit-tap-highlight-color: transparent;
}

.helpIcon:hover {
    border-color: var(--acc) !important;
    box-shadow: var(--focus-ring) !important;
    color: var(--txt) !important;
}

/* 기본 도움말 툴팁 */

.helpTooltip,
.uploadHelpTooltip {
    position: absolute;
    left: 0;

    display: none;

    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);

    background: #fff;
    color: var(--txt);

    font-size: 13px;
    line-height: 1.55;
}

.helpTooltip {
    top: 26px;
    width: min(320px, calc(100vw - 40px));
    z-index: 999;
}

.uploadHelpTooltip {
    top: calc(100% + 8px);

    width: max-content;
    min-width: 180px;
    max-width: min(320px, calc(100vw - 24px));

    white-space: normal;
    word-break: keep-all;

    z-index: 9999;
}

.helpTooltip.show,
.uploadHelpTooltip.show {
    display: block;
}

.helpTooltip::before,
.uploadHelpTooltip::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 10px;

    width: 10px;
    height: 10px;

    transform: rotate(45deg);

    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);

    background: #fff;
}

/* 정렬 옵션 */

.uploadHelpWrap.alignRight .uploadHelpTooltip {
    left: auto;
    right: 0;
}

.uploadHelpWrap.alignRight .uploadHelpTooltip::before {
    left: auto;
    right: 10px;
}

.uploadHelpWrap.alignCenter .uploadHelpTooltip {
    left: 50%;
    transform: translateX(-50%);
}

.uploadHelpWrap.alignCenter .uploadHelpTooltip::before {
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
}

/* 내부 요소 */

.helpTooltip b {
    font-weight: 900;
}

.helpTooltip .muted {
    color: var(--muted);
}

.helpTooltip .hr {
    height: 1px;
    margin: 8px 0;
    background: var(--line);
}

.uploadHelpIcon {
    background: #fff4d6 !important;
    border-color: #f0c14b !important;
    color: #8a5a00 !important;
    box-shadow: 0 2px 8px rgba(240, 193, 75, 0.18);
}
