/**
 * Tooltip Component Styles
 *
 * Shared styles for tooltip elements (instruction boxes, hotspots, navigation).
 * Used in both recording editor and demo viewer.
 */

/* Focus Indicator (Hotspot) */
.focus-indicator {
    position: absolute;
    width: 24px;
    height: 24px;
    background: var(--color-primary);
    border: 2px solid var(--color-primary);
    border-radius: 50%;
    cursor: move;
    pointer-events: all;
    z-index: 10;
    /* Smooth transitions for navigation */
    transition: all var(--transition-navigation);
    /* Performance optimization: hint browser to optimize left/top changes during drag */
    will-change: left, top;
    /* Darker border via filter */
    filter: brightness(1);
}

/* Hotspot Hover Effect */
.focus-indicator:hover {
    transform: scale(1.2);
    filter: brightness(1.1);
}

/* View mode: disable cursor move on hotspot */
.focus-indicator.view-mode {
    cursor: default;
}

/* Instruction Box (Tooltip/Callout) */
.instruction-box {
    position: absolute;
    background: var(--color-primary);
    color: var(--color-white);
    padding: 20px 24px;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 16px rgba(108, 99, 255, 0.25);
    min-width: 280px;
    max-width: 400px;
    font-size: var(--font-size-heading);
    font-weight: var(--font-weight-medium);
    line-height: 1.5;
    z-index: 15;
    display: flex;
    flex-direction: column;
    pointer-events: all;
    top: 300px;
    left: 400px;
    transition: all var(--transition-navigation); /* Smooth navigation transitions */
}

.instruction-box:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(108, 99, 255, 0.35);
}

/* View mode: disable cursor move and hover effect on tooltip */
.instruction-box.view-mode {
    cursor: default;
}

.instruction-box.view-mode:hover {
    transform: none;
    box-shadow: 0 4px 16px rgba(108, 99, 255, 0.25);
}

/* Instruction Content */
.instruction-content {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.instruction-text {
    flex: 1;
}

/* Edit Link (Edit Mode Only) */
.instruction-edit-link {
    color: var(--color-white);
    font-size: var(--font-size-body);
    text-decoration: underline;
    cursor: pointer;
    align-self: flex-start;
}

.instruction-edit-link:hover {
    text-decoration: none;
}

/* Navigation Footer (View Mode Only) */
.instruction-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
    margin-top: var(--spacing-sm);
}

.instruction-nav-buttons {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
}

/* Step Counter (View Mode) */
.step-counter {
    color: var(--color-white);
    font-size: var(--font-size-body);
    font-weight: var(--font-weight-medium);
    white-space: nowrap;
}

/* Navigation Buttons */
.nav-button {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-navigation);
    flex-shrink: 0;
    color: var(--color-white);
    font-size: 16px;
    font-weight: bold;
}

.nav-button:hover:not([aria-disabled="true"]) {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.nav-button:active:not([aria-disabled="true"]) {
    transform: scale(0.95);
}

.nav-button[aria-disabled="true"] {
    opacity: 0.3;
    cursor: not-allowed;
}

.nav-button:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

/* Forward Arrow Button (Legacy - may be deprecated) */
.forward-arrow-button {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--transition-base);
    flex-shrink: 0;
}

.forward-arrow-button:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Responsive adjustments for mobile */
@media (max-width: 767px) {
    .instruction-box {
        min-width: 240px;
        max-width: 320px;
        padding: 16px 20px;
        font-size: 14px;
    }

    .nav-button {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .step-counter {
        font-size: 13px;
    }
}
