/* Help Overlay - Large modal explaining the application */

.help-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 15000;
    opacity: 0;
    transition: opacity 0.3s ease-out;
    overflow-y: auto;
    padding: 20px;
}

.help-overlay.show {
    opacity: 1;
}

.help-overlay-content {
    background: var(--cream);
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
    max-width: 1300px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease-out;
    overflow: hidden;
}

.help-overlay.show .help-overlay-content {
    transform: scale(1) translateY(0);
}

/* Header - Fixed at top */
.help-overlay-header {
    padding: 20px 30px;
    background: var(--dark-gray);
    border-radius: 16px 16px 0 0;
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.help-overlay-header-content {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.help-overlay-logo {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.help-overlay-logo svg {
    width: 100%;
    height: 100%;
}

.help-overlay-title-wrapper {
    flex: 1;
}

.help-overlay-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--cream);
    margin: 0 0 4px 0;
}

.help-overlay-subtitle {
    font-size: 14px;
    color: var(--tan);
    margin: 0;
    line-height: 1.5;
}

.help-overlay-close {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: var(--cream);
    font-size: 28px;
    line-height: 0;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
    padding: 0;
}

.help-overlay-close:hover {
    background: var(--accent-orange);
}

/* Main container - holds nav and body side by side */
.help-overlay-main {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Left Navigation */
.help-overlay-nav {
    width: 280px;
    flex-shrink: 0;
    background: #f5f4f2;
    padding: 30px 20px;
    overflow-y: auto;
    border-right: 2px solid var(--tan);
}

.help-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: var(--almost-black);
    text-decoration: none;
    border-radius: 6px;
    margin-bottom: 6px;
    transition: all 0.2s;
    font-size: 14px;
    cursor: pointer;
}

.help-nav-item:hover {
    background: rgba(204, 197, 185, 0.3);
}

.help-nav-item.active {
    background: rgba(204, 197, 185, 0.3);
    color: var(--almost-black);
}

.help-nav-item .material-symbols-outlined {
    font-size: 20px;
    flex-shrink: 0;
}

/* Interactive Help Mode Toggle in Navigation - at Top */
.help-nav-mode-toggle {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(204, 197, 185, 0.4);
}

.help-nav-mode-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.help-nav-mode-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark-gray);
    display: flex;
    align-items: center;
    gap: 8px;
}

.help-nav-mode-title .material-symbols-outlined {
    font-size: 20px;
    color: var(--accent-orange);
}

.help-nav-mode-toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.help-nav-mode-toggle-label:hover {
    background: rgba(204, 197, 185, 0.2);
}

.help-nav-mode-toggle-input {
    display: none;
}

.help-nav-mode-toggle-slider {
    width: 40px;
    height: 20px;
    background: rgba(204, 197, 185, 0.3);
    border-radius: 10px;
    position: relative;
    transition: background 0.3s;
    flex-shrink: 0;
}

.help-nav-mode-toggle-slider::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.help-nav-mode-toggle-input:checked + .help-nav-mode-toggle-slider {
    background: var(--accent-orange);
}

.help-nav-mode-toggle-input:checked + .help-nav-mode-toggle-slider::before {
    transform: translateX(20px);
}

.help-nav-mode-toggle-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--almost-black);
    transition: color 0.3s;
}

.help-nav-mode-label-on {
    display: none;
}

.help-nav-mode-toggle-input:checked ~ .help-nav-mode-toggle-text {
    color: var(--accent-orange);
}

.help-nav-mode-toggle-input:checked ~ .help-nav-mode-toggle-text .help-nav-mode-label-off {
    display: none;
}

.help-nav-mode-toggle-input:checked ~ .help-nav-mode-toggle-text .help-nav-mode-label-on {
    display: inline;
}

.help-nav-mode-description {
    margin: 10px 0 0 0;
    padding: 0 12px;
    font-size: 11px;
    color: var(--almost-black);
    opacity: 0.7;
    line-height: 1.4;
}

/* Subscribe Form in Navigation */
.help-nav-subscribe {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(204, 197, 185, 0.4);
}

