/**
 * Visual Notes Frontend Styles
 *
 * @package HD_SEO
 */

/* Floating Toggle Button */
#hd-seo-qa-toggle {
    position: fixed !important;
    bottom: 24px;
    right: 24px;
    z-index: 999998 !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 16px;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer !important;
    box-shadow:
        0 8px 24px rgba(102, 126, 234, 0.4),
        0 4px 12px rgba(118, 75, 162, 0.3),
        0 2px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex !important;
    align-items: center;
    gap: 10px;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: auto !important;
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    visibility: visible !important;
    opacity: 1 !important;
    overflow: hidden;
    position: relative;
}

#hd-seo-qa-toggle::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

#hd-seo-qa-toggle:hover::before {
    left: 100%;
}

#hd-seo-qa-toggle:active {
    cursor: pointer !important;
    transform: scale(0.98);
}

#hd-seo-qa-toggle:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    box-shadow:
        0 12px 32px rgba(102, 126, 234, 0.5),
        0 6px 16px rgba(118, 75, 162, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px) scale(1.02);
}

#hd-seo-qa-toggle.active {
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    box-shadow:
        0 8px 24px rgba(244, 63, 94, 0.4),
        0 4px 12px rgba(225, 29, 72, 0.3),
        0 2px 6px rgba(0, 0, 0, 0.1);
    animation: pulse-active 2s ease-in-out infinite;
}

#hd-seo-qa-toggle.active::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

#hd-seo-qa-toggle.active:hover {
    background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
    box-shadow:
        0 12px 32px rgba(244, 63, 94, 0.5),
        0 6px 16px rgba(225, 29, 72, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px) scale(1.02);
}

/* Active QA mode launcher */
#hd-seo-qa-toggle.active {
    cursor: pointer !important;
}

#hd-seo-qa-toggle.active:active {
    cursor: pointer !important;
    animation: none;
}

#hd-seo-qa-toggle.hd-seo-qa-toggle-menu-open {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: scale(0.96);
}

body.hd-seo-qa-animations-disabled .hidden-hd,
body.hd-seo-qa-animations-disabled [class*="hidden-hd-"] {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
}

@keyframes pulse-active {
    0%,
    100% {
        box-shadow:
            0 8px 24px rgba(244, 63, 94, 0.4),
            0 4px 12px rgba(225, 29, 72, 0.3),
            0 2px 6px rgba(0, 0, 0, 0.1);
    }
    50% {
        box-shadow:
            0 8px 28px rgba(244, 63, 94, 0.5),
            0 4px 14px rgba(225, 29, 72, 0.4),
            0 2px 8px rgba(0, 0, 0, 0.15);
    }
}

.hd-seo-qa-toggle-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hd-seo-qa-toggle-icon {
    width: 20px;
    height: 20px;
    display: block;
    color: white;
    fill: currentColor;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.hd-seo-qa-toggle-text {
    white-space: nowrap;
    font-weight: 600;
    letter-spacing: 0.3px;
}

#hd-seo-qa-toggle:hover .hd-seo-qa-toggle-icon {
    transform: scale(1.1) rotate(5deg);
}

#hd-seo-qa-toggle.active .hd-seo-qa-toggle-icon {
    animation: icon-bounce 1.5s ease-in-out infinite;
}

#hd-seo-qa-toggle.active .hd-seo-qa-toggle-icon-wrapper {
    animation: icon-bounce 1.5s ease-in-out infinite;
}

@keyframes icon-bounce {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15) rotate(-10deg);
    }
}

@media (max-width: 640px) {
    .hd-seo-qa-toggle-icon {
        width: 18px;
        height: 18px;
    }

    .hd-seo-qa-toggle-text {
        font-size: 13px;
    }
}

/* Dropdown Menu */
.hd-seo-qa-dropdown {
    position: fixed;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 999999;
}

.hd-seo-qa-dropdown-show {
    opacity: 1;
    background: rgba(2, 6, 23, 0.16);
}

.hd-seo-qa-dropdown-panel,
.hd-seo-qa-dropdown-side-actions {
    position: fixed;
    pointer-events: auto;
}

.hd-seo-qa-dropdown-panel {
    min-width: 300px;
    max-width: 320px;
    height: fit-content;
    overflow: auto;
    border-radius: 16px;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: linear-gradient(180deg, #081325 0%, #1c2a3e 100%);
    box-shadow:
        0 22px 54px rgba(2, 6, 23, 0.34),
        0 8px 18px rgba(15, 23, 42, 0.2);
    color: #f8fafc;
}

.hd-seo-qa-dropdown-header {
    padding: 18px 20px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: rgba(2, 6, 23, 0.16);
}

.hd-seo-qa-dropdown-header-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    align-items: flex-start;
}

.hd-seo-qa-see-all-btn {
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.36);
    border-radius: 10px;
    width: 42px;
    height: 42px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #cbd5e1;
    flex-shrink: 0;
    padding: 0;
}

.hd-seo-qa-see-all-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(148, 163, 184, 0.56);
    color: #ffffff;
}

.hd-seo-qa-dropdown-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
}

.hd-seo-qa-dropdown-total {
    font-size: 14px;
    font-weight: 500;
    color: #cbd5e1;
    background: rgba(148, 163, 184, 0.18);
    padding: 7px 12px;
    border-radius: 14px;
}

.hd-seo-qa-dropdown-stats {
    padding: 16px 20px 12px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.hd-seo-qa-dropdown-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 102px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(3, 10, 24, 0.52);
    border: 1px solid rgba(148, 163, 184, 0.08);
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
    width: 100%;
    text-align: center;
    border-width: 1px;
    cursor: pointer;
}

.hd-seo-qa-dropdown-stat-item:hover {
    background: rgba(10, 18, 35, 0.72);
    border-color: rgba(148, 163, 184, 0.14);
    transform: translateY(-1px);
}

.hd-seo-qa-dropdown-stat-item:focus {
    outline: none;
    border-color: rgba(96, 165, 250, 0.54);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.16);
}

.hd-seo-qa-stat-badge {
    font-size: 35px;
    font-weight: 700;
    line-height: 1;
}

.hd-seo-qa-stat-open {
    color: #4f8dff;
}

.hd-seo-qa-stat-in-review {
    color: #facc15;
}

.hd-seo-qa-stat-not-completed {
    color: #ff4d5a;
}

.hd-seo-qa-stat-closed {
    color: #22e06f;
}

.hd-seo-qa-stat-label {
    font-size: 11px;
    font-weight: 500;
    color: #d1d5db;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hd-seo-qa-stat-detail {
    font-size: 10px;
    font-weight: 600;
    color: #7dd3fc;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hd-seo-qa-dropdown-divider {
    height: 1px;
    background: rgba(148, 163, 184, 0.18);
    margin: 0 20px;
}

.hd-seo-qa-dropdown-action {
    width: 100%;
    padding: 14px 20px;
    border: none;
    background: transparent;
    color: #e5e7eb;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition:
        background 0.2s ease,
        color 0.2s ease;
    text-align: left;
}

.hd-seo-qa-dropdown-action:hover {
    background: rgba(255, 255, 255, 0.04);
}

.hd-seo-qa-dropdown-action:active {
    background: rgba(255, 255, 255, 0.08);
}

.hd-seo-qa-snapshot-panel {
    margin: 14px 20px 20px;
    padding: 16px;
    border-radius: 14px;
    background: rgba(3, 10, 24, 0.52);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.hd-seo-qa-snapshot-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.hd-seo-qa-snapshot-panel-eyebrow {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hd-seo-qa-snapshot-panel-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    background: rgba(148, 163, 184, 0.14);
    color: #e2e8f0;
}

.hd-seo-qa-snapshot-panel-status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
}

.hd-seo-qa-snapshot-panel-status-ready {
    background: rgba(16, 185, 129, 0.18);
    color: #a7f3d0;
}

.hd-seo-qa-snapshot-panel-status-syncing,
.hd-seo-qa-snapshot-panel-status-loading {
    background: rgba(59, 130, 246, 0.16);
    color: #bfdbfe;
}

.hd-seo-qa-snapshot-panel-status-needs-sync {
    background: rgba(249, 115, 22, 0.18);
    color: #fdba74;
}

.hd-seo-qa-snapshot-panel-status-failed {
    background: rgba(239, 68, 68, 0.18);
    color: #fca5a5;
}

.hd-seo-qa-snapshot-panel-status-empty {
    background: rgba(148, 163, 184, 0.14);
    color: #cbd5e1;
}

.hd-seo-qa-snapshot-panel-meta {
    margin: 10px 0 0;
    color: #cbd5e1;
    font-size: 13px;
    line-height: 1.5;
}

.hd-seo-qa-snapshot-panel-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
}

.hd-seo-qa-snapshot-panel-btn {
    width: 100%;
    min-height: 44px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease;
}

.hd-seo-qa-snapshot-panel-btn:hover {
    transform: translateY(-1px);
}

.hd-seo-qa-snapshot-panel-btn:disabled {
    cursor: default;
    opacity: 0.72;
    transform: none;
}

.hd-seo-qa-snapshot-panel-btn-icon {
    font-size: 14px;
    line-height: 1;
}

