/* tooltip.css */

.tooltip-container {
    position: relative;
    display: inline-block;
    margin-left: 5px;
    cursor: help;
    vertical-align: middle;
}

/* 🌟 아이콘 디자인 변경: 연한 배경, 부드러운 회색 둥근 테두리, 기울임 폰트 */
.tooltip-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #f1f5fc; /* 불러오기 버튼과 같은 연한 색 */
    color: #64748b; /* 부드러운 회색 */
    border: 1px solid #cbd5e1;
    font-size: 11px;
    font-weight: 900;
    font-family: 'Georgia', serif; /* 예쁜 i 모양을 위해 */
    font-style: italic;
}

.tooltip-text {
    visibility: hidden;
    width: max-content;
    max-width: 220px;
    background-color: #334155;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px 12px;
    position: absolute;
    z-index: 9999;
    bottom: 130%; /* 위로 뜨기 */
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
    font-weight: 500;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    white-space: normal;
    line-height: 1.4;
}

.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #334155 transparent transparent transparent;
}

.tooltip-container:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* 🌟 [추가] 아래로 열리는 툴팁 클래스 (화면 상단 가림 방지) */
.tooltip-down .tooltip-text {
    bottom: auto;
    top: 130%;
}
.tooltip-down .tooltip-text::after {
    top: auto;
    bottom: 100%;
    border-color: transparent transparent #334155 transparent;
}

/* 🌟 [추가] 우측 가장자리에 위치해 툴팁이 화면 오른쪽으로 삐져나가 잘리는 것을 방지 */
.tooltip-right-edge .tooltip-text {
    left: auto;
    right: -10px;
    transform: none;
}
.tooltip-right-edge .tooltip-text::after {
    left: auto;
    right: 14px;
    margin-left: 0;
}