/* help_page/styles.css */

/* Comment out or remove the entire block of header overrides */
/*
.header .navbar {
    padding: 1rem 0 !important;
}

.header .navbar-nav {
    gap: 0 !important;
}

.header .navbar-nav .nav-item {
    margin: 0 !important;
}

.header .navbar-nav .nav-link {
    padding: 0.5rem 1rem !important;
    margin: 0 !important;
}

.header .navbar-nav .btn {
    margin-left: 1rem !important;
    padding: 0.5rem 1.5rem !important;
}

.header .container {
    max-width: 1320px !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

.header .navbar-brand {
    margin-right: auto !important;
}

.header .navbar-collapse {
    flex-grow: 0 !important;
}

.header .navbar > .container {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.header .navbar-nav {
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
}

.header .navbar-nav > * + * {
    margin-left: 0 !important;
}
*/

/* Fix badge sizes */
.badge {
    font-size: 0.75rem !important;
    padding: 0.25rem 0.5rem !important;
    font-weight: 500 !important;
}

/* Reset text sizes for help content */
.help-container {
    font-size: 14px !important;
}

.help-container h1 {
    font-size: 2rem !important;
}

.help-container h2 {
    font-size: 1.5rem !important;
}

.help-container h3 {
    font-size: 1.25rem !important;
}

.help-container h4 {
    font-size: 1.1rem !important;
}

.help-container p,
.help-container li {
    font-size: 14px !important;
}

/* Ensure footer text sizes are consistent */
.footer {
    font-size: 14px !important;
}

/* Original help page styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
}

/* Help Container */
.help-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Search Container */
.search-container {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

#search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

#search-input:focus {
    outline: none;
    border-color: #007bff;
}

#search-button {
    padding: 0.75rem 1.5rem;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

#search-button:hover {
    background: #0056b3;
}

/* Mobile Menu Toggle Button - Hidden by default */
.mobile-menu-toggle {
    display: none;
    background: #007bff;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background 0.3s;
    margin-bottom: 1rem;
    width: 100%;
    text-align: left;
    align-items: center;
    gap: 0.5rem;
}

.mobile-menu-toggle:hover {
    background: #0056b3;
}

.mobile-menu-toggle i {
    transition: transform 0.3s;
}

.mobile-menu-toggle.active i {
    transform: rotate(180deg);
}

/* Content Wrapper */
.content-wrapper {
    display: flex;
    gap: 2rem;
}