.hd-seo-qa-snapshot-panel-btn-primary {
    background: linear-gradient(135deg, #0f766e 0%, #0f9f8f 100%);
    color: #ffffff;
    border-color: rgba(15, 159, 143, 0.36);
    box-shadow: 0 10px 20px rgba(15, 118, 110, 0.18);
}

.hd-seo-qa-snapshot-panel-btn-primary:hover {
    background: linear-gradient(135deg, #0d6c65 0%, #0c8f80 100%);
}

.hd-seo-qa-snapshot-panel-btn-needs-sync {
    background: linear-gradient(135deg, #d97706 0%, #ea580c 100%);
    border-color: rgba(234, 88, 12, 0.34);
    box-shadow: 0 10px 20px rgba(217, 119, 6, 0.18);
}

.hd-seo-qa-snapshot-panel-btn-failed {
    background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
    border-color: rgba(220, 38, 38, 0.34);
    box-shadow: 0 10px 20px rgba(185, 28, 28, 0.18);
}

.hd-seo-qa-snapshot-panel-btn-secondary {
    background: rgba(15, 23, 42, 0.22);
    color: #f8fafc;
}

.hd-seo-qa-snapshot-panel-btn-secondary:hover {
    background: rgba(30, 41, 59, 0.42);
    border-color: rgba(148, 163, 184, 0.3);
}

.hd-seo-qa-add-note-btn {
    color: #60a5fa;
    font-weight: 600;
}

.hd-seo-qa-add-note-btn:hover {
    color: #93c5fd;
}

.hd-seo-qa-dropdown-icon {
    font-size: 18px;
    line-height: 1;
}

.hd-seo-qa-dropdown-side-actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

.hd-seo-qa-side-action {
    min-width: 212px;
    min-height: 52px;
    padding: 12px 18px;
    border: none;
    border-radius: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    box-shadow:
        0 10px 26px rgba(102, 126, 234, 0.36),
        0 4px 12px rgba(118, 75, 162, 0.24);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.hd-seo-qa-side-action:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    box-shadow:
        0 14px 30px rgba(102, 126, 234, 0.42),
        0 6px 14px rgba(118, 75, 162, 0.28);
}

.hd-seo-qa-side-action:active {
    transform: translateY(0);
}

.hd-seo-qa-side-action-icon {
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
}

.hd-seo-qa-side-action-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.hd-seo-qa-side-action-label {
    display: block;
    width: 100%;
    line-height: 1.2;
}

.hd-seo-qa-side-action-meta {
    display: block;
    width: 100%;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0;
    opacity: 0.82;
    white-space: normal;
    line-height: 1.3;
}

.hd-seo-qa-side-action-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    flex-shrink: 0;
}

.hd-seo-qa-side-action:disabled {
    opacity: 0.72;
    cursor: wait;
    transform: none;
    box-shadow:
        0 8px 20px rgba(102, 126, 234, 0.26),
        0 4px 10px rgba(118, 75, 162, 0.18);
}

.hd-seo-qa-side-action:disabled:hover {
    transform: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.hd-seo-qa-side-action-open {
    background: linear-gradient(135deg, #0f766e 0%, #0f9f8f 100%);
    box-shadow:
        0 10px 26px rgba(15, 118, 110, 0.32),
        0 4px 12px rgba(15, 159, 143, 0.2);
}

.hd-seo-qa-side-action-open:hover {
    background: linear-gradient(135deg, #0d6c65 0%, #0c8f80 100%);
    box-shadow:
        0 14px 30px rgba(15, 118, 110, 0.38),
        0 6px 14px rgba(15, 159, 143, 0.24);
}

.hd-seo-qa-side-action-update {
    background: linear-gradient(135deg, #d97706 0%, #ea580c 100%);
    box-shadow:
        0 10px 26px rgba(217, 119, 6, 0.32),
        0 4px 12px rgba(234, 88, 12, 0.22);
}

.hd-seo-qa-side-action-update:hover {
    background: linear-gradient(135deg, #c66d04 0%, #d45109 100%);
    box-shadow:
        0 14px 30px rgba(217, 119, 6, 0.38),
        0 6px 14px rgba(234, 88, 12, 0.26);
}

@media (max-width: 900px) {
    .hd-seo-qa-dropdown-side-actions {
        gap: 12px;
    }

    .hd-seo-qa-side-action {
        min-width: 186px;
        padding: 0 16px;
    }
}

@media (max-width: 640px) {
    .hd-seo-qa-dropdown-panel {
        min-width: 280px;
        max-width: calc(100vw - 32px);
        overflow-y: auto;
    }

    .hd-seo-qa-dropdown-title {
        font-size: 26px;
    }

    .hd-seo-qa-dropdown-side-actions {
        flex-wrap: wrap;
        max-width: calc(100vw - 32px);
    }

    .hd-seo-qa-side-action {
        min-width: 0;
        width: 100%;
    }
}

/* QA Mode - Cursor Change */
body.hd-seo-qa-mode {
    cursor: crosshair !important;
}

body.hd-seo-qa-mode * {
    cursor: crosshair !important;
}

/* Exclude modal, toggle button, and pins from crosshair cursor */
body.hd-seo-qa-mode .hd-seo-qa-modal,
body.hd-seo-qa-mode .hd-seo-qa-modal *,
body.hd-seo-qa-mode #hd-seo-qa-toggle,
body.hd-seo-qa-mode #hd-seo-qa-toggle *,
body.hd-seo-qa-mode .hd-seo-qa-pin {
    cursor: default !important;
}

body.hd-seo-qa-mode .hd-seo-qa-modal button,
body.hd-seo-qa-mode .hd-seo-qa-modal input,
body.hd-seo-qa-mode .hd-seo-qa-modal textarea,
body.hd-seo-qa-mode .hd-seo-qa-modal select {
    cursor: pointer !important;
}

body.hd-seo-qa-mode .hd-seo-qa-pin {
    cursor: grab !important;
}

body.hd-seo-qa-mode .hd-seo-qa-selection-preview,
body.hd-seo-qa-mode .hd-seo-qa-selection-label {
    pointer-events: none !important;
}

/* Ensure body/html can contain absolutely positioned pins */
html,
body {
    position: relative;
}

/* Pins */
.hd-seo-qa-pin {
    position: absolute !important;
    width: 24px;
    height: 24px;
    border-radius: 50% 50% 50% 0;
    transform: translate(-50%, -50%) rotate(-45deg);
    cursor: grab !important;
    z-index: 999997 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.2s ease;
    border: 2px solid white;
    user-select: none;
    touch-action: none;
    pointer-events: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    animation: hd-seo-pin-pulse 2s ease-in-out infinite;
}

/* Pulse animation for pins - creates expanding glow effect */
@keyframes hd-seo-pin-pulse {
    0% {
        box-shadow:
            0 2px 4px rgba(0, 0, 0, 0.2),
            0 0 0 0 var(--pin-pulse-color, rgba(59, 130, 246, 0.6));
    }
    50% {
        box-shadow:
            0 2px 4px rgba(0, 0, 0, 0.2),
            0 0 0 12px var(--pin-pulse-color-fade, rgba(59, 130, 246, 0));
    }
    100% {
        box-shadow:
            0 2px 4px rgba(0, 0, 0, 0.2),
            0 0 0 0 var(--pin-pulse-color-fade, rgba(59, 130, 246, 0));
    }
}

/* Ripple effect using ::before pseudo-element - creates expanding circle */
.hd-seo-qa-pin::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    background: transparent;
    border: 2px solid var(--pin-color, currentColor);
    opacity: 0;
    animation: hd-seo-pin-ripple 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes hd-seo-pin-ripple {
    0% {
        transform: translate(-50%, -50%) rotate(45deg) scale(1);
        opacity: 0.7;
    }
    100% {
        transform: translate(-50%, -50%) rotate(45deg) scale(3);
        opacity: 0;
    }
}

.hd-seo-qa-pin:active {
    cursor: grabbing;
}

.hd-seo-qa-pin:hover {
    transform: translate(-50%, -50%) rotate(-45deg) scale(1.2);
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.3),
        0 0 0 4px rgba(59, 130, 246, 0.3);
    z-index: 999999;
    animation: none; /* Stop pulse on hover */
}

.hd-seo-qa-pin:hover::before {
    animation: none; /* Stop ripple on hover */
    opacity: 0;
}

.hd-seo-qa-pin-dragging {
    z-index: 1000000 !important;
    opacity: 0.8;
    transform: translate(-50%, -50%) rotate(-45deg) scale(1.3);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    cursor: grabbing !important;
    animation: none; /* Stop pulse when dragging */
}

.hd-seo-qa-pin-dragging::before {
    animation: none; /* Stop ripple when dragging */
}

.hd-seo-qa-pin::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 8px;
    height: 8px;
    background-color: white;
    border-radius: 50%;
}

/* Modal */
.hd-seo-qa-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hd-seo-qa-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.hd-seo-qa-modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow:
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1;
    opacity: 0;
    transform: scale(0.95) translateY(-20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hd-seo-qa-modal-show .hd-seo-qa-modal-content {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* Modern Modal Styles */
.hd-seo-qa-modal-modern {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 560px;
    width: 90%;
}

.hd-seo-qa-modal-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.hd-seo-qa-modal-header-content {
    flex: 1;
}

.hd-seo-qa-modal-title {
    margin: 0 0 4px 0;
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
}

.hd-seo-qa-modal-subtitle {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

.hd-seo-qa-modal-close-modern {
    background: #f3f4f6;
    border: none;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: 16px;
    padding: 0;
}

.hd-seo-qa-modal-close-modern:hover {
    background: #e5e7eb;
    color: #111827;
}

.hd-seo-qa-modal-body-modern {
    padding: 20px 24px;
}

.hd-seo-qa-form-group {
    margin-bottom: 16px;
}

.hd-seo-qa-form-group:last-child {
    margin-bottom: 0;
}

/* Device Type Buttons */
.hd-seo-qa-device-buttons {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.hd-seo-qa-device-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.hd-seo-qa-device-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: #eff6ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.1);
}

.hd-seo-qa-device-btn.active {
    border-color: #3b82f6;
    background: #3b82f6;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.hd-seo-qa-device-btn.active svg {
    stroke: #ffffff;
}

.hd-seo-qa-device-btn svg {
    stroke: currentColor;
    transition: stroke 0.2s ease;
}

.hd-seo-qa-device-btn span {
    font-size: 13px;
    font-weight: 600;
}

/* Role Buttons (for guest info modal) */
.hd-seo-qa-role-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 8px;
}

.hd-seo-qa-role-btn {
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.hd-seo-qa-role-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: #eff6ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.1);
}

.hd-seo-qa-role-btn.active {
    border-color: #3b82f6;
    background: #3b82f6;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Guest Info in Dropdown */
.hd-seo-qa-dropdown-guest-info {
    margin-top: 4px;
}

.hd-seo-qa-guest-name {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
}

.hd-seo-qa-guest-role {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

.hd-seo-qa-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.hd-seo-qa-required {
    color: #ef4444;
    margin-left: 2px;
}

.hd-seo-qa-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.5;
    color: #111827;
    background: #ffffff;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-family: inherit;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.hd-seo-qa-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.hd-seo-qa-input.hd-seo-qa-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.hd-seo-qa-select {
    width: 100%;
    padding: 12px 16px;
    padding-right: 40px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background-color: #ffffff;
    color: #111827;
    transition: all 0.2s ease;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 12px;
    box-sizing: border-box;
}

.hd-seo-qa-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.hd-seo-qa-select:hover {
    border-color: #d1d5db;
}

.hd-seo-qa-textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    line-height: 1.5;
    color: #111827;
    background: #ffffff;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.hd-seo-qa-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.hd-seo-qa-textarea.hd-seo-qa-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.hd-seo-qa-file-upload {
    position: relative;
}

.hd-seo-qa-file-input {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}

.hd-seo-qa-file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    background: #f9fafb;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hd-seo-qa-file-label:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.hd-seo-qa-file-text {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 4px;
}

.hd-seo-qa-file-hint {
    font-size: 12px;
    color: #6b7280;
}

.hd-seo-qa-image-preview {
    margin-top: 12px;
    position: relative;
    display: inline-block;
}

.hd-seo-qa-preview-img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.hd-seo-qa-remove-image {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    padding: 0;
}

.hd-seo-qa-modal-footer-modern {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px 24px;
    border-top: 1px solid #e5e7eb;
}

.hd-seo-qa-cancel-btn-modern {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1.5px solid #d1d5db;
    background: #ffffff;
    color: #374151;
}

.hd-seo-qa-cancel-btn-modern:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.hd-seo-qa-submit-btn-modern {
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    background: #3b82f6;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hd-seo-qa-submit-btn-modern:hover:not(:disabled) {
    background: #2563eb;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
}

.hd-seo-qa-submit-btn-modern:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.hd-seo-qa-dialog-modal {
    z-index: 1000001;
}

.hd-seo-qa-dialog-layout {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    align-items: center;
}

.hd-seo-qa-dialog-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #eff6ff;
    color: #2563eb;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.12);
}

.hd-seo-qa-dialog-icon[data-variant="danger"] {
    background: #fef2f2;
    color: #dc2626;
    box-shadow: inset 0 0 0 1px rgba(220, 38, 38, 0.12);
}

.hd-seo-qa-dialog-icon span {
    font-size: 24px;
    line-height: 1;
    font-weight: 700;
}

.hd-seo-qa-dialog-copy {
    flex: 1;
    min-width: 0;
}

.hd-seo-qa-dialog-message {
    margin: 0;
    font-size: 14px;
    line-height: 1.7;
    color: #374151;
    word-break: break-word;
}

.hd-seo-qa-dialog-confirm {
    justify-content: center;
}

.hd-seo-qa-dialog-confirm-danger {
    background: #dc2626;
}

.hd-seo-qa-dialog-confirm-danger:hover:not(:disabled) {
    background: #b91c1c;
    box-shadow: 0 4px 6px -1px rgba(220, 38, 38, 0.35);
}

.hd-seo-qa-submit-loader {
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .hd-seo-qa-modal-content,
    .hd-seo-qa-modal-modern {
        background: #1f2937;
        color: white;
    }

    .hd-seo-qa-modal-header-modern {
        border-bottom-color: #374151;
    }

    .hd-seo-qa-modal-title {
        color: #f9fafb;
    }

    .hd-seo-qa-modal-subtitle {
        color: #9ca3af;
    }

    .hd-seo-qa-modal-close-modern {
        background: #374151;
        color: #d1d5db;
    }

    .hd-seo-qa-modal-close-modern:hover {
        background: #4b5563;
        color: #f9fafb;
    }

    .hd-seo-qa-dialog-icon {
        background: #1d4ed8;
        color: #dbeafe;
        box-shadow: inset 0 0 0 1px rgba(191, 219, 254, 0.14);
    }

    .hd-seo-qa-dialog-icon[data-variant="danger"] {
        background: #7f1d1d;
        color: #fecaca;
        box-shadow: inset 0 0 0 1px rgba(254, 202, 202, 0.14);
    }

    .hd-seo-qa-dialog-message {
        color: #d1d5db;
    }

    .hd-seo-qa-label {
        color: #e5e7eb;
    }

    .hd-seo-qa-input {
        background: #111827;
        border-color: #4b5563;
        color: #f9fafb;
    }

    .hd-seo-qa-input:focus {
        border-color: #3b82f6;
    }

    .hd-seo-qa-textarea {
        background: #111827;
        border-color: #4b5563;
        color: #f9fafb;
    }

    .hd-seo-qa-textarea:focus {
        border-color: #3b82f6;
    }

    .hd-seo-qa-role-btn {
        background: #111827;
        border-color: #4b5563;
        color: #e5e7eb;
    }

    .hd-seo-qa-role-btn:hover {
        background: #1e3a5f;
        border-color: #3b82f6;
        color: #93c5fd;
    }

    .hd-seo-qa-role-btn.active {
        background: #3b82f6;
        border-color: #3b82f6;
        color: #ffffff;
    }

    .hd-seo-qa-guest-name {
        color: #f9fafb;
    }

    .hd-seo-qa-guest-role {
        color: #9ca3af;
    }

    .hd-seo-qa-file-label {
        background: #111827;
        border-color: #4b5563;
    }

    .hd-seo-qa-file-label:hover {
        background: #1e3a5f;
        border-color: #3b82f6;
    }

    .hd-seo-qa-file-text {
        color: #e5e7eb;
    }

    .hd-seo-qa-file-hint {
        color: #9ca3af;
    }

    .hd-seo-qa-modal-footer-modern {
        border-top-color: #374151;
    }

    .hd-seo-qa-cancel-btn-modern {
        background: #374151;
        border-color: #4b5563;
        color: #e5e7eb;
    }

    .hd-seo-qa-cancel-btn-modern:hover {
        background: #4b5563;
    }
}

/* Note Details Modal Styles */
.hd-seo-qa-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.hd-seo-qa-author-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hd-seo-qa-author-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.hd-seo-qa-author-name {
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

@media (prefers-color-scheme: dark) {
    .hd-seo-qa-author-name {
        color: #e5e7eb;
    }
}

.hd-seo-qa-date {
    color: #6b7280;
    font-size: 14px;
    margin: 0;
}

@media (prefers-color-scheme: dark) {
    .hd-seo-qa-date {
        color: #9ca3af;
    }
}

.hd-seo-qa-message-content {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 14px;
    color: #374151;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    margin: 0;
}

@media (prefers-color-scheme: dark) {
    .hd-seo-qa-message-content {
        background: #111827;
        border-color: #374151;
        color: #e5e7eb;
        margin: 0;
    }
}

.hd-seo-qa-image-container {
    margin-top: 8px;
}

.hd-seo-qa-detail-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.hd-seo-qa-detail-image:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@media (prefers-color-scheme: dark) {
    .hd-seo-qa-detail-image {
        border-color: #374151;
    }
}

/* Status Select Dropdown */
.hd-seo-qa-status-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    color: #374151;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.hd-seo-qa-status-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

@media (prefers-color-scheme: dark) {
    .hd-seo-qa-status-select {
        background: #111827;
        border-color: #4b5563;
        color: #e5e7eb;
    }

    .hd-seo-qa-status-select:focus {
        border-color: #3b82f6;
    }
}

/* Delete Button */
.hd-seo-qa-delete-btn-modern {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #ef4444;
    background: #fee2e2;
    color: #dc2626;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hd-seo-qa-delete-btn-modern:hover {
    background: #fecaca;
    border-color: #dc2626;
    color: #991b1b;
}

.hd-seo-qa-delete-btn-modern:active {
    transform: scale(0.98);
}

@media (prefers-color-scheme: dark) {
    .hd-seo-qa-delete-btn-modern {
        background: #7f1d1d;
        border-color: #991b1b;
        color: #fecaca;
    }

    .hd-seo-qa-delete-btn-modern:hover {
        background: #991b1b;
        border-color: #dc2626;
        color: #fee2e2;
    }
}

/* Save Status Button */
.hd-seo-qa-save-status-btn-modern {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #3b82f6;
    background: #3b82f6;
    color: white;
}

.hd-seo-qa-save-status-btn-modern:hover {
    background: #2563eb;
    border-color: #2563eb;
}

.hd-seo-qa-save-status-btn-modern:active {
    transform: scale(0.98);
}

@media (prefers-color-scheme: dark) {
    .hd-seo-qa-save-status-btn-modern {
        background: #1e40af;
        border-color: #1e40af;
    }

    .hd-seo-qa-save-status-btn-modern:hover {
        background: #1e3a8a;
        border-color: #1e3a8a;
    }
}

/* Close Button Modern */
.hd-seo-qa-close-btn-modern {
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1.5px solid #d1d5db;
    background: #ffffff;
    color: #374151;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    position: relative;
    overflow: hidden;
}

.hd-seo-qa-close-btn-modern::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.hd-seo-qa-close-btn-modern:hover::before {
    left: 100%;
}

.hd-seo-qa-close-btn-modern:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #111827;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.hd-seo-qa-close-btn-modern:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.hd-seo-qa-close-btn-modern:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
}

@media (prefers-color-scheme: dark) {
    .hd-seo-qa-close-btn-modern {
        background: #1f2937;
        border-color: #4b5563;
        color: #e5e7eb;
    }

    .hd-seo-qa-close-btn-modern::before {
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    }

    .hd-seo-qa-close-btn-modern:hover {
        background: #374151;
        border-color: #6b7280;
        color: #f9fafb;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }

    .hd-seo-qa-close-btn-modern:focus {
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
        border-color: #3b82f6;
    }
}

.hd-seo-qa-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
}

@media (prefers-color-scheme: dark) {
    .hd-seo-qa-modal-header {
        border-bottom-color: #374151;
    }
}

.hd-seo-qa-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.hd-seo-qa-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.hd-seo-qa-modal-close:hover {
    background-color: #f3f4f6;
    color: #111827;
}

@media (prefers-color-scheme: dark) {
    .hd-seo-qa-modal-close:hover {
        background-color: #374151;
        color: white;
    }
}

.hd-seo-qa-modal-body {
    padding: 20px;
}

.hd-seo-qa-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid #e5e7eb;
}

@media (prefers-color-scheme: dark) {
    .hd-seo-qa-modal-footer {
        border-top-color: #374151;
    }
}

.hd-seo-qa-cancel-btn,
.hd-seo-qa-close-btn,
.hd-seo-qa-submit-btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.hd-seo-qa-cancel-btn,
.hd-seo-qa-close-btn {
    background-color: #f3f4f6;
    color: #374151;
}

.hd-seo-qa-cancel-btn:hover,
.hd-seo-qa-close-btn:hover {
    background-color: #e5e7eb;
}

@media (prefers-color-scheme: dark) {
    .hd-seo-qa-cancel-btn,
    .hd-seo-qa-close-btn {
        background-color: #374151;
        color: white;
    }

    .hd-seo-qa-cancel-btn:hover,
    .hd-seo-qa-close-btn:hover {
        background-color: #4b5563;
    }
}

.hd-seo-qa-submit-btn {
    background-color: #3b82f6;
    color: white;
}

.hd-seo-qa-submit-btn:hover {
    background-color: #2563eb;
}

.hd-seo-qa-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Notifications */
.hd-seo-qa-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000000;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow:
        0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -2px rgba(0, 0, 0, 0.05);
    color: white;
    font-weight: 500;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    max-width: 400px;
}

.hd-seo-qa-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.hd-seo-qa-notification.success {
    background-color: #22c55e;
}

.hd-seo-qa-notification.error {
    background-color: #ef4444;
}

.hd-seo-qa-notification.info {
    background-color: #3b82f6;
}

.hd-seo-qa-notification-rich {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    max-width: 420px;
}

.hd-seo-qa-notification-body {
    flex: 1;
    min-width: 0;
}

.hd-seo-qa-notification-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
}

.hd-seo-qa-notification-message {
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.5;
    opacity: 0.92;
}

.hd-seo-qa-notification-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.hd-seo-qa-notification-action {
    appearance: none;
    border: none;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        background 0.2s ease,
        color 0.2s ease;
}

.hd-seo-qa-notification-action:hover {
    transform: translateY(-1px);
}

.hd-seo-qa-notification-action-primary {
    background: #ffffff;
    color: #166534;
}

.hd-seo-qa-notification-action-secondary {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.hd-seo-qa-notification-close {
    appearance: none;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.88);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}

.hd-seo-qa-notification-close:hover {
    color: #ffffff;
}

/* Responsive */
@media (max-width: 640px) {
    #hd-seo-qa-toggle {
        bottom: 16px;
        right: 16px;
        padding: 12px 20px;
        font-size: 14px;
        border-radius: 14px;
        box-shadow:
            0 6px 20px rgba(102, 126, 234, 0.4),
            0 3px 10px rgba(118, 75, 162, 0.3),
            0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .hd-seo-qa-modal-content {
        width: 95%;
        margin: 20px;
    }

    .hd-seo-qa-dialog-layout {
        flex-direction: column;
    }

    .hd-seo-qa-dialog-icon {
        width: 44px;
        height: 44px;
    }

    .hd-seo-qa-notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Element Highlighting - New Approach */
.hd-seo-qa-highlighted {
    position: relative;
    border: 3px solid #3b82f6 !important;
    border-radius: 4px;
    background-color: rgba(59, 130, 246, 0.1) !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2) !important;
    transition: all 0.3s ease;
    cursor: pointer !important;
    z-index: 999996;
    padding: 10px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.hd-seo-qa-highlighted:hover {
    border-color: #2563eb !important;
    background-color: rgba(59, 130, 246, 0.15) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3) !important;
}

/* Active highlight when viewing note details */
.hd-seo-qa-highlighted-active {
    border-color: #f59e0b !important;
    background-color: rgba(245, 158, 11, 0.15) !important;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.3) !important;
    animation: active-highlight-pulse 2s ease-in-out infinite;
}

@keyframes active-highlight-pulse {
    0%,
    100% {
        box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.3);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.5);
    }
}