.help-nav-subscribe-title {
    display: none;
}

.help-nav-subscribe-form {
    padding: 0;
}

.help-nav-subscribe-form .mc-field-group {
    margin-bottom: 10px;
}

.help-nav-subscribe-form input[type="email"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--tan);
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    background: white;
    color: var(--almost-black);
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.help-nav-subscribe-form input[type="email"]:focus {
    outline: none;
    border-color: var(--accent-orange);
}

.help-nav-subscribe-form .button {
    width: 100%;
    background: var(--accent-orange);
    border: none;
    color: var(--cream);
    padding: 10px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(235, 94, 40, 0.2);
}

.help-nav-subscribe-form .button:hover {
    filter: brightness(1.15);
    box-shadow: 0 3px 9px rgba(235, 94, 40, 0.3);
}

.help-nav-subscribe-form .response {
    padding: 8px;
    border-radius: 4px;
    font-size: 11px;
    margin-top: 10px;
}

.help-nav-subscribe-form #mce-error-response {
    background: #fee;
    border: 1px solid #fcc;
    color: #c00;
}

.help-nav-subscribe-form #mce-success-response {
    background: #efe;
    border: 1px solid #cfc;
    color: #060;
}

.help-nav-subscribe-note {
    margin: 12px 0 0 0;
    padding: 0;
    font-size: 11px;
    color: var(--almost-black);
    opacity: 0.7;
    font-style: italic;
    text-align: center;
    line-height: 1.4;
}

/* Scrollbar for nav */
.help-overlay-nav::-webkit-scrollbar {
    width: 8px;
}

.help-overlay-nav::-webkit-scrollbar-track {
    background: rgba(204, 197, 185, 0.2);
}

.help-overlay-nav::-webkit-scrollbar-thumb {
    background: var(--tan);
    border-radius: 4px;
}

.help-overlay-nav::-webkit-scrollbar-thumb:hover {
    background: var(--dark-gray);
}

/* Body - Scrollable content area */
.help-overlay-body {
    padding: 40px 60px 40px 60px;
    overflow-y: auto;
    flex: 1;
}

.help-section {
    margin-bottom: 40px;
    scroll-margin-top: 20px;
}

.help-section:first-child {
    margin-top: 0;
}

.help-section:last-child {
    margin-bottom: 0;
}

.help-section-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--dark-gray);
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.help-section-title .material-symbols-outlined {
    font-size: 28px;
    color: var(--accent-orange);
}

.help-section-text {
    font-size: 15px;
    line-height: 1.7;
    color: var(--almost-black);
    margin: 0 0 20px 0;
}

/* Features Grid */
.help-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Features Separator */
.help-features-separator {
    height: 1px;
    background: linear-gradient(to right, transparent, var(--tan), transparent);
    margin: 40px 0 30px 0;
}

/* Features Subheading */
.help-features-subheading {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark-gray);
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.help-features-subheading .material-symbols-outlined {
    font-size: 24px;
    color: var(--accent-orange);
}

.help-feature {
    background: white;
    border: 1px solid var(--tan);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.2s;
}

.help-feature:hover {
    border-color: var(--accent-orange);
    box-shadow: 0 4px 12px rgba(235, 94, 40, 0.15);
    transform: translateY(-2px);
}

.help-feature-icon {
    font-size: 48px;
    color: var(--accent-orange);
    margin-bottom: 12px;
}

.help-feature h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark-gray);
    margin: 0 0 8px 0;
}

.help-feature p {
    font-size: 13px;
    line-height: 1.6;
    color: var(--almost-black);
    margin: 0 0 12px 0;
}