/* Side Navigation */
.side-nav {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 280px;
    flex-shrink: 0;
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.side-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.side-nav li {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.side-nav li:hover {
    background: #f0f0f0;
}

.side-nav li.active {
    background: #007bff;
    color: white;
}

.side-nav li i {
    width: 20px;
    text-align: center;
}

/* Content Area */
.content-area {
    flex: 1;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Top Tabs */
.top-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0;
}

.top-tab {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
    font-weight: 500;
    color: #666;
}

.top-tab:hover {
    color: #007bff;
}

.top-tab.active {
    color: #007bff;
}

.top-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #007bff;
}

/* Subtab Content */
.subtab-content {
    display: none;
}

.subtab-content.active {
    display: block;
}

/* Badges */
.badge.family {
    background: #28a745;
    color: white;
}

.badge.individual {
    background: #17a2b8;
    color: white;
}

.badge.pro {
    background: #ff9800;
    color: white;
}

.badge.enterprise {
    background: #9c27b0;
    color: white;
}

/* Feature Highlight */
.feature-highlight {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.feature-highlight h3 {
    margin-bottom: 1rem;
    color: #333;
}

/* System Type Cards */
.system-type-card {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.system-type-header {
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.system-type-header.family {
    background: #e8f5e9;
}

.system-type-header.individual {
    background: #e3f2fd;
}

.system-type-content {
    padding: 1.5rem;
}

/* Note Box */
.note-box {
    background: #fff3cd;
    border-left: 4px solid #ff9800;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 4px;
}

/* Step Guide */
.step-guide {
    margin: 2rem 0;
}

.step {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: flex-start;
}

.step-number {
    background: #007bff;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.step-content h3 {
    margin-bottom: 0.5rem;
}

/* Tier Cards */
.tier-cards {
    display: flex;
    gap: 1.5rem;
    margin: 2rem 0;
}

.tier-card {
    flex: 1;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.tier-header {
    padding: 1.5rem;
    text-align: center;
}

.tier-header.basic {
    background: #f8f9fa;
}

.tier-header.pro {
    background: #fff3e0;
}

.tier-header.enterprise {
    background: #f3e5f5;
}

.tier-header h4 {
    margin-bottom: 0.5rem;
}

.price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #007bff;
}

.tier-content {
    padding: 1.5rem;
}

.tier-content ul {
    list-style: none;
}

.tier-content li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.tier-content li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #28a745;
}

/* Screenshot Container */
.screenshot-container {
    margin: 2rem 0;
    text-align: center;
}

.screenshot {
    max-width: 100%;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.caption {
    margin-top: 1rem;
    color: #666;
    font-style: italic;
}

/* Feature Cards */
.feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.feature-card {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
}

.card-icon {
    font-size: 2rem;
    color: #007bff;
    flex-shrink: 0;
}

.card-content h3 {
    margin-bottom: 0.5rem;
}

/* System Type Note */
.system-type-note {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 4px;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.system-type-note .icon {
    color: #2196f3;
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* Subscription Note */
.subscription-note {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 4px;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.subscription-note .icon {
    color: #ff9800;
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* Comparison Table */
.comparison-table {
    margin: 2rem 0;
    overflow-x: auto;
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.comparison-table th,
.comparison-table td {
    padding: 1rem;
    text-align: left;
    border: 1px solid #e0e0e0;
}

.comparison-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.comparison-table tr:nth-child(even) {
    background: #f8f9fa;
}

/* Security Highlight */
.security-highlight {
    background: #e8f5e9;
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.security-highlight .icon {
    font-size: 3rem;
    color: #28a745;
    flex-shrink: 0;
}

/* Enhanced Responsive Styles */

/* Base responsive adjustments */
@media (max-width: 1200px) {
    .help-container {
        padding: 0 1rem;
        margin: 1.5rem auto;
    }
    
    .content-wrapper {
        gap: 1.5rem;
    }
    
    .side-nav {
        width: 250px;
    }
}

/* Tablet styles */
@media (max-width: 992px) {
    .help-container {
        margin: 1rem auto;
    }
    
    .search-container {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .content-wrapper {
        gap: 1rem;
    }
    
    .side-nav {
        width: 220px;
        padding: 1rem;
    }
    
    .side-nav li {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .content-area {
        padding: 1.5rem;
    }
    
    /* Make feature cards stack better */
    .feature-cards {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    /* Tier cards responsive */
    .tier-cards {
        flex-direction: column;
        gap: 1rem;
    }
    
    /* Top tabs responsive */
    .top-tabs {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .top-tab {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

/* Mobile landscape and small tablets */
@media (max-width: 768px) {
    .help-container {
        padding: 0 0.75rem;
        margin: 0.75rem auto;
    }
    
    .search-container {
        padding: 1rem;
        margin-bottom: 1rem;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    #search-input {
        width: 100%;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    #search-button {
        width: 100%;
        padding: 0.75rem;
    }
    
    /* Show mobile menu toggle */
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Stack the main layout */
    .content-wrapper {
        flex-direction: column;
        gap: 1rem;
    }
    
    .side-nav {
        width: 100%;
        position: static;
        padding: 0;
        margin-bottom: 1rem;
        order: 1; /* Move sidebar to top on mobile */
        background: transparent;
        box-shadow: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    }
    
    .side-nav.open {
        max-height: 800px; /* Adjust based on content */
        padding: 1rem;
        background: white;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        border-radius: 10px;
    }
    
    .side-nav ul {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 0.5rem;
    }
    
    .side-nav li {
        flex: none;
        text-align: center;
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
        margin-bottom: 0;
    }
    
    .side-nav li i {
        display: block;
        margin-bottom: 0.25rem;
        width: auto;
    }
    
    .content-area {
        padding: 1rem;
        order: 2; /* Move content below collapsible menu */
    }
    
    /* Top tabs mobile */
    .top-tabs {
        flex-wrap: wrap;
        gap: 0.25rem;
        margin-bottom: 1.5rem;
    }
    
    .top-tab {
        flex: 1;
        min-width: calc(50% - 0.125rem);
        padding: 0.6rem 0.5rem;
        font-size: 0.85rem;
        text-align: center;
    }
    
    /* Feature cards mobile */
    .feature-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .feature-card {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .card-icon {
        font-size: 2.5rem;
        align-self: center;
    }
    
    /* Step guide mobile */
    .step {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .step-number {
        align-self: center;
    }
    
    /* Tier cards mobile */
    .tier-cards {
        flex-direction: column;
    }
    
    /* Tables responsive */
    .comparison-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .comparison-table table {
        min-width: 500px;
        font-size: 0.85rem;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 0.75rem 0.5rem;
        white-space: nowrap;
    }
    
    /* Screenshots */
    .screenshot-container {
        margin: 1.5rem 0;
    }
    
    .screenshot {
        border-width: 1px;
    }
    
    /* Note boxes and highlights */
    .note-box,
    .feature-highlight,
    .system-type-note,
    .subscription-note,
    .security-highlight {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .security-highlight {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .security-highlight .icon {
        align-self: center;
        font-size: 2.5rem;
    }
    
    /* Typography adjustments */
    .help-container h1 {
        font-size: 1.75rem !important;
        margin-bottom: 1rem;
    }
    
    .help-container h2 {
        font-size: 1.4rem !important;
        margin-bottom: 0.75rem;
    }
    
    .help-container h3 {
        font-size: 1.15rem !important;
        margin-bottom: 0.5rem;
    }
    
    .help-container h4 {
        font-size: 1rem !important;
    }
    
    /* Badges responsive */
    .badge {
        font-size: 0.7rem !important;
        padding: 0.2rem 0.4rem !important;
    }
}

/* Mobile portrait */
@media (max-width: 576px) {
    .help-container {
        padding: 0 0.5rem;
        margin: 0.5rem auto;
    }
    
    .search-container {
        padding: 0.75rem;
        border-radius: 8px;
    }
    
    .side-nav ul {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
    
    .side-nav li {
        padding: 0.6rem;
        font-size: 0.8rem;
    }
    
    .content-area {
        padding: 0.75rem;
        border-radius: 8px;
    }
    
    /* Top tabs full width on small mobile */
    .top-tab {
        min-width: 100%;
        margin-bottom: 0.25rem;
        padding: 0.75rem;
    }
    
    /* Typography for very small screens */
    .help-container h1 {
        font-size: 1.5rem !important;
    }
    
    .help-container h2 {
        font-size: 1.25rem !important;
    }
    
    .help-container h3 {
        font-size: 1.1rem !important;
    }
    
    .help-container p,
    .help-container li {
        font-size: 13px !important;
        line-height: 1.5;
    }
    
    /* Step guide very small screens */
    .step-content {
        text-align: left;
    }
    
    /* Reduce spacing */
    .feature-highlight,
    .note-box,
    .system-type-note,
    .subscription-note {
        padding: 0.75rem;
        margin: 0.75rem 0;
    }
    
    .step-guide {
        margin: 1rem 0;
    }
    
    .step {
        margin-bottom: 1.5rem;
    }
    
    /* Tables very small screens */
    .comparison-table th,
    .comparison-table td {
        padding: 0.5rem 0.25rem;
        font-size: 0.8rem;
    }
    
    /* Screenshot adjustments */
    .screenshot-container {
        margin: 1rem 0;
    }
    
    .caption {
        font-size: 0.8rem;
        margin-top: 0.5rem;
    }
}

/* Landscape phone orientation */
@media (max-width: 896px) and (orientation: landscape) and (max-height: 500px) {
    .side-nav {
        position: static;
    }
    
    .help-container {
        margin: 0.5rem auto;
    }
    
    .search-container {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .content-area {
        padding: 1rem;
    }
}

/* High DPI screens - ensure crisp rendering */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .screenshot {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .side-nav li,
    .top-tab,
    #search-button,
    .mobile-menu-toggle {
        min-height: 44px; /* iOS recommended touch target size */
    }
    
    .side-nav li {
        padding: 0.75rem;
    }
    
    .top-tab {
        padding: 0.75rem 1rem;
    }
    
    /* Remove hover effects that don't work on touch */
    .side-nav li:hover {
        background: transparent;
    }
    
    .side-nav li.active:hover {
        background: #007bff;
    }
    
    .top-tab:hover {
        color: inherit;
    }
    
    .top-tab.active:hover {
        color: #007bff;
    }
    
    .mobile-menu-toggle:hover {
        background: #007bff;
    }
}

/* Improve accessibility */
@media (prefers-reduced-motion: reduce) {
    .side-nav li,
    .top-tab,
    #search-input,
    #search-button,
    .mobile-menu-toggle,
    .side-nav {
        transition: none;
    }
}

/* Print styles for help content */
@media print {
    .search-container,
    .side-nav,
    .mobile-menu-toggle {
        display: none;
    }
    
    .content-wrapper {
        flex-direction: column;
    }
    
    .content-area {
        box-shadow: none;
        border: 1px solid #ccc;
        padding: 1rem;
    }
    
    .top-tabs {
        display: none;
    }
    
    .subtab-content {
        display: block !important;
    }
    
    .help-container {
        margin: 0;
        padding: 0;
    }
    
    .badge {
        border: 1px solid #ccc;
        background: transparent !important;
        color: #000 !important;
    }
}

/* Hide family-only elements in individual system */
body.individual-system .family-only {
    display: none !important;
}