/* Temporary highlight when selecting element */
.hd-seo-qa-temp-highlight {
    border: 2px solid #3b82f6 !important;
    border-radius: 6px;
    background-color: rgba(59, 130, 246, 0.07) !important;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.25) !important;
    animation: temp-highlight-pulse 1.8s ease-in-out infinite;
}

@keyframes temp-highlight-pulse {
    0%,
    100% {
        box-shadow: 0 0 12px rgba(59, 130, 246, 0.25);
    }
    50% {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.45);
    }
}

.hd-seo-qa-selection-preview {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border: 2px solid #3b82f6;
    border-radius: 8px;
    background: rgba(59, 130, 246, 0.08);
    box-shadow: 0 0 16px rgba(59, 130, 246, 0.25);
    opacity: 0;
    z-index: 999995;
    pointer-events: none !important;
    transition:
        top 0.08s ease,
        left 0.08s ease,
        width 0.08s ease,
        height 0.08s ease,
        opacity 0.12s ease;
}

.hd-seo-qa-selection-preview.is-visible {
    opacity: 1;
}

.hd-seo-qa-selection-label {
    position: fixed;
    top: 0;
    left: 0;
    max-width: min(360px, calc(100vw - 16px));
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.92);
    color: #f9fafb;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.2;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.28);
    backdrop-filter: blur(8px);
    opacity: 0;
    z-index: 999996;
    pointer-events: none !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transform: translateY(-4px);
    transition:
        top 0.1s ease,
        left 0.1s ease,
        opacity 0.12s ease,
        transform 0.12s ease;
}