/* Feature shortcuts section */
.help-feature-shortcuts {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(204, 197, 185, 0.3);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.help-feature-shortcut {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    line-height: 1.6;
}

.help-shortcut-action {
    color: var(--almost-black);
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.help-shortcut-action kbd {
    display: inline-block;
    padding: 2px 6px;
    background: var(--dark-gray);
    border: 1px solid var(--tan);
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    font-weight: 600;
    color: var(--cream);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    line-height: 1.4;
}

/* Shortcuts Grid */
.help-shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.help-shortcut {
    background: white;
    border: 1px solid var(--tan);
    border-radius: 6px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.help-shortcut kbd {
    display: inline-block;
    padding: 4px 10px;
    background: var(--dark-gray);
    border: 1px solid var(--tan);
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    font-weight: 600;
    color: var(--cream);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.help-shortcut span {
    font-size: 14px;
    color: var(--almost-black);
}

/* Tips List */
.help-tips-list {
    list-style: none;
    padding: 0;
    margin: 20px 0 0 0;
}

.help-tips-list li {
    padding: 12px 0 12px 32px;
    position: relative;
    font-size: 15px;
    line-height: 1.6;
    color: var(--almost-black);
    border-bottom: 1px solid rgba(204, 197, 185, 0.3);
}

.help-tips-list li:last-child {
    border-bottom: none;
}

.help-tips-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 12px;
    width: 24px;
    height: 24px;
    background: var(--accent-orange);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.inline-icon {
    font-size: 16px;
    vertical-align: middle;
    margin: 0 2px;
    color: var(--accent-orange);
}

/* Help Mode Section Title with Toggle */
.help-section-title-with-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.help-section-title-text {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Inline Help Mode Toggle */
.help-mode-toggle-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.help-mode-toggle-inline:hover {
    background: rgba(235, 94, 40, 0.05);
}

.help-mode-toggle-inline-input {
    display: none;
}

.help-mode-toggle-inline-slider {
    width: 40px;
    height: 20px;
    background: rgba(204, 197, 185, 0.3);
    border-radius: 10px;
    position: relative;
    transition: background 0.3s;
    flex-shrink: 0;
}

.help-mode-toggle-inline-slider::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.help-mode-toggle-inline-input:checked + .help-mode-toggle-inline-slider {
    background: var(--accent-orange);
}

.help-mode-toggle-inline-input:checked + .help-mode-toggle-inline-slider::before {
    transform: translateX(20px);
}

.help-mode-toggle-inline-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--dark-gray);
    transition: color 0.3s;
}

.help-mode-inline-label-on {
    display: none;
}

.help-mode-toggle-inline-input:checked ~ .help-mode-toggle-inline-label {
    color: var(--accent-orange);
}

.help-mode-toggle-inline-input:checked ~ .help-mode-toggle-inline-label .help-mode-inline-label-off {
    display: none;
}

.help-mode-toggle-inline-input:checked ~ .help-mode-toggle-inline-label .help-mode-inline-label-on {
    display: inline;
}

/* Close button section - at bottom of scrollable content */
.help-overlay-close-section {
    padding: 40px 0 0 0;
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.help-overlay-btn-primary {
    background: var(--accent-orange);
    border: none;
    color: var(--cream);
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(235, 94, 40, 0.3);
}

.help-overlay-btn-primary:hover {
    background: var(--accent-orange);
    filter: brightness(1.15);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(235, 94, 40, 0.4);
}

.help-overlay-btn-primary:active {
    transform: translateY(0);
}

.help-overlay-btn-primary .material-symbols-outlined {
    font-size: 24px;
}

/* Scrollbar for overlay body */
.help-overlay-body::-webkit-scrollbar {
    width: 10px;
}

.help-overlay-body::-webkit-scrollbar-track {
    background: rgba(204, 197, 185, 0.2);
}

.help-overlay-body::-webkit-scrollbar-thumb {
    background: var(--tan);
    border-radius: 5px;
}

.help-overlay-body::-webkit-scrollbar-thumb:hover {
    background: var(--dark-gray);
}

/* Responsive adjustments */
@media (max-width: 968px) {
    .help-overlay-nav {
        display: none;
    }

    .help-overlay-content {
        max-width: 900px;
    }
}

@media (max-width: 768px) {
    .help-overlay {
        padding: 10px;
    }

    .help-overlay-header,
    .help-overlay-body {
        padding-left: 30px;
        padding-right: 30px;
    }

    .help-overlay-title {
        font-size: 24px;
    }

    .help-features-grid,
    .help-shortcuts-grid {
        grid-template-columns: 1fr;
    }
}
