/* Documentation Specific Styles */

/* Documentation Layout */
.docs-container {
    display: flex;
    margin-top: 70px;
    min-height: calc(100vh - 70px);
}

/* Sidebar */
.docs-sidebar {
    width: 280px;
    background: white;
    border-right: 1px solid var(--border-color);
    padding: 30px 20px;
    position: sticky;
    top: 70px;
    height: calc(100vh - 70px);
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: 30px;
}

.sidebar-section h3 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-color);
    margin-bottom: 15px;
    font-weight: 600;
}

.sidebar-section ul {
    list-style: none;
}

.sidebar-link {
    display: block;
    padding: 8px 12px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 6px;
    transition: var(--transition);
    font-size: 0.95rem;
}

.sidebar-link:hover {
    background: var(--light-color);
    color: var(--primary-color);
}

.sidebar-link.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-weight: 500;
}

/* Main Content */
.docs-main {
    flex: 1;
    padding: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.docs-section {
    margin-bottom: 60px;
}

.docs-section h1 {
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.docs-section h2 {
    font-size: 2rem;
    color: var(--dark-color);
    margin-top: 40px;
    margin-bottom: 20px;
}

.docs-section h3 {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin-top: 30px;
    margin-bottom: 15px;
}

.docs-section p {
    line-height: 1.8;
    margin-bottom: 15px;
}

/* Alert Boxes */
.alert {
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.alert i {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.alert-warning {
    background: linear-gradient(135deg, #fed7aa, #fbbf24);
    color: #92400e;
    border: 1px solid #f59e0b;
}

.alert-danger {
    background: linear-gradient(135deg, #fecaca, #fca5a5);
    color: #991b1b;
    border: 1px solid #f87171;
}

.alert-info {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
    border: 1px solid #6ee7b7;
}

/* Requirement Cards */
.requirement-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.req-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: var(--transition);
}

.req-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.req-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.req-icon i {
    font-size: 1.5rem;
    color: white;
}

.req-card h3 {
    font-size: 1.125rem;
    margin-bottom: 10px;
}

.req-card code {
    display: block;
    margin-top: 10px;
    padding: 8px;
    background: var(--light-color);
    border-radius: 4px;
    font-size: 0.875rem;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fed7aa;
    color: #92400e;
}

.badge-danger {
    background: #fecaca;
    color: #991b1b;
}

/* Steps Container */
.steps-container {
    margin: 30px 0;
}

.step {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    position: relative;
}

.step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 25px;
    top: 60px;
    bottom: -30px;
    width: 2px;
    background: var(--border-color);
}

.step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

/* Checklist */
.checklist {
    list-style: none;
    margin: 15px 0;
}

.checklist li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.checklist i {
    color: var(--success-color);
}

/* Code Blocks */
pre {
    background: #2d3748;
    border-radius: 8px;
    padding: 20px;
    overflow-x: auto;
    margin: 20px 0;
    position: relative;
    white-space: pre-wrap;
    word-wrap: break-word;
}

pre code {
    color: #e2e8f0;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.code-wrapper {
    position: relative;
}

.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: var(--transition);
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Verification Grid */
.verification-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.verify-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
}

.verify-item h3 {
    margin-top: 0;
    color: var(--primary-color);
}

.database-list {
    list-style: none;
    margin-top: 15px;
}

.database-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: var(--light-color);
    border-radius: 4px;
    margin-bottom: 8px;
}

.database-list i {
    color: var(--primary-color);
}

/* Run Scenarios */
.run-scenarios {
    margin: 30px 0;
}

.scenario-run {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 30px;
    overflow: hidden;
}

.scenario-header {
    background: var(--light-color);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.scenario-header h3 {
    margin: 0;
}

.run-type {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.run-type.manual {
    background: #d1fae5;
    color: #065f46;
}

.run-type.auto {
    background: #d1fae5;
    color: #065f46;
}

.scenario-steps {
    padding: 25px;
}

.scenario-steps ol {
    margin-left: 20px;
}

.scenario-steps li {
    margin-bottom: 10px;
    line-height: 1.8;
}

.btn-demo {
    display: inline-block;
    padding: 6px 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.875rem;
    cursor: pointer;
}

.expected-result {
    background: var(--light-color);
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.expected-result strong {
    color: var(--dark-color);
}

/* Config Block */
.config-block {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    margin: 20px 0;
}

.config-block h3 {
    margin-top: 0;
    color: var(--primary-color);
}

/* Schedule Table */
.schedule-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.schedule-table th {
    background: var(--light-color);
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
}

.schedule-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.active {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.inactive {
    background: #e5e7eb;
    color: #6b7280;
}

/* Monitoring Grid */
.monitoring-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.monitor-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
}

.monitor-card h3 {
    margin-top: 0;
    color: var(--primary-color);
}

.metrics {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

.metric {
    text-align: center;
}

.metric-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-color);
    margin-bottom: 5px;
}

.metric-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Troubleshooting Preview */
.troubleshooting-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.issue-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    transition: var(--transition);
}

.issue-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.issue-card h4 {
    margin-top: 0;
    color: var(--dark-color);
}

.issue-card p {
    color: var(--text-color);
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.learn-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    transition: var(--transition);
}

.learn-more:hover {
    transform: translateX(5px);
}

/* Responsive Design for Docs */
@media (max-width: 768px) {
    .docs-container {
        flex-direction: column;
    }
    
    .docs-sidebar {
        width: 100%;
        position: static;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .docs-main {
        padding: 20px;
    }
    
    .requirement-cards,
    .verification-grid,
    .monitoring-grid,
    .troubleshooting-preview {
        grid-template-columns: 1fr;
    }
    
    .step {
        flex-direction: column;
        gap: 15px;
    }
    
    .step:not(:last-child)::after {
        display: none;
    }
}