.hd-seo-qa-selection-label.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.hd-seo-qa-my-snapshots-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 120px;
}

.hd-seo-qa-loading-state,
.hd-seo-qa-empty-state,
.hd-seo-qa-error-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    padding: 20px;
    border-radius: 16px;
    /* background: #f8fafc; */
    color: #64748b;
    text-align: center;
    font-size: 14px;
    line-height: 1.5;
}

.hd-seo-qa-error-state {
    color: #b91c1c;
    background: #fef2f2;
}

.hd-seo-qa-snapshot-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hd-seo-qa-snapshot-history-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.hd-seo-qa-snapshot-history-summary {
    color: #f3f4f6;
    font-size: 13px;
    line-height: 1.5;
}

.hd-seo-qa-snapshot-keep-latest {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 148px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid #fdba74;
    color: #ffffff;
    background: linear-gradient(135deg, #d97706 0%, #ea580c 100%);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease;
}

.hd-seo-qa-snapshot-keep-latest:hover:not(:disabled) {
    border-color: #fed7aa;
    transform: translateY(-1px);
}

.hd-seo-qa-snapshot-keep-latest:disabled {
    opacity: 0.65;
    cursor: wait;
    transform: none;
}

.hd-seo-qa-snapshot-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border: 1px solid #dbeafe;
    border-radius: 16px;
}

.hd-seo-qa-snapshot-item-main {
    min-width: 0;
}

.hd-seo-qa-snapshot-item-title {
    color: #f3f4f6;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
}

.hd-seo-qa-snapshot-item-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.16);
    color: #bfdbfe;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hd-seo-qa-snapshot-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 6px;
    color: #f3f4f6;
    font-size: 13px;
    line-height: 1.5;
}

.hd-seo-qa-snapshot-item-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hd-seo-qa-snapshot-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 88px;
    padding: 7px 14px;
    border-radius: 999px;
    background: #2563eb;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.hd-seo-qa-snapshot-link:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.hd-seo-qa-snapshot-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 96px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid #93c5fd;
    color: #bfdbfe;
    background: rgba(37, 99, 235, 0.12);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.hd-seo-qa-snapshot-copy:hover:not(:disabled) {
    background: rgba(37, 99, 235, 0.2);
    border-color: #bfdbfe;
    transform: translateY(-1px);
}

.hd-seo-qa-snapshot-copy:disabled {
    opacity: 0.65;
    cursor: wait;
    transform: none;
}

.hd-seo-qa-snapshot-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 88px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid #fecaca;
    color: #ffffff;
    background-color: #dc2626;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.hd-seo-qa-snapshot-delete:hover:not(:disabled) {
    /* background: #fef2f2; */
    border-color: #fca5a5;
    transform: translateY(-1px);
}

.hd-seo-qa-snapshot-delete:disabled {
    opacity: 0.65;
    cursor: wait;
    transform: none;
}

@media (max-width: 640px) {
    .hd-seo-qa-snapshot-history-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .hd-seo-qa-snapshot-item {
        flex-direction: column;
        align-items: stretch;
    }

    .hd-seo-qa-snapshot-item-actions {
        width: 100%;
        flex-direction: column;
    }

    .hd-seo-qa-snapshot-link {
        width: 100%;
    }

    .hd-seo-qa-snapshot-copy {
        width: 100%;
    }

    .hd-seo-qa-snapshot-delete {
        width: 100%;
    }
}

/* Ensure highlighted elements are clickable even in QA mode */
body.hd-seo-qa-mode .hd-seo-qa-highlighted {
    pointer-events: auto !important;
}

/* Ensure pins are visible above content (backward compatibility) */
.hd-seo-qa-pin {
    pointer-events: auto;
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

/* Highlighted pin animation */
.hd-seo-qa-pin-highlighted {
    animation: pin-highlight 2s ease-in-out;
    transform: scale(1.3) !important;
    z-index: 999999 !important;
}

@keyframes pin-highlight {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
        transform: scale(1.3);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
        transform: scale(1.4);
    }
}

/* Prevent interaction with page content when in QA mode */
body.hd-seo-qa-mode a,
body.hd-seo-qa-mode button,
body.hd-seo-qa-mode input,
body.hd-seo-qa-mode select,
body.hd-seo-qa-mode textarea {
    pointer-events: none;
}

/* But allow interaction with highlighted elements */
body.hd-seo-qa-mode .hd-seo-qa-highlighted,
body.hd-seo-qa-mode .hd-seo-qa-highlighted * {
    pointer-events: auto !important;
}

body.hd-seo-qa-mode .hd-seo-qa-pin,
body.hd-seo-qa-mode .hd-seo-qa-highlighted,
body.hd-seo-qa-mode #hd-seo-qa-toggle,
body.hd-seo-qa-mode .hd-seo-qa-modal,
body.hd-seo-qa-mode .hd-seo-qa-modal * {
    pointer-events: auto !important;
}

