/* Template-Assisted Documentation Styles for Veritas AI */

/* Header */
.template-header {
    background: linear-gradient(135deg, #0a192f 0%, #0d47a1 100%);
    color: white;
    padding: 100px 0 50px;
    text-align: center;
}

.template-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.header-description {
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.9;
}

/* Main Section */
.template-docs-section {
    padding: 60px 0;
    background-color: #f8f9fa;
}

/* Sidebar Styles */
.template-sidebar {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
}

.sidebar-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #0a192f;
}

.search-box {
    position: relative;
}

.search-box input {
    padding-right: 30px;
}

.search-box i {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.template-categories {
    flex: 1;
    overflow-y: auto;
}

.category {
    border-bottom: 1px solid #e9ecef;
}

.category-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.category-header:hover {
    background-color: #f8f9fa;
}

.category-header i:first-child {
    margin-right: 10px;
    color: #0d6efd;
    width: 20px;
    text-align: center;
}

.category-header span {
    flex: 1;
    font-weight: 500;
    color: #0a192f;
}

.category-header i:last-child {
    color: #6c757d;
    font-size: 0.8rem;
}

.template-list {
    padding: 0 20px 15px 45px;
}

.template-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: 6px;
    margin-bottom: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.template-item:hover {
    background-color: #f1f3f9;
}

.template-item.active {
    background-color: #e9effd;
}

.template-item span:first-child {
    font-size: 0.9rem;
    color: #495057;
}

.template-item span.badge {
    font-size: 0.7rem;
    font-weight: 500;
}

.custom-template-section {
    padding: 20px;
    border-top: 1px solid #e9ecef;
}

/* Editor Styles */
.template-editor-container {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.editor-header {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.editor-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: #0a192f;
}

.template-badges {
    display: flex;
    gap: 5px;
}

.editor-actions {
    display: flex;
    align-items: center;
}

.editor-toolbar {
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.editor-content {
    padding: 0;
    flex: 1;
    overflow-y: auto;
    background-color: #f8f9fa;
}

#editor {
    padding: 20px;
    min-height: 500px;
    background-color: white;
    border: 1px solid #e9ecef;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    margin: 20px;
}

#editor h1 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #0a192f;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e9ecef;
}

#editor h2 {
    font-size: 1.3rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    color: #0a192f;
}

#editor p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

#editor ul, #editor ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

#editor li {
    margin-bottom: 0.5rem;
}

#editor table {
    width: 100%;
    margin-bottom: 1rem;
    border-collapse: collapse;
}

#editor table th, #editor table td {
    padding: 0.5rem;
    border: 1px solid #dee2e6;
}

#editor table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.highlight {
    background-color: #fff3cd;
    padding: 0.2rem 0.3rem;
    border-radius: 3px;
}

.prompt {
    color: #856404;
    font-style: italic;
}

.template-footer {
    padding: 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.completion-status {
    display: flex;
    align-items: center;
    flex: 1;
}

.completion-status .progress {
    flex: 1;
    margin-right: 10px;
    height: 8px;
}

.completion-status span {
    font-size: 0.9rem;
    color: #6c757d;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

/* AI Recommendations Styles */
.ai-recommendations {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-top: 15px;
    overflow: hidden;
}

.recommendations-header {
    padding: 15px 20px;
    background-color: #f0f7ff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e9ecef;
}

.recommendations-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: #0a192f;
}

.recommendations-header i {
    color: #0d6efd;
}

.recommendations-body {
    padding: 20px;
    max-height: 500px;
    overflow-y: auto;
}

.recommendation-item {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e9ecef;
}

.recommendation-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.recommendation-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #0a192f;
}

.recommendation-content p {
    margin-bottom: 10px;
    color: #495057;
}

.recommendation-content ul, .recommendation-content ol {
    margin-bottom: 15px;
}

.insert-btn {
    margin-top: 10px;
}

/* Feature Cards */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #0a192f;
}

.section-description {
    font-size: 1.1rem;
    color: #495057;
    max-width: 800px;
    margin: 0 auto;
}

.feature-card {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 30px;
    height: 100%;
    transition: transform 0.3s ease;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background-color: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.feature-icon i {
    font-size: 1.8rem;
}

.feature-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #0a192f;
}

.feature-card p {
    font-size: 0.95rem;
    color: #495057;
    margin-bottom: 0;
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .template-header {
        padding: 80px 0 40px;
    }
    
    .template-header h1 {
        font-size: 2.2rem;
    }
    
    .template-sidebar {
        margin-bottom: 30px;
        max-height: 300px;
    }
    
    .editor-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .editor-actions {
        margin-top: 15px;
    }
    
    .template-footer {
        flex-direction: column;
        gap: 15px;
    }
    
    .completion-status {
        width: 100%;
    }
    
    .action-buttons {
        width: 100%;
    }
}

@media (max-width: 767px) {
    .template-header {
        padding: 70px 0 30px;
    }
    
    .template-header h1 {
        font-size: 1.8rem;
    }
    
    .editor-toolbar {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .editor-toolbar .btn-group {
        margin-bottom: 5px;
    }
    
    #editor {
        margin: 10px;
        padding: 15px;
    }
}
