/* ExcelJet Tutorial Plugin Styles */

.exceljet-tutorial-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #334155;
}

/* Breadcrumb Navigation */
.exceljet-breadcrumb {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 0;
    margin-bottom: 2rem;
}

.breadcrumb-nav {
    font-size: 14px;
    color: #64748b;
}

.breadcrumb-nav a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-nav a:hover {
    color: #3b82f6;
}

.breadcrumb-separator {
    margin: 0 8px;
    color: #94a3b8;
}

.breadcrumb-current {
    color: #1e293b;
    font-weight: 500;
}

/* Tutorial Header */
.tutorial-header {
    margin-bottom: 2rem;
}

.tutorial-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.tutorial-category {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ecfdf5;
    color: #059669;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.category-icon {
    fill: currentColor;
}

.tutorial-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: #f1f5f9;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    background: #e2e8f0;
}

.action-btn.bookmarked {
    background: #3b82f6;
    color: white;
}

.action-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.tutorial-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 1rem 0;
    line-height: 1.2;
}

.tutorial-byline {
    font-size: 14px;
    color: #64748b;
}

.author-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.author-link:hover {
    text-decoration: underline;
}

.separator {
    margin: 0 8px;
    color: #94a3b8;
}

/* Formula Image */
.formula-image-container {
    margin: 2rem 0;
}

.formula-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Tutorial Sections */
.tutorial-section {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.875rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.subsection-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin: 2rem 0 1rem 0;
}

.section-content {
    color: #475569;
    line-height: 1.7;
}

.section-content p {
    margin-bottom: 1.5rem;
}

.section-content a {
    color: #3b82f6;
    text-decoration: none;
}

.section-content a:hover {
    text-decoration: underline;
}

/* Formula Highlighting */
.formula-highlight {
    position: relative;
    margin: 1.5rem 0;
    background: #1e293b;
    border-radius: 8px;
    overflow: hidden;
}

.formula-code {
    display: block;
    padding: 1.5rem;
    margin: 0;
    font-family: 'JetBrains Mono', Consolas, monospace;
    font-size: 14px;
    line-height: 1.5;
    color: #e2e8f0;
    background: transparent;
    overflow-x: auto;
    white-space: pre-wrap;
}

.copy-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #475569;
    border: none;
    color: white;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0;
}

.formula-highlight:hover .copy-btn {
    opacity: 1;
}

.copy-btn:hover {
    background: #64748b;
}

/* Note Cards */
.note-card {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border-left: 4px solid;
}

.note-warning {
    background: #fef3c7;
    border-left-color: #f59e0b;
}

.note-warning p {
    color: #92400e;
    margin: 0;
}

.note-info {
    background: #dbeafe;
    border-left-color: #3b82f6;
}

.note-info p {
    color: #1e40af;
    margin: 0;
}

.note-tip {
    background: #d1fae5;
    border-left-color: #10b981;
}

.note-tip p {
    color: #065f46;
    margin: 0;
}

/* Function Badges */
.function-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 1rem;
}

.function-badge {
    display: inline-block;
    background: #f1f5f9;
    color: #475569;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.function-badge:hover {
    background: #dbeafe;
    color: #1e40af;
}

/* Related Content */
.related-content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.related-item {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s;
}

.related-item:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.related-thumb {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.related-info h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.related-info h3 a {
    color: #1e293b;
    text-decoration: none;
}

.related-info h3 a:hover {
    color: #3b82f6;
}

.related-info p {
    margin: 0;
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
}

/* Author Bio */
.author-bio {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-top: 1.5rem;
}

.author-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    flex-shrink: 0;
}

.author-info h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
}

.author-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.5rem;
}

.author-role {
    font-size: 14px;
    color: #64748b;
}

.mvp-badge {
    background: #dbeafe;
    color: #1e40af;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.author-description {
    margin: 0;
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .exceljet-tutorial-container {
        padding: 0 16px;
    }
    
    .tutorial-title {
        font-size: 2rem;
    }
    
    .tutorial-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .related-content-grid {
        grid-template-columns: 1fr;
    }
    
    .related-item {
        flex-direction: column;
    }
    
    .related-thumb {
        width: 100%;
        height: 120px;
    }
    
    .author-bio {
        flex-direction: column;
        text-align: center;
    }
    
    .author-avatar {
        align-self: center;
    }
}

/* WordPress Theme Compatibility */
.exceljet-tutorial-container * {
    box-sizing: border-box;
}

/* Override common theme conflicts */
.exceljet-tutorial-container h1,
.exceljet-tutorial-container h2,
.exceljet-tutorial-container h3,
.exceljet-tutorial-container p,
.exceljet-tutorial-container a {
    color: inherit;
    font-family: inherit;
}

.exceljet-tutorial-container pre {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
}