/* All Notes Modal */
.hd-seo-qa-all-notes-modal {
    max-width: 1200px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.hd-seo-qa-all-notes-body {
    padding: 0 !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.hd-seo-qa-notes-table-container {
    overflow-y: auto;
    flex: 1;
    max-height: calc(90vh - 200px);
}

.hd-seo-qa-notes-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.hd-seo-qa-notes-table thead {
    position: sticky;
    top: 0;
    background: #f9fafb;
    z-index: 10;
}

.hd-seo-qa-notes-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
    background: #f9fafb;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hd-seo-qa-notes-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
    vertical-align: middle;
}

.hd-seo-qa-notes-table tbody tr {
    transition: background 0.2s ease;
}

.hd-seo-qa-notes-table tbody tr:hover {
    background: #f9fafb;
}

.hd-seo-qa-notes-table tbody tr:last-child td {
    border-bottom: none;
}

.hd-seo-qa-table-url a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.hd-seo-qa-table-url a:hover {
    text-decoration: underline;
    color: #2563eb;
}

.hd-seo-qa-table-message {
    max-width: 300px;
    word-wrap: break-word;
}

.hd-seo-qa-table-status {
    white-space: nowrap;
}

.hd-seo-qa-table-date {
    white-space: nowrap;
    color: #6b7280;
    font-size: 13px;
}

.hd-seo-qa-table-actions {
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hd-seo-qa-view-note-btn,
.hd-seo-qa-copy-note-link-btn {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #3b82f6;
    background: #3b82f6;
    color: white;
}

.hd-seo-qa-view-note-btn:hover {
    background: #2563eb;
    border-color: #2563eb;
}

.hd-seo-qa-copy-note-link-btn {
    border-color: #93c5fd;
    background: rgba(37, 99, 235, 0.1);
    color: #dbeafe;
}

.hd-seo-qa-copy-note-link-btn:hover {
    background: rgba(37, 99, 235, 0.18);
    border-color: #bfdbfe;
}

.hd-seo-qa-loading-state,
.hd-seo-qa-error-state,
.hd-seo-qa-empty-state {
    padding: 40px 20px;
    text-align: center;
    color: #6b7280;
}

.hd-seo-qa-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

.hd-seo-qa-empty-state {
    color: #9ca3af;
    font-style: italic;
}

.hd-seo-qa-current-page-panel {
    position: fixed;
    left: 24px;
    bottom: 24px;
    width: min(1080px, calc(100vw - 48px));
    max-height: min(72vh, 760px);
    z-index: 999997;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.98) 100%);
    border: 1px solid rgba(148, 163, 184, 0.26);
    box-shadow: 0 28px 70px rgba(2, 6, 23, 0.38);
    color: #f8fafc;
    overflow: hidden;
    opacity: 0;
    transform: translateY(16px);
    transition:
        opacity 0.2s ease,
        transform 0.2s ease,
        width 0.2s ease,
        max-height 0.2s ease;
}

.hd-seo-qa-current-page-panel.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.hd-seo-qa-current-page-panel.is-collapsed {
    width: 360px;
    max-height: 72px;
}

.hd-seo-qa-current-page-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.hd-seo-qa-current-page-toggle {
    flex: 1 1 auto;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 0;
    border-radius: 999px;
    padding: 12px 16px;
    background: rgba(59, 130, 246, 0.16);
    color: #dbeafe;
    font:
        700 14px/1 system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    cursor: pointer;
}

.hd-seo-qa-current-page-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 18px;
    line-height: 1;
}

.hd-seo-qa-current-page-close {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
    color: #e2e8f0;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.hd-seo-qa-current-page-shell {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: calc(72vh - 72px);
    opacity: 1;
    transition: opacity 0.16s ease;
}

.hd-seo-qa-current-page-panel.is-collapsed .hd-seo-qa-current-page-shell {
    opacity: 0;
    pointer-events: none;
}

.hd-seo-qa-current-page-heading {
    padding: 0 22px 18px;
}

.hd-seo-qa-current-page-title {
    margin: 0;
    color: #f8fafc;
    font:
        700 22px/1.2 system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

.hd-seo-qa-current-page-subtitle {
    margin: 8px 0 0;
    color: #94a3b8;
    font:
        500 14px/1.5 system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

.hd-seo-qa-current-page-panel .hd-seo-qa-all-notes-body {
    padding-bottom: 18px !important;
}

.hd-seo-qa-current-page-panel .hd-seo-qa-notes-table-container {
    max-height: calc(72vh - 190px);
}

.hd-seo-qa-current-page-panel .hd-seo-qa-notes-table thead,
.hd-seo-qa-current-page-panel .hd-seo-qa-notes-table th {
    background: #0f172a;
}

.hd-seo-qa-current-page-panel .hd-seo-qa-notes-table td,
.hd-seo-qa-current-page-panel .hd-seo-qa-notes-table th {
    color: #e2e8f0;
    border-bottom-color: rgba(148, 163, 184, 0.14);
}

.hd-seo-qa-current-page-panel .hd-seo-qa-notes-table tbody tr:hover {
    background: rgba(148, 163, 184, 0.08);
}

@media (prefers-color-scheme: dark) {
    .hd-seo-qa-notes-table thead {
        background: #111827;
    }

    .hd-seo-qa-notes-table th {
        background: #111827;
        color: #e5e7eb;
        border-bottom-color: #374151;
    }

    .hd-seo-qa-notes-table td {
        color: #e5e7eb;
        border-bottom-color: #374151;
    }

    .hd-seo-qa-notes-table tbody tr:hover {
        background: #1f2937;
    }

    .hd-seo-qa-table-url a {
        color: #60a5fa;
    }

    .hd-seo-qa-table-url a:hover {
        color: #93c5fd;
    }

    .hd-seo-qa-table-date {
        color: #9ca3af;
    }

    .hd-seo-qa-loading-state,
    .hd-seo-qa-error-state,
    .hd-seo-qa-empty-state {
        color: #9ca3af;
    }

    .hd-seo-qa-spinner {
        border-color: #374151;
        border-top-color: #3b82f6;
    }
}

/* Responsive table */
@media (max-width: 768px) {
    .hd-seo-qa-all-notes-modal {
        max-width: 95%;
    }

    .hd-seo-qa-current-page-panel {
        left: 12px;
        bottom: 84px;
        width: calc(100vw - 24px);
    }

    .hd-seo-qa-current-page-panel.is-collapsed {
        width: calc(100vw - 24px);
    }

    .hd-seo-qa-notes-table {
        font-size: 12px;
    }

    .hd-seo-qa-notes-table th,
    .hd-seo-qa-notes-table td {
        padding: 8px 12px;
    }

    .hd-seo-qa-table-message {
        max-width: 200px;
    }
}

/* Drawing Overlay Styles */
.hd-seo-drawing-overlay {
    touch-action: none;
    -webkit-touch-callout: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.1);
}

.hd-seo-drawing-canvas {
    touch-action: none;
    -webkit-touch-callout: none;
    position: absolute;
    top: 0;
    left: 0;
    cursor: crosshair;
}

.hd-seo-drawing-canvas-container {
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: 999999;
}

.hd-seo-drawing-canvas-viewport {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: top left;
    will-change: transform;
}

.hd-seo-drawing-pan-active .hd-seo-drawing-canvas {
    cursor: grab;
}

.hd-seo-drawing-pan-dragging .hd-seo-drawing-canvas {
    cursor: grabbing;
}

.hd-seo-drawing-toolbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    gap: 16px;
    align-items: center;
    z-index: 1000000;
}

.hd-seo-drawing-toolbar-handle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #f3f4f6;
    color: #6b7280;
    cursor: grab;
    user-select: none;
    touch-action: none;
}

.hd-seo-drawing-toolbar-handle:active {
    cursor: grabbing;
}

@media (max-width: 640px) {
    .hd-seo-drawing-toolbar {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
    }
}

.hd-seo-drawing-toolbar-group {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 0 8px;
    border-right: 1px solid #e5e7eb;
}

.hd-seo-drawing-zoom-group .hd-seo-drawing-zoom {
    width: 120px;
}

.hd-seo-zoom-label {
    font-size: 12px;
    color: #6b7280;
    min-width: 44px;
    text-align: center;
}

.hd-seo-drawing-zoom-reset {
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    color: #374151;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 12px;
    cursor: pointer;
}

.hd-seo-drawing-zoom-reset:hover {
    background: #f3f4f6;
}

.hd-seo-drawing-toolbar-group:last-child {
    border-right: none;
}

.hd-seo-drawing-tool {
    width: 40px;
    height: 40px;
    border: 2px solid transparent;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4b5563;
    transition: all 0.2s;
    padding: 0;
}

.hd-seo-drawing-tool:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.hd-seo-drawing-tool-active {
    background: #3b82f6;
    color: white;
    border-color: #2563eb;
}

.hd-seo-drawing-tool-active:hover {
    background: #2563eb;
}

.hd-seo-drawing-color {
    width: 40px;
    height: 40px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    padding: 4px;
}

.hd-seo-drawing-size,
.hd-seo-drawing-fontsize {
    width: 100px;
    height: 8px;
    border-radius: 4px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background: #e5e7eb;
}

.hd-seo-drawing-size::-webkit-slider-thumb,
.hd-seo-drawing-fontsize::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
}

.hd-seo-drawing-size::-moz-range-thumb,
.hd-seo-drawing-fontsize::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    border: none;
}

.hd-seo-fontsize-label {
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
}

.hd-seo-fontsize-label strong {
    color: #1f2937;
    font-weight: 600;
}

.hd-seo-drawing-undo,
.hd-seo-drawing-clear,
.hd-seo-drawing-delete-text {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4b5563;
    transition: all 0.2s;
    padding: 0;
}

