/* Gateway Manual Viewer Styles */

.gateway-manual-viewer {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
}

/* Access Form */
.gateway-manual-access-form {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 40px 20px;
}

.gateway-access-box {
    background: #fff;
    border: 2px solid #0073aa;
    border-radius: 8px;
    padding: 40px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.gateway-access-box h2 {
    margin: 0 0 10px 0;
    color: #0073aa;
    font-size: 28px;
    text-align: center;
}

.gateway-access-box .subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-style: italic;
}

.gateway-access-box .form-group {
    margin-bottom: 20px;
}

.gateway-access-box label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.gateway-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
}

.gateway-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.gateway-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.gateway-btn-primary {
    background: #0073aa;
    color: #fff;
    width: 100%;
}

.gateway-btn-primary:hover {
    background: #005a87;
}

.gateway-error-message {
    margin-top: 15px;
    padding: 12px;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 4px;
    color: #c33;
}

/* Manual Wrapper */
.gateway-manual-wrapper {
    display: flex;
    gap: 30px;
    margin-top: 20px;
    max-width: 100%;
}

/* Sidebar */
.gateway-manual-sidebar {
    flex: 0 0 300px;
    position: sticky;
    top: 20px;
    height: fit-content;
    max-height: none;
    overflow: visible;
}

.gateway-manual-toc {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    overflow: visible;
    max-height: none;
}

.gateway-manual-toc h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #0073aa;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.toc-nav {
    margin-bottom: 20px;
    overflow: visible;
    max-height: none;
}

.toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow: visible;
    max-height: none;
}

.toc-section {
    margin-bottom: 8px;
}

.toc-section-link {
    display: block;
    padding: 10px 12px;
    color: #333;
    text-decoration: none;
    font-weight: bold;
    border-left: 3px solid transparent;
    transition: all 0.2s;
    cursor: pointer;
    border-radius: 3px;
}

.toc-section-link:hover,
.toc-section-link.active {
    background: #e8f4f8;
    border-left-color: #0073aa;
    color: #0073aa;
}

.toc-subsections {
    list-style: none;
    margin: 3px 0 0 0;
    padding: 0 0 0 15px;
}

.toc-subsections li {
    margin-bottom: 3px;
}

.toc-subsection-link {
    display: block;
    padding: 8px 12px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    border-left: 2px solid transparent;
    transition: all 0.2s;
    cursor: pointer;
    border-radius: 3px;
}

.toc-subsection-link:hover,
.toc-subsection-link.active {
    background: #f0f8fb;
    border-left-color: #0073aa;
    color: #0073aa;
}

/* Make entire TOC items clickable */
.toc-section,
.toc-subsections li {
    cursor: pointer;
}

.toc-section > *,
.toc-subsections li > * {
    pointer-events: none;
}

.toc-section-link,
.toc-subsection-link {
    pointer-events: auto;
}

.toc-search {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.toc-search input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* Main Content */
.gateway-manual-main {
    flex: 1;
    background: #fff;
    padding: 40px 60px;
    border: 1px solid #ddd;
    border-radius: 4px;
    line-height: 1.8;
    max-width: calc(100% - 330px);
}

.gateway-manual-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 3px solid #0073aa;
}

.gateway-manual-header h1 {
    margin: 0 0 10px 0;
    font-size: 32px;
    color: #0073aa;
}

.gateway-manual-header h2 {
    margin: 0 0 20px 0;
    font-size: 24px;
    color: #666;
    font-weight: normal;
}

.manual-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    font-size: 14px;
    color: #666;
}

.manual-meta span {
    padding: 5px 10px;
    background: #f5f5f5;
    border-radius: 3px;
}

/* Manual Sections */
.manual-section {
    margin-bottom: 50px;
    scroll-margin-top: 100px;
    scroll-padding-top: 100px;
}

.manual-section:target {
    animation: highlight-section 1s ease-in-out;
}

@keyframes highlight-section {
    0% { background-color: transparent; }
    50% { background-color: #fff9e6; }
    100% { background-color: transparent; }
}

.section-title {
    font-size: 24px;
    color: #0073aa;
    margin: 0 0 30px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #0073aa;
}

.subsection {
    margin-bottom: 40px;
    padding: 20px;
    background: #fafafa;
    border-left: 4px solid #0073aa;
    border-radius: 4px;
}

.subsection h3 {
    font-size: 20px;
    color: #333;
    margin: 0 0 15px 0;
}

.subsection h4 {
    font-size: 18px;
    color: #555;
    margin: 20px 0 10px 0;
}

.subsection p {
    margin: 15px 0;
    color: #444;
}

.subsection ul,
.subsection ol {
    margin: 15px 0;
    padding-left: 30px;
}

.subsection li {
    margin: 8px 0;
}

.subsection strong {
    color: #0073aa;
}

.checklist {
    list-style: none;
    padding-left: 0;
}

.checklist li {
    padding-left: 25px;
    position: relative;
}

.checklist li:before {
    content: "☐";
    position: absolute;
    left: 0;
    color: #0073aa;
    font-size: 18px;
}

.note {
    font-style: italic;
    color: #666;
    background: #fff9e6;
    padding: 10px 15px;
    border-left: 3px solid #ffc107;
    margin: 20px 0;
}

/* Pledge Section */
.pledge-section {
    background: #f0f8fb;
    padding: 30px;
    border: 2px solid #0073aa;
    border-radius: 8px;
    margin-top: 50px;
}

.pledge-content {
    text-align: center;
}

.pledge-list {
    text-align: left;
    max-width: 800px;
    margin: 20px auto;
}

.pledge-closing {
    margin-top: 30px;
    font-size: 18px;
    font-weight: bold;
    color: #0073aa;
}

.manual-footer {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid #ddd;
    text-align: center;
    color: #666;
    font-style: italic;
}

/* Search Highlight */
.search-highlight {
    background: #ffeb3b;
    padding: 2px 4px;
    border-radius: 2px;
}

/* Responsive */
@media (min-width: 1400px) {
    .gateway-manual-viewer {
        max-width: 1600px;
    }
    
    .gateway-manual-main {
        padding: 40px 80px;
    }
}

@media (max-width: 1024px) {
    .gateway-manual-wrapper {
        flex-direction: column;
    }
    
    .gateway-manual-sidebar {
        position: relative;
        max-height: none;
    }
    
    .gateway-manual-main {
        padding: 20px;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .gateway-manual-viewer {
        padding: 10px;
    }
    
    .gateway-access-box {
        padding: 30px 20px;
    }
    
    .gateway-manual-header h1 {
        font-size: 24px;
    }
    
    .gateway-manual-header h2 {
        font-size: 18px;
    }
    
    .manual-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .subsection {
        padding: 15px;
    }
}

