/* ============================================
   EXTRA COMPONENTS STYLING
   For tabs, steps, buttons, etc.
   ============================================ */

/* Top Banner CTA (zoals Milvus/Zilliz) */
.top-banner-cta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 12px 20px;
    position: relative;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.top-banner-cta.fixed-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

.top-banner-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    position: relative;
}

.banner-icon {
    font-size: 20px;
}

.banner-text {
    font-size: 15px;
    font-weight: 500;
    flex: 1;
    min-width: 200px;
}

.banner-button {
    background-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    padding: 8px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.3);
    white-space: nowrap;
}

.banner-button:hover {
    background-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    color: #ffffff;
}

.banner-close {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.banner-close:hover {
    opacity: 1;
}

@media (max-width: 768px) {
    .top-banner-content {
        justify-content: flex-start;
        padding-right: 40px;
    }
    
    .banner-text {
        font-size: 14px;
        flex: 1 1 100%;
    }
    
    .banner-button {
        font-size: 13px;
        padding: 6px 16px;
    }
}

@media (max-width: 576px) {
    .banner-icon {
        display: none;
    }
    
    .top-banner-cta {
        padding: 10px 15px;
    }
}

/* Code Blocks with Title */
.code-block-wrapper {
    margin: 20px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.code-title {
    background-color: #2d2d2d;
    color: #ffffff;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    border-bottom: 1px solid #404040;
}

.code-block-wrapper pre {
    margin: 0;
    border-radius: 0;
}

/* Command Line */
.command-line {
    background-color: #1e1e1e;
    color: #4ec9b0;
    padding: 16px 20px;
    border-radius: 6px;
    margin: 20px 0;
    font-family: 'Consolas', 'Monaco', monospace;
    border-left: 4px solid #4ec9b0;
}

.command-line .prompt {
    color: #858585;
    margin-right: 8px;
}

/* Terminal Block */
.terminal-block {
    background-color: #0c0c0c;
    color: #cccccc;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    font-family: 'Consolas', 'Monaco', monospace;
    border: 1px solid #333;
}

.terminal-prompt {
    color: #4ec9b0;
    margin-right: 8px;
}

.terminal-comment {
    color: #6a9955;
    font-style: italic;
}

/* Highlight Boxes Styling */
.highlight-box {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    margin: 20px 0;
    border-radius: 6px;
    border-left: 4px solid;
}

.highlight-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.highlight-content {
    flex: 1;
}

.highlight-content p:last-child {
    margin-bottom: 0;
}

.info-box {
    background-color: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}

.info-box .highlight-icon {
    color: #17a2b8;
}

.warning-box {
    background-color: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.warning-box .highlight-icon {
    color: #ffc107;
}

.success-box {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.success-box .highlight-icon {
    color: #28a745;
}

.danger-box {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.danger-box .highlight-icon {
    color: #dc3545;
}

/* Tutorial Steps */
.tutorial-steps {
    margin: 30px 0;
}

.tutorial-step {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e9ecef;
}

.tutorial-step:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.step-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
    min-width: 0;
}

.step-title {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 20px;
    color: #212529;
}

.step-body {
    color: #495057;
    line-height: 1.7;
}

.step-body p:last-child {
    margin-bottom: 0;
}

@media (max-width: 576px) {
    .tutorial-step {
        flex-direction: column;
        gap: 12px;
    }
}

/* Comparison Table */
.comparison-table-wrapper {
    overflow-x: auto;
    margin: 30px 0;
}

.comparison-table {
    width: 100%;
    min-width: 600px;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

.comparison-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.comparison-table th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    border: none;
}

.comparison-table td {
    padding: 14px 16px;
    border-top: 1px solid #dee2e6;
    border-right: 1px solid #dee2e6;
}

.comparison-table td:last-child {
    border-right: none;
}

.comparison-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Buttons */
.tutorial-button {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    text-align: center;
}

.tutorial-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Button Colors */
.btn-primary {
    background-color: #0066cc;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #0052a3;
    color: #ffffff;
}

.btn-secondary {
    background-color: #6c757d;
    color: #ffffff;
}

.btn-secondary:hover {
    background-color: #5a6268;
    color: #ffffff;
}

.btn-success {
    background-color: #28a745;
    color: #ffffff;
}

.btn-success:hover {
    background-color: #218838;
    color: #ffffff;
}

.btn-outline {
    background-color: transparent;
    color: #0066cc;
    border: 2px solid #0066cc;
}

.btn-outline:hover {
    background-color: #0066cc;
    color: #ffffff;
}

/* Button Sizes */
.btn-small {
    padding: 8px 20px;
    font-size: 14px;
}

.btn-medium {
    padding: 12px 28px;
    font-size: 15px;
}

.btn-large {
    padding: 16px 36px;
    font-size: 17px;
}

/* Tabs */
.tutorial-tabs {
    margin: 30px 0;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

.tab-headers {
    display: flex;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    overflow-x: auto;
}

.tab-header {
    padding: 14px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #6c757d;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.tab-header:hover {
    color: #495057;
    background-color: #e9ecef;
}

.tab-header.active {
    color: #0066cc;
    border-bottom-color: #0066cc;
    background-color: #ffffff;
}

.tab-contents {
    position: relative;
}

.tab-content {
    display: none;
    padding: 24px;
    animation: fadeIn 0.3s;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 576px) {
    .tab-headers {
        flex-direction: column;
    }
    
    .tab-header {
        text-align: left;
        border-left: 3px solid transparent;
        border-bottom: 1px solid #dee2e6;
    }
    
    .tab-header.active {
        border-left-color: #0066cc;
        border-bottom-color: #dee2e6;
    }
}

/* Reading Time */
.reading-time {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 16px;
}

.reading-time svg {
    width: 16px;
    height: 16px;
}

/* Auto Table of Contents */
.auto-toc {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin: 30px 0;
}

.auto-toc h3 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 18px;
    color: #212529;
}

.auto-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.auto-toc li {
    margin-bottom: 8px;
}

.auto-toc a {
    color: #0066cc;
    text-decoration: none;
    font-size: 15px;
    display: block;
    padding: 4px 0;
    transition: color 0.2s;
}

.auto-toc a:hover {
    color: #0052a3;
    text-decoration: underline;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #0066cc;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,102,204,0.3);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background-color: #0052a3;
    transform: translateY(-4px);
}

@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* Print Specific Styles */
@media print {
    .tutorial-tabs {
        border: none;
    }
    
    .tab-headers {
        display: none;
    }
    
    .tab-content {
        display: block !important;
        padding: 0;
        page-break-inside: avoid;
    }
    
    .tutorial-button,
    .cta-box,
    .scroll-to-top {
        display: none;
    }
    
    .tutorial-step {
        page-break-inside: avoid;
    }
}

/* Accessibility */
.tutorial-button:focus,
.tab-header:focus,
.cta-button:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

/* Dark Mode Support (optioneel) */
@media (prefers-color-scheme: dark) {
    .tutorial-page-wrapper {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }
    
    .tutorial-title,
    .tutorial-content h2,
    .tutorial-content h3 {
        color: #ffffff;
    }
    
    .tutorial-content {
        color: #e0e0e0;
    }
    
    .tutorial-breadcrumb a {
        color: #6bb6ff;
    }
    
    .related-article-card {
        background-color: #2d2d2d;
        border-color: #404040;
    }
    
    .cta-box {
        background-color: #2d2d2d;
    }
}

/* Loading Animation for images */
.tutorial-content img {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

.tutorial-content img[src] {
    animation: none;
    background: none;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Selection Color */
::selection {
    background-color: #0066cc;
    color: #ffffff;
}

::-moz-selection {
    background-color: #0066cc;
    color: #ffffff;
}