.hd-seo-drawing-undo:hover,
.hd-seo-drawing-clear:hover,
.hd-seo-drawing-delete-text:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.hd-seo-drawing-finish,
.hd-seo-drawing-finish-viewport,
.hd-seo-drawing-finish-simple,
.hd-seo-drawing-cancel {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.hd-seo-drawing-finish,
.hd-seo-drawing-finish-viewport,
.hd-seo-drawing-finish-simple {
    background: #10b981;
    color: white;
}

.hd-seo-drawing-finish:hover,
.hd-seo-drawing-finish-viewport:hover,
.hd-seo-drawing-finish-simple:hover {
    background: #059669;
}

.hd-seo-drawing-finish:disabled,
.hd-seo-drawing-finish-viewport:disabled,
.hd-seo-drawing-finish-simple:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.hd-seo-drawing-finish-simple {
    background: #3b82f6;
}

.hd-seo-drawing-finish-simple:hover {
    background: #2563eb;
}

.hd-seo-drawing-cancel {
    background: #ef4444;
    color: white;
}

.hd-seo-drawing-cancel:hover {
    background: #dc2626;
}

/* Screenshot Thumbnail Styles */
.hd-seo-screenshot-thumbnail {
    transition:
        transform 0.2s,
        box-shadow 0.2s;
}

.hd-seo-screenshot-thumbnail:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Snapshot-matched QA Notes design refresh: visual-only overrides. */
#hd-seo-qa-toggle,
.hd-seo-qa-dropdown,
.hd-seo-qa-dropdown-panel,
.hd-seo-qa-dropdown-side-actions,
.hd-seo-qa-modal,
.hd-seo-qa-current-page-panel,
.hd-seo-qa-pin,
.hd-seo-qa-highlighted,
.hd-seo-qa-temp-highlight {
    --hdqa-bg-0: #0b0d10;
    --hdqa-bg-1: #12161b;
    --hdqa-bg-2: #181d24;
    --hdqa-bg-3: #1f252d;
    --hdqa-bg-input: #0f1318;
    --hdqa-border: rgba(255, 255, 255, 0.07);
    --hdqa-border-2: rgba(255, 255, 255, 0.12);
    --hdqa-border-3: rgba(255, 255, 255, 0.18);
    --hdqa-focus-ring: rgba(91, 141, 239, 0.32);
    --hdqa-text-1: #e6e9ee;
    --hdqa-text-2: #a4acb8;
    --hdqa-text-3: #6b7280;
    --hdqa-accent: #5b8def;
    --hdqa-accent-hover: #6d9cf5;
    --hdqa-status-open: #5b9df8;
    --hdqa-status-open-bg: rgba(91, 157, 248, 0.13);
    --hdqa-status-in-review: #e5b45a;
    --hdqa-status-in-review-bg: rgba(229, 180, 90, 0.13);
    --hdqa-status-not-completed: #ee6e6e;
    --hdqa-status-not-completed-bg: rgba(238, 110, 110, 0.13);
    --hdqa-status-closed: #58c08a;
    --hdqa-status-closed-bg: rgba(88, 192, 138, 0.13);
    --hdqa-radius-sm: 6px;
    --hdqa-radius-md: 8px;
    --hdqa-radius-lg: 12px;
    --hdqa-radius-pill: 999px;
    --hdqa-shadow-panel:
        0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 8px 24px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.35);
    --hdqa-shadow-pop:
        0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 20px 60px rgba(0, 0, 0, 0.55), 0 4px 12px rgba(0, 0, 0, 0.4);
    --hdqa-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
    --hdqa-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

#hd-seo-qa-toggle,
#hd-seo-qa-toggle *,
.hd-seo-qa-dropdown,
.hd-seo-qa-dropdown *,
.hd-seo-qa-modal,
.hd-seo-qa-modal *,
.hd-seo-qa-current-page-panel,
.hd-seo-qa-current-page-panel * {
    box-sizing: border-box;
    font-family: var(--hdqa-font);
}

#hd-seo-qa-toggle {
    min-height: 40px;
    padding: 0 15px;
    border: 1px solid var(--hdqa-border-2);
    border-radius: var(--hdqa-radius-pill);
    background: var(--hdqa-bg-1);
    color: var(--hdqa-text-1);
    box-shadow: var(--hdqa-shadow-panel);
    font: 600 13px/1 var(--hdqa-font);
    letter-spacing: 0;
    gap: 10px;
    transition:
        background 0.12s ease,
        border-color 0.12s ease,
        transform 0.12s ease,
        box-shadow 0.12s ease,
        opacity 0.12s ease;
}

#hd-seo-qa-toggle::before {
    content: "";
    position: static;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--hdqa-accent);
    box-shadow: 0 0 0 4px var(--hdqa-status-open-bg);
    transition: none;
}

#hd-seo-qa-toggle:hover::before {
    left: auto;
}

#hd-seo-qa-toggle:hover {
    background: var(--hdqa-bg-2);
    border-color: var(--hdqa-border-3);
    box-shadow: var(--hdqa-shadow-panel);
    transform: translateY(-1px);
}

#hd-seo-qa-toggle.active,
#hd-seo-qa-toggle.active:hover {
    background: var(--hdqa-bg-3);
    border-color: var(--hdqa-accent);
    box-shadow:
        var(--hdqa-shadow-panel),
        0 0 0 3px var(--hdqa-focus-ring);
    animation: none;
}

#hd-seo-qa-toggle:focus-visible {
    outline: none;
    box-shadow:
        var(--hdqa-shadow-panel),
        0 0 0 3px var(--hdqa-focus-ring);
}

.hd-seo-qa-toggle-icon,
#hd-seo-qa-toggle:hover .hd-seo-qa-toggle-icon,
#hd-seo-qa-toggle.active .hd-seo-qa-toggle-icon,
#hd-seo-qa-toggle.active .hd-seo-qa-toggle-icon-wrapper {
    color: var(--hdqa-accent);
    filter: none;
    transform: none;
    animation: none;
}

.hd-seo-qa-toggle-text {
    letter-spacing: 0;
}

.hd-seo-qa-dropdown-show {
    background: rgba(6, 8, 12, 0.44);
    backdrop-filter: blur(2px);
}

.hd-seo-qa-dropdown-panel {
    min-width: 320px;
    max-width: 380px;
    border-radius: var(--hdqa-radius-lg);
    border: 1px solid var(--hdqa-border);
    background: var(--hdqa-bg-1);
    box-shadow: var(--hdqa-shadow-panel);
    color: var(--hdqa-text-1);
}

.hd-seo-qa-dropdown-header {
    padding: 16px;
    border-bottom: 1px solid var(--hdqa-border);
    background: transparent;
}

.hd-seo-qa-dropdown-title {
    color: var(--hdqa-text-1);
    font: 600 15px/1.25 var(--hdqa-font);
    letter-spacing: 0;
}

.hd-seo-qa-dropdown-total,
.hd-seo-qa-dropdown-guest-info,
.hd-seo-qa-guest-name,
.hd-seo-qa-guest-role {
    color: var(--hdqa-text-2);
    font: 500 12px/1.4 var(--hdqa-font);
}

.hd-seo-qa-dropdown-total {
    padding: 5px 8px;
    border-radius: var(--hdqa-radius-pill);
    background: var(--hdqa-bg-3);
    color: var(--hdqa-text-3);
    font-family: var(--hdqa-mono);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.hd-seo-qa-see-all-btn,
.hd-seo-qa-current-page-close,
.hd-seo-qa-modal-close-modern,
.hd-seo-qa-modal-close {
    border: 1px solid var(--hdqa-border-2);
    border-radius: var(--hdqa-radius-sm);
    background: transparent;
    color: var(--hdqa-text-2);
    transition:
        background 0.12s ease,
        border-color 0.12s ease,
        color 0.12s ease;
}

.hd-seo-qa-see-all-btn:hover,
.hd-seo-qa-current-page-close:hover,
.hd-seo-qa-modal-close-modern:hover,
.hd-seo-qa-modal-close:hover {
    background: var(--hdqa-bg-3);
    border-color: var(--hdqa-border-3);
    color: var(--hdqa-text-1);
}

.hd-seo-qa-dropdown-stats {
    padding: 12px;
    gap: 8px;
}

.hd-seo-qa-dropdown-stat-item {
    min-height: 86px;
    padding: 11px;
    border-radius: 10px;
    background: var(--hdqa-bg-2);
    border: 1px solid var(--hdqa-border);
    color: var(--hdqa-text-1);
    gap: 7px;
    transition:
        background 0.12s ease,
        border-color 0.12s ease,
        transform 0.12s ease,
        box-shadow 0.12s ease;
}

.hd-seo-qa-dropdown-stat-item:hover {
    background: var(--hdqa-bg-3);
    border-color: var(--hdqa-border-2);
    transform: translateY(-1px);
}

.hd-seo-qa-dropdown-stat-item:focus {
    border-color: var(--hdqa-accent);
    box-shadow: 0 0 0 3px var(--hdqa-focus-ring);
}

.hd-seo-qa-stat-badge {
    font: 700 28px/1 var(--hdqa-mono);
    font-variant-numeric: tabular-nums;
}

.hd-seo-qa-stat-open {
    color: var(--hdqa-status-open);
}

.hd-seo-qa-stat-in-review {
    color: var(--hdqa-status-in-review);
}

.hd-seo-qa-stat-not-completed {
    color: var(--hdqa-status-not-completed);
}

.hd-seo-qa-stat-closed {
    color: var(--hdqa-status-closed);
}

.hd-seo-qa-stat-label,
.hd-seo-qa-snapshot-panel-eyebrow,
.hd-seo-qa-label,
.hd-seo-qa-modal-subtitle,
.hd-seo-qa-current-page-subtitle {
    color: var(--hdqa-text-3);
    font: 700 10.5px/1.2 var(--hdqa-mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hd-seo-qa-stat-detail {
    color: var(--hdqa-accent);
    font: 600 10.5px/1.2 var(--hdqa-mono);
    letter-spacing: 0.04em;
}

.hd-seo-qa-dropdown-divider {
    background: var(--hdqa-border);
    margin: 0 12px;
}

.hd-seo-qa-dropdown-action {
    padding: 12px 16px;
    color: var(--hdqa-text-1);
    font: 500 13px/1.2 var(--hdqa-font);
}

.hd-seo-qa-dropdown-action:hover,
.hd-seo-qa-dropdown-action:active {
    background: var(--hdqa-bg-2);
    color: var(--hdqa-text-1);
}

.hd-seo-qa-add-note-btn {
    color: var(--hdqa-accent);
}

.hd-seo-qa-add-note-btn:hover {
    color: var(--hdqa-accent-hover);
}

.hd-seo-qa-snapshot-panel,
.hd-seo-qa-current-page-panel {
    border-radius: var(--hdqa-radius-lg);
    background: var(--hdqa-bg-2);
    border: 1px solid var(--hdqa-border);
    box-shadow: none;
    color: var(--hdqa-text-1);
}

.hd-seo-qa-snapshot-panel-meta {
    color: var(--hdqa-text-2);
    font: 500 12.5px/1.5 var(--hdqa-font);
}

.hd-seo-qa-snapshot-panel-status,
.hd-seo-qa-status-badge,
.hd-seo-qa-table-status .hd-seo-qa-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 20px;
    padding: 4px 8px;
    border-radius: var(--hdqa-radius-pill);
    font: 700 10.5px/1 var(--hdqa-mono);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hd-seo-qa-status-badge::before,
.hd-seo-qa-snapshot-panel-status::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.18);
}

.hd-seo-qa-snapshot-panel-status-ready {
    background: var(--hdqa-status-closed-bg);
    color: var(--hdqa-status-closed);
}

.hd-seo-qa-snapshot-panel-status-syncing,
.hd-seo-qa-snapshot-panel-status-loading {
    background: var(--hdqa-status-open-bg);
    color: var(--hdqa-status-open);
}

.hd-seo-qa-snapshot-panel-status-needs-sync {
    background: var(--hdqa-status-in-review-bg);
    color: var(--hdqa-status-in-review);
}

.hd-seo-qa-snapshot-panel-status-failed {
    background: var(--hdqa-status-not-completed-bg);
    color: var(--hdqa-status-not-completed);
}

.hd-seo-qa-snapshot-panel-btn,
.hd-seo-qa-side-action,
.hd-seo-qa-submit-btn-modern,
.hd-seo-qa-save-status-btn-modern {
    border: 1px solid transparent;
    border-radius: var(--hdqa-radius-md);
    background: var(--hdqa-accent);
    color: #fff;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.18) inset,
        0 1px 2px rgba(0, 0, 0, 0.3);
    font: 600 13px/1.2 var(--hdqa-font);
    transition:
        background 0.12s ease,
        border-color 0.12s ease,
        transform 0.12s ease,
        opacity 0.12s ease;
}

.hd-seo-qa-snapshot-panel-btn:hover,
.hd-seo-qa-side-action:hover,
.hd-seo-qa-submit-btn-modern:hover:not(:disabled),
.hd-seo-qa-save-status-btn-modern:hover {
    background: var(--hdqa-accent-hover);
    transform: translateY(-1px);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.18) inset,
        0 1px 2px rgba(0, 0, 0, 0.3);
}

