/* Chapter Notes Styles */
.td-chapter-note {
    border-bottom: 1.5px dashed #38bdf8;
    color: inherit;
    cursor: pointer;
    position: relative;
    display: inline;
    padding-bottom: 1px;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    border-radius: 2px;
}

.td-chapter-note:hover,
.td-chapter-note:focus,
.td-chapter-note.active {
    background-color: rgba(56, 189, 248, 0.12);
    border-bottom-style: solid;
    border-bottom-color: #0284c7;
    outline: none;
}

/* Note Popup Card */
.td-note-popup {
    position: fixed;
    z-index: 100000;
    width: max-content;
    max-width: 360px;
    min-width: 200px;
    background: #18181b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
    color: #f1f5f9;
    font-size: 14px;
    line-height: 1.5;
    opacity: 0;
    transform: translateY(6px) scale(0.97);
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.td-note-popup.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Header & Badge */
.td-note-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.td-note-popup-title {
    font-weight: 700;
    font-size: 16px;
    color: #ffffff;
    line-height: 1.3;
    word-break: break-word;
}

.td-note-popup-badge {
    display: inline-block;
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Info Description */
.td-note-popup-info {
    font-size: 13.5px;
    color: #cbd5e1;
    line-height: 1.5;
    word-break: break-word;
    margin-top: 4px;
}

/* Arrow indicator */
.td-note-popup-arrow {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #18181b;
    border-right: 1px solid #334155;
    border-bottom: 1px solid #334155;
    transform: rotate(45deg);
}

.td-note-popup-arrow.arrow-top {
    top: -6px;
    transform: rotate(-135deg);
}

.td-note-popup-arrow.arrow-bottom {
    bottom: -6px;
    transform: rotate(45deg);
}

/* Mobile Responsiveness */
@media (max-width: 576px) {
    .td-note-popup {
        max-width: calc(100vw - 32px);
    }
}
