.helpPopup {
    display: none;
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid var(--border-color);
    background: var(--surface-elevated);
    color: var(--text-primary);
    padding: 20px;
    z-index: 100020;

    max-width: 80vw;
    max-height: 80vh;

    width: 600px;
    height: auto;

    overflow: auto;

    box-shadow: var(--shadow-popup);
    border-radius: var(--radius-lg, 12px);
    font-family: var(--font-ui, ui-sans-serif, system-ui, sans-serif);
    font-size: 14px;
}

.popup-close-button {
    cursor: pointer;
    position: absolute;
    right: 10px;
    top: 5px;
    color: var(--text-secondary);
    font-size: 22px;
    line-height: 1;
}

.popup-close-button:hover {
    color: var(--text-primary);
}

#productDescriptionPopup h2 {
    padding-right: 56px;
}

#product-description-edit-btn {
    position: absolute;
    top: 8px;
    right: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 4px;
    opacity: 0.5;
    color: var(--text-secondary);
    line-height: 1;
}

#product-description-edit-btn:hover {
    opacity: 1;
    color: var(--text-primary);
}

html[data-theme='dark'] #product-description-edit-btn img {
    filter: invert(1);
}

#product-description-edit-area {
    display: none;
    margin: 1em 0;
    box-sizing: border-box;
}

#product-description-textarea {
    width: 100%;
    min-height: 180px;
    resize: vertical;
    font-size: inherit;
    font-family: inherit;
    background: var(--surface-muted, var(--surface-elevated));
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 10px;
    box-sizing: border-box;
    display: block;
    line-height: 1.5;
}

.product-description-edit-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    margin-top: 8px;
}

.product-description-edit-actions button {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 4px;
    cursor: pointer;
    background: var(--surface-elevated);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.product-description-edit-actions .product-description-save-btn {
    background: var(--accent-color, #4a90d9);
    color: #fff;
    border: none;
}

.helpPopup h1,
.helpPopup h2,
.helpPopup h3,
.helpPopup h4,
.helpPopup p,
.helpPopup li,
.helpPopup label,
.helpPopup strong,
.helpPopup b {
    color: inherit;
}

.helpPopup a {
    color: var(--link-color);
}

.helpPopup .highlight {
    background-color: var(--surface-hover-soft) !important;
    color: var(--text-primary) !important;
}

.helpPopup .contact {
    background-color: var(--surface-bg) !important;
    border-left-color: var(--theme-hover-border) !important;
}

.helpPopup .last-updated {
    color: var(--text-secondary) !important;
}

.helpPopup hr {
    border-color: var(--border-color);
}