.hd-seo-qa-snapshot-panel-btn-secondary,
.hd-seo-qa-cancel-btn-modern,
.hd-seo-qa-close-btn-modern {
    border: 1px solid var(--hdqa-border-2);
    border-radius: var(--hdqa-radius-md);
    background: var(--hdqa-bg-3);
    color: var(--hdqa-text-1);
    box-shadow: none;
    font: 600 13px/1.2 var(--hdqa-font);
}

.hd-seo-qa-snapshot-panel-btn-secondary:hover,
.hd-seo-qa-cancel-btn-modern:hover,
.hd-seo-qa-close-btn-modern:hover {
    background: #252c36;
    border-color: var(--hdqa-border-3);
    color: var(--hdqa-text-1);
    transform: translateY(-1px);
}

.hd-seo-qa-delete-btn-modern,
.hd-seo-qa-dialog-confirm-danger {
    border: 1px solid rgba(238, 110, 110, 0.28);
    border-radius: var(--hdqa-radius-md);
    background: rgba(238, 110, 110, 0.1);
    color: var(--hdqa-status-not-completed);
    box-shadow: none;
    font: 600 13px/1.2 var(--hdqa-font);
}

.hd-seo-qa-delete-btn-modern:hover,
.hd-seo-qa-dialog-confirm-danger:hover:not(:disabled) {
    background: rgba(238, 110, 110, 0.16);
    border-color: rgba(238, 110, 110, 0.42);
    color: var(--hdqa-status-not-completed);
}

.hd-seo-qa-side-action {
    min-height: 44px;
    border-radius: var(--hdqa-radius-lg);
    background: var(--hdqa-bg-1);
    border-color: var(--hdqa-border-2);
    color: var(--hdqa-text-1);
    box-shadow: var(--hdqa-shadow-panel);
}

.hd-seo-qa-side-action-open {
    border-color: rgba(88, 192, 138, 0.28);
}

.hd-seo-qa-side-action-update {
    border-color: rgba(229, 180, 90, 0.32);
}

.hd-seo-qa-side-action-badge {
    background: var(--hdqa-bg-3);
    box-shadow: inset 0 0 0 1px var(--hdqa-border-2);
    color: var(--hdqa-text-2);
    font-family: var(--hdqa-mono);
}

.hd-seo-qa-pin {
    width: 24px;
    height: 24px;
    border: 2px solid var(--hdqa-bg-0);
    background: var(--pin-color, var(--hdqa-status-open)) !important;
    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.42),
        0 0 0 4px var(--pin-pulse-color, var(--hdqa-status-open-bg));
    animation: none;
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        opacity 0.15s ease;
}

.hd-seo-qa-pin::before {
    display: none;
}

.hd-seo-qa-pin::after {
    width: 8px;
    height: 8px;
    background: var(--hdqa-bg-0);
    opacity: 0.92;
}

.hd-seo-qa-pin:hover,
.hd-seo-qa-pin-dragging,
.hd-seo-qa-pin-highlighted {
    transform: translate(-50%, -50%) rotate(-45deg) translateY(-2px) scale(1.08) !important;
    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.5),
        0 0 0 6px var(--hdqa-focus-ring);
    animation: none;
}

.hd-seo-qa-highlighted,
.hd-seo-qa-highlighted-active,
.hd-seo-qa-temp-highlight {
    outline: 2px solid var(--hdqa-accent) !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 0 5px var(--hdqa-status-open-bg) !important;
}

.hd-seo-qa-highlighted-active {
    animation: none;
}

.hd-seo-qa-modal-overlay {
    background: rgba(6, 8, 12, 0.7);
    backdrop-filter: blur(2px);
}

.hd-seo-qa-modal-content,
.hd-seo-qa-modal-modern,
.hd-seo-qa-all-notes-modal {
    border-radius: 14px;
    background: var(--hdqa-bg-1);
    border: 1px solid var(--hdqa-border);
    box-shadow: var(--hdqa-shadow-pop);
    color: var(--hdqa-text-1);
}

.hd-seo-qa-modal-modern {
    /* max-width: 620px; */
}

.hd-seo-qa-modal-header-modern,
.hd-seo-qa-modal-header,
.hd-seo-qa-modal-footer-modern,
.hd-seo-qa-modal-footer {
    border-color: var(--hdqa-border);
}

.hd-seo-qa-modal-title,
.hd-seo-qa-current-page-title {
    color: var(--hdqa-text-1);
    font: 600 17px/1.3 var(--hdqa-font);
    letter-spacing: 0;
}

.hd-seo-qa-modal-subtitle {
    margin-top: 4px;
}

.hd-seo-qa-modal-body-modern {
    padding: 18px;
}

.hd-seo-qa-label {
    margin-bottom: 7px;
}

.hd-seo-qa-input,
.hd-seo-qa-textarea,
.hd-seo-qa-select,
.hd-seo-qa-status-select {
    border: 1px solid var(--hdqa-border-2);
    border-radius: var(--hdqa-radius-md);
    background-color: var(--hdqa-bg-input);
    color: var(--hdqa-text-1);
    font: 500 13px/1.45 var(--hdqa-font);
}

.hd-seo-qa-input:focus,
.hd-seo-qa-textarea:focus,
.hd-seo-qa-select:focus,
.hd-seo-qa-status-select:focus {
    border-color: var(--hdqa-accent);
    box-shadow: 0 0 0 3px var(--hdqa-focus-ring);
}

.hd-seo-qa-device-btn,
.hd-seo-qa-role-btn,
.hd-seo-qa-file-label {
    border: 1px solid var(--hdqa-border);
    border-radius: var(--hdqa-radius-md);
    background: var(--hdqa-bg-2);
    color: var(--hdqa-text-2);
    box-shadow: none;
}

.hd-seo-qa-device-btn:hover,
.hd-seo-qa-role-btn:hover,
.hd-seo-qa-file-label:hover {
    border-color: var(--hdqa-border-2);
    background: var(--hdqa-bg-3);
    color: var(--hdqa-text-1);
    transform: translateY(-1px);
}

.hd-seo-qa-device-btn.active,
.hd-seo-qa-role-btn.active {
    border-color: var(--hdqa-accent);
    background: var(--hdqa-accent);
    color: #fff;
    box-shadow: 0 0 0 3px var(--hdqa-focus-ring);
}

.hd-seo-qa-file-text,
.hd-seo-qa-author-name,
.hd-seo-qa-date,
.hd-seo-qa-dialog-message,
.hd-seo-qa-message-content {
    color: var(--hdqa-text-1);
}

.hd-seo-qa-file-hint,
.hd-seo-qa-loading-state,
.hd-seo-qa-error-state,
.hd-seo-qa-empty-state {
    color: var(--hdqa-text-3);
}

.hd-seo-qa-author-avatar {
    background: var(--hdqa-bg-input);
    border: 1px solid var(--hdqa-border-2);
    color: var(--hdqa-text-2);
}

.hd-seo-qa-message-content {
    border-radius: var(--hdqa-radius-md);
    background: var(--hdqa-bg-2);
    border: 1px solid var(--hdqa-border);
    font: 500 13px/1.55 var(--hdqa-font);
}

.hd-seo-qa-preview-img,
.hd-seo-qa-detail-image,
.hd-seo-screenshot-thumbnail,
.hd-seo-screenshot-thumbnail-small,
.hd-seo-screenshot-thumbnail-detail {
    border-radius: var(--hdqa-radius-md) !important;
    border: 1px solid var(--hdqa-border-2) !important;
    background: var(--hdqa-bg-2);
}

.hd-seo-qa-dialog-icon {
    border-radius: var(--hdqa-radius-md);
    background: var(--hdqa-status-open-bg);
    color: var(--hdqa-status-open);
    box-shadow: inset 0 0 0 1px rgba(91, 157, 248, 0.2);
}

.hd-seo-qa-dialog-icon[data-variant="danger"] {
    background: var(--hdqa-status-not-completed-bg);
    color: var(--hdqa-status-not-completed);
    box-shadow: inset 0 0 0 1px rgba(238, 110, 110, 0.2);
}

.hd-seo-qa-notes-table-container {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
}

.hd-seo-qa-notes-table-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.hd-seo-qa-notes-table-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    border-radius: 6px;
    background-clip: padding-box;
}

.hd-seo-qa-notes-table {
    color: var(--hdqa-text-1);
}

.hd-seo-qa-notes-table thead,
.hd-seo-qa-notes-table th,
.hd-seo-qa-current-page-panel .hd-seo-qa-notes-table thead,
.hd-seo-qa-current-page-panel .hd-seo-qa-notes-table th {
    background: var(--hdqa-bg-input);
    color: var(--hdqa-text-3);
}

.hd-seo-qa-notes-table th {
    border-bottom: 1px solid var(--hdqa-border);
    font: 700 10.5px/1.2 var(--hdqa-mono);
    letter-spacing: 0.08em;
}

.hd-seo-qa-notes-table td,
.hd-seo-qa-current-page-panel .hd-seo-qa-notes-table td,
.hd-seo-qa-current-page-panel .hd-seo-qa-notes-table th {
    color: var(--hdqa-text-1);
    border-bottom-color: var(--hdqa-border);
}

.hd-seo-qa-notes-table tbody tr:hover,
.hd-seo-qa-current-page-panel .hd-seo-qa-notes-table tbody tr:hover {
    background: var(--hdqa-bg-2);
}

.hd-seo-qa-table-url a {
    color: var(--hdqa-accent);
}

.hd-seo-qa-table-url a:hover {
    color: var(--hdqa-accent-hover);
}

.hd-seo-qa-table-date {
    color: var(--hdqa-text-3);
}

.hd-seo-qa-view-note-btn,
.hd-seo-qa-copy-note-link-btn {
    border-radius: var(--hdqa-radius-sm);
    border: 1px solid var(--hdqa-border-2);
    background: var(--hdqa-bg-3);
    color: var(--hdqa-text-1);
    box-shadow: none;
}

