.annotate-row {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    width: 100%;
    padding: 10px 12px;
    border-radius: var(--radius-lg);
    transition: background var(--transition-fast);
}

.annotate-item-wrap:not(.active) .annotate-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.annotate-item-wrap.active {
    padding-bottom: 0;
    background: rgba(59, 130, 246, 0.08);
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.32);
}

.annotate-item-wrap.active .tool-icon {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    border-color: rgba(59, 130, 246, 0.45);
}

.annotate-item-wrap.is-applied {
    opacity: 0.62;
}

.annotate-item-wrap.is-applied.active {
    background: transparent;
}

.annotate-item-wrap.is-applied .annotate-row:hover {
    background: transparent;
}

.annotate-item-wrap.is-applied .tool-icon {
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent-green);
    border-color: rgba(16, 185, 129, 0.28);
}

.annotate-check-icon {
    display: inline-flex;
    width: 20px;
    height: 20px;
}

.annotate-check-icon svg {
    width: 20px;
    height: 20px;
}

.annotate-applied-text {
    margin: 0;
    font-size: var(--font-size-sm);
    font-weight: 400;
    line-height: 1.4;
    color: var(--text-muted);
    text-decoration: line-through;
    text-decoration-color: rgba(255, 255, 255, 0.28);
}

.annotate-pin-icon {
    font-family: var(--font-family);
}

.annotate-pin-num {
    font-size: var(--font-size-base);
    font-weight: 600;
    line-height: 1;
}

.annotate-item-wrap .tool-info {
    flex: 1;
    min-width: 0;
    justify-content: flex-start;
}

.annotate-input {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 22px;
    max-height: 120px;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--text-light);
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    font-weight: 400;
    line-height: 1.4;
    resize: none;
    overflow-y: auto;
    field-sizing: content;
}

.annotate-input::placeholder {
    color: var(--text-muted);
}

.annotate-input:focus {
    outline: none;
}

.annotate-item-wrap.active .annotate-input {
    color: var(--text-light);
}

.annotate-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    align-self: center;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    opacity: 0.5;
    transition:
        color var(--transition-fast),
        background var(--transition-fast),
        opacity var(--transition-fast);
}

.annotate-item-wrap:hover .annotate-delete,
.annotate-item-wrap.active .annotate-delete {
    opacity: 1;
}

.annotate-delete:hover {
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.08);
}

.annotate-delete .spectrum-icon {
    width: 18px;
    height: 18px;
}

.annotate-delete .spectrum-icon svg {
    width: 18px;
    height: 18px;
}

.annotate-footer {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    border-top: 1px solid var(--surface-border);
    padding-top: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
}

.annotate-limit-msg {
    margin: 0;
    font-size: var(--font-size-xs);
    line-height: 1.4;
    color: var(--text-light);
}

.annotation-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
}

.annotation-overlay.is-active {
    pointer-events: auto;
    cursor: crosshair;
}

.annotation-overlay.is-active .annotation-pin {
    cursor: pointer;
}

.annotation-pins {
    position: absolute;
    inset: 0;
}

.annotation-pin {
    position: absolute;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    padding: 0;
    background: none;
    cursor: pointer;
    pointer-events: auto;
}

.annotation-pin-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1.5px solid rgba(59, 130, 246, 0.45);
    background: var(--accent-blue);
    color: #e0f2fe;
    font-size: 10px;
    font-weight: 600;
    font-family: var(--font-family);
    line-height: 1;
    box-shadow:
        0 1px 4px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(0, 0, 0, 0.2);
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        background var(--transition-fast);
}

.annotation-pin.active .annotation-pin-marker {
    transform: scale(1.1);
    background: var(--accent-blue-hover);
    border-color: rgba(147, 197, 253, 0.65);
    box-shadow:
        0 0 0 2px rgba(59, 130, 246, 0.45),
        0 2px 8px rgba(0, 0, 0, 0.4);
}

.annotation-pin:hover .annotation-pin-marker {
    transform: scale(1.06);
    background: var(--accent-blue-hover);
}

.annotation-pin.is-applied {
    opacity: 0.45;
    pointer-events: none;
}

.annotation-pin-marker--applied {
    width: 14px;
    height: 14px;
    border-width: 1px;
    background: rgba(59, 130, 246, 0.25);
    border-color: rgba(59, 130, 246, 0.35);
    box-shadow: none;
}