.hd-seo-qa-view-note-btn:hover,
.hd-seo-qa-copy-note-link-btn:hover {
    border-color: var(--hdqa-accent);
    background: var(--hdqa-bg-3);
    color: #fff;
}

.hd-seo-qa-current-page-panel {
    border-radius: var(--hdqa-radius-lg);
    background: var(--hdqa-bg-1);
    box-shadow: var(--hdqa-shadow-panel);
}

.hd-seo-qa-current-page-panel-header {
    border-bottom-color: var(--hdqa-border);
}

.hd-seo-qa-current-page-toggle {
    border: 1px solid var(--hdqa-border-2);
    border-radius: var(--hdqa-radius-md);
    background: var(--hdqa-bg-2);
    color: var(--hdqa-text-1);
    font: 600 13px/1 var(--hdqa-font);
}

.hd-seo-qa-current-page-toggle:hover {
    border-color: var(--hdqa-border-3);
    background: var(--hdqa-bg-3);
}

.hd-seo-qa-current-page-toggle-icon {
    background: var(--hdqa-bg-3);
    color: var(--hdqa-accent);
}

@media (max-width: 720px) {
    #hd-seo-qa-toggle {
        right: 50% !important;
        bottom: max(16px, env(safe-area-inset-bottom, 16px));
        transform: translateX(50%);
    }

    #hd-seo-qa-toggle:hover,
    #hd-seo-qa-toggle.active:hover {
        transform: translateX(50%) translateY(-1px);
    }

    .hd-seo-qa-dropdown-panel {
        max-width: calc(100vw - 24px);
        border-radius: var(--hdqa-radius-lg);
    }

    .hd-seo-qa-modal {
        align-items: flex-end;
    }

    .hd-seo-qa-modal-content,
    .hd-seo-qa-modal-modern,
    .hd-seo-qa-all-notes-modal {
        width: 100%;
        max-width: 100%;
        max-height: 92vh;
        border-radius: 18px 18px 0 0;
    }

    .hd-seo-qa-modal-header-modern,
    .hd-seo-qa-modal-body-modern,
    .hd-seo-qa-modal-footer-modern {
        padding-right: 16px;
        padding-left: 16px;
    }

    .hd-seo-qa-current-page-panel {
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-height: 86vh;
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 18px 18px 0 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    #hd-seo-qa-toggle,
    .hd-seo-qa-dropdown,
    .hd-seo-qa-dropdown *,
    .hd-seo-qa-modal,
    .hd-seo-qa-modal *,
    .hd-seo-qa-current-page-panel,
    .hd-seo-qa-current-page-panel *,
    .hd-seo-qa-pin,
    .hd-seo-qa-highlighted,
    .hd-seo-qa-temp-highlight {
        transition: none !important;
        animation: none !important;
    }
}

/* Admin Visual Notes table polish. */
#hd-seo-visual-notes #hd-seo-visual-notes-table {
    --hdva-bg: #ffffff;
    --hdva-bg-soft: #f8fafc;
    --hdva-border: #e5e7eb;
    --hdva-border-strong: #d1d5db;
    --hdva-text: #111827;
    --hdva-muted: #667085;
    --hdva-accent: #2563eb;
    --hdva-accent-soft: #eff6ff;
    --hdva-success: #047857;
    --hdva-warning: #b45309;
    --hdva-danger: #b91c1c;
}

#hd-seo-visual-notes #hd-seo-visual-notes-table > .overflow-x-auto {
    border: 1px solid var(--hdva-border);
    border-radius: 12px;
    background: var(--hdva-bg);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    overflow: auto;
}

#hd-seo-visual-notes #hd-seo-visual-notes-table table {
    min-width: 1120px;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--hdva-text);
}

#hd-seo-visual-notes #hd-seo-visual-notes-table thead {
    background: var(--hdva-bg-soft);
}

#hd-seo-visual-notes #hd-seo-visual-notes-table th {
    padding: 12px 14px;
    border-bottom: 1px solid var(--hdva-border);
    color: #344054;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1.2;
    text-transform: uppercase;
    white-space: nowrap;
}

#hd-seo-visual-notes #hd-seo-visual-notes-table td {
    padding: 14px;
    border-bottom: 1px solid var(--hdva-border);
    color: #475467;
    font-size: 13px;
    line-height: 1.45;
    vertical-align: middle;
}

#hd-seo-visual-notes #hd-seo-visual-notes-table tbody tr {
    background: var(--hdva-bg);
    transition: background 0.12s ease;
}

#hd-seo-visual-notes #hd-seo-visual-notes-table tbody tr:hover {
    background: #fbfdff;
}

#hd-seo-visual-notes #hd-seo-visual-notes-table tbody tr:last-child td {
    border-bottom: 0;
}

#hd-seo-visual-notes #hd-seo-visual-notes-table th:nth-child(1),
#hd-seo-visual-notes #hd-seo-visual-notes-table td:nth-child(1) {
    width: 44px;
    text-align: center;
}

#hd-seo-visual-notes #hd-seo-visual-notes-table th:nth-child(2),
#hd-seo-visual-notes #hd-seo-visual-notes-table td:nth-child(2) {
    width: 58px;
    color: var(--hdva-text);
    font-weight: 700;
}

#hd-seo-visual-notes #hd-seo-visual-notes-table th:nth-child(3),
#hd-seo-visual-notes #hd-seo-visual-notes-table td:nth-child(3) {
    width: 118px;
}

#hd-seo-visual-notes #hd-seo-visual-notes-table th:nth-child(4),
#hd-seo-visual-notes #hd-seo-visual-notes-table td:nth-child(4) {
    width: 230px;
}

#hd-seo-visual-notes #hd-seo-visual-notes-table th:nth-child(5),
#hd-seo-visual-notes #hd-seo-visual-notes-table td:nth-child(5) {
    width: 260px;
}

#hd-seo-visual-notes #hd-seo-visual-notes-table th:nth-child(6),
#hd-seo-visual-notes #hd-seo-visual-notes-table td:nth-child(6) {
    width: 108px;
}

#hd-seo-visual-notes #hd-seo-visual-notes-table th:nth-child(10),
#hd-seo-visual-notes #hd-seo-visual-notes-table td:nth-child(10),
#hd-seo-visual-notes #hd-seo-visual-notes-table th:last-child,
#hd-seo-visual-notes #hd-seo-visual-notes-table td:last-child {
    width: 285px;
}

#hd-seo-visual-notes #hd-seo-visual-notes-table a {
    color: var(--hdva-accent);
    font-weight: 600;
    text-decoration: none;
}

#hd-seo-visual-notes #hd-seo-visual-notes-table a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

#hd-seo-visual-notes #hd-seo-visual-notes-table td:nth-child(4) a {
    display: inline-block;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    white-space: nowrap;
}

#hd-seo-visual-notes #hd-seo-visual-notes-table td:nth-child(5) {
    color: #344054;
}

#hd-seo-visual-notes #hd-seo-visual-notes-table td:nth-child(8),
#hd-seo-visual-notes #hd-seo-visual-notes-table td:nth-child(9) {
    color: var(--hdva-muted);
}

#hd-seo-visual-notes #hd-seo-visual-notes-table td:nth-child(10) > .flex,
#hd-seo-visual-notes #hd-seo-visual-notes-table td:last-child > .flex {
    display: grid;
    grid-template-columns: 86px 112px 132px;
    align-items: center;
    gap: 8px;
}

#hd-seo-visual-notes #hd-seo-visual-notes-table td:nth-child(10) a,
#hd-seo-visual-notes #hd-seo-visual-notes-table td:last-child a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 6px 9px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: var(--hdva-accent-soft);
    color: var(--hdva-accent);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
}

#hd-seo-visual-notes #hd-seo-visual-notes-table td:nth-child(10) a:hover,
#hd-seo-visual-notes #hd-seo-visual-notes-table td:last-child a:hover {
    border-color: #93c5fd;
    background: #dbeafe;
    color: #1d4ed8;
    text-decoration: none;
}

#hd-seo-visual-notes .hd-seo-note-status-change {
    width: 100%;
    min-width: 132px;
    min-height: 34px;
    padding: 7px 32px 7px 10px;
    border: 1px solid var(--hdva-border-strong);
    border-radius: 8px;
    background-color: #fff;
    color: var(--hdva-text);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    box-shadow: none;
}

#hd-seo-visual-notes .hd-seo-note-status-change:focus {
    border-color: var(--hdva-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
    outline: none;
}

#hd-seo-visual-notes .hd-seo-note-status-change:disabled {
    cursor: wait;
    opacity: 0.65;
}

#hd-seo-visual-notes .hd-seo-note-status-cell span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 22px;
    padding: 5px 9px;
    border: 0 !important;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1;
}

#hd-seo-visual-notes .hd-seo-note-status-cell span::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: currentColor;
}

#hd-seo-visual-notes .hd-seo-note-status-cell .bg-blue-100 {
    background: #dbeafe !important;
    color: #1d4ed8 !important;
}

#hd-seo-visual-notes .hd-seo-note-status-cell .bg-yellow-100 {
    background: #fef3c7 !important;
    color: var(--hdva-warning) !important;
}

#hd-seo-visual-notes .hd-seo-note-status-cell .bg-red-100 {
    background: #fee2e2 !important;
    color: var(--hdva-danger) !important;
}

#hd-seo-visual-notes .hd-seo-note-status-cell .bg-green-100 {
    background: #d1fae5 !important;
    color: var(--hdva-success) !important;
}

#hd-seo-visual-notes .hd-seo-screenshot-thumbnail {
    width: 56px !important;
    height: 56px !important;
    border: 1px solid var(--hdva-border);
    border-radius: 10px !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

#hd-seo-visual-notes #hd-seo-visual-notes-table td:nth-child(3) span {
    display: inline-flex;
    align-items: center;
    max-width: 82px;
    color: #98a2b3;
    font-size: 12px;
    line-height: 1.35;
}

#hd-seo-visual-notes #hd-seo-visual-notes-table input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border-color: var(--hdva-border-strong);
    border-radius: 4px;
    box-shadow: none;
}

#hd-seo-visual-notes #hd-seo-visual-notes-table + .mt-6,
#hd-seo-visual-notes #hd-seo-visual-notes-table .mt-4 {
    color: var(--hdva-muted);
    font-size: 13px;
}

@media (max-width: 1280px) {
    #hd-seo-visual-notes #hd-seo-visual-notes-table td:nth-child(10) > .flex,
    #hd-seo-visual-notes #hd-seo-visual-notes-table td:last-child > .flex {
        grid-template-columns: 1fr;
        justify-items: stretch;
    }
}
