/* SMTPCheckr Guides - Clean & Simple Design - FIXED VERSION */

/* Base Styles - Force WordPress theme compatibility */
.smtpcheckr-guides-container,
.smtpcheckr-table-of-contents,
#guide-content-container,
.smtpcheckr-single-guide {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333 !important;
    margin: 20px 0;
    background: #fff !important;
    border-radius: 8px;
    padding: 0;
}

/* Ensure guide content container matches WordPress theme */
#guide-content-container {
    background: #fff !important;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin: 30px 0 !important;
    overflow: hidden;
}

/* Table of Contents Styles - Clean & Simple */
.smtpcheckr-table-of-contents {
    background: #fff !important;
    border-radius: 8px;
    padding: 30px;
    border: 1px solid #e1e5e9;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.toc-title {
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50 !important;
    border-bottom: 3px solid #3498db;
    padding-bottom: 15px;
}

.toc-category {
    background: #f8f9fa !important;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
}

.toc-category:last-child {
    margin-bottom: 0;
}

.toc-category-title {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50 !important;
}

.toc-category-desc {
    font-size: 1rem;
    margin-bottom: 20px;
    color: #6c757d !important;
}

.toc-guides-list {
    display: grid;
    gap: 12px;
}

.toc-guide-item {
    display: flex;
    align-items: flex-start;
    background: #fff !important;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 18px;
    transition: all 0.2s ease;
}

.toc-guide-item:hover {
    border-color: #3498db;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.15);
}

.toc-chapter {
    background: #3498db !important;
    color: #fff !important;
    padding: 6px 10px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
    margin-right: 15px;
    min-width: 50px;
    text-align: center;
}

.toc-guide-content {
    flex: 1;
}

.toc-guide-title a {
    color: #2c3e50 !important;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
    transition: color 0.2s ease;
}

.toc-guide-title a:hover {
    color: #3498db !important;
    text-decoration: underline;
}

.toc-guide-subtitle {
    color: #6c757d !important;
    font-size: 0.9rem;
    margin-bottom: 10px;
    font-style: italic;
}

.toc-guide-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Difficulty Badges - Simple Colors */
.difficulty {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.difficulty-beginner {
    background: #28a745 !important;
    color: white !important;
}

.difficulty-intermediate {
    background: #fd7e14 !important;
    color: white !important;
}

.difficulty-advanced {
    background: #dc3545 !important;
    color: white !important;
}

.difficulty-all-levels {
    background: #007bff !important;
    color: white !important;
}

.read-time {
    background: #e9ecef !important;
    color: #495057 !important;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
}

.toc-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.tag {
    background: #f1f3f4 !important;
    color: #5f6368 !important;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 500;
}

/* Main Guides Container - Clean Design */
.smtpcheckr-category {
    margin-bottom: 40px;
    padding: 25px;
    background: #fff !important;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.category-header {
    text-align: center;
    margin-bottom: 30px;
}

.smtpcheckr-category-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #2c3e50 !important;
}

.category-description {
    font-size: 1rem;
    color: #6c757d !important;
    max-width: 600px;
    margin: 0 auto;
}

/* Grid Layout - Simpler */
.smtpcheckr-guides-grid {
    display: grid;
    gap: 20px;
}

.smtpcheckr-guides-grid.columns-1 {
    grid-template-columns: 1fr;
}

.smtpcheckr-guides-grid.columns-2 {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.smtpcheckr-guides-grid.columns-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Guide Cards - Clean Design */
.smtpcheckr-guide-card {
    background: #fff !important;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
    position: relative;
}

.smtpcheckr-guide-card:hover {
    border-color: #3498db;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
    transform: translateY(-2px);
}

.guide-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.guide-icon {
    font-size: 2rem;
    line-height: 1;
}

.smtpcheckr-guide-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50 !important;
    line-height: 1.3;
}

.guide-subtitle {
    font-size: 0.9rem;
    color: #6c757d !important;
    font-style: italic;
    margin-bottom: 12px;
}

.smtpcheckr-guide-description {
    color: #495057 !important;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 18px;
}

.guide-card-footer {
    border-top: 1px solid #e9ecef;
    padding-top: 15px;
}

.guide-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.guide-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.guide-tags .tag {
    background: #f1f3f4 !important;
    color: #5f6368 !important;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 500;
}

.guide-read-btn {
    width: 100%;
    background: #3498db !important;
    color: white !important;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.guide-read-btn:hover {
    background: #2980b9 !important;
    transform: translateY(-1px);
}

/* List View Styles */
.smtpcheckr-guides-list-view {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.guide-list-item {
    display: flex;
    align-items: center;
    background: #fff !important;
    padding: 16px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.guide-list-item:hover {
    border-color: #3498db;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.1);
}

.guide-list-icon {
    font-size: 1.8rem;
    margin-right: 15px;
}

.guide-list-content {
    flex: 1;
}

.guide-list-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50 !important;
    margin-bottom: 4px;
}

.guide-list-subtitle {
    font-size: 0.85rem;
    color: #6c757d !important;
    font-style: italic;
    margin-bottom: 6px;
}

.guide-list-meta {
    display: flex;
    gap: 10px;
    align-items: center;
}

.guide-read-btn-small {
    background: #3498db !important;
    color: white !important;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 12px;
}

.guide-read-btn-small:hover {
    background: #2980b9 !important;
}

/* Single Guide Styles - Clean - FIXED FOR WORDPRESS THEME COMPATIBILITY */
.smtpcheckr-single-guide {
    background: #fff !important;
    border-radius: 8px;
    padding: 35px !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
    width: 100% !important;
    box-sizing: border-box;
}

.guide-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 25px;
    border-bottom: 2px solid #e9ecef;
    background: transparent !important;
}

.guide-header-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.guide-icon-large {
    font-size: 3rem;
    line-height: 1;
}

.guide-badges {
    display: flex;
    gap: 10px;
    align-items: center;
}

.difficulty-badge {
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.read-time-badge {
    background: #f8f9fa !important;
    color: #495057 !important;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.smtpcheckr-single-guide .smtpcheckr-guide-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #2c3e50 !important;
    line-height: 1.2;
}

.guide-subtitle-large {
    font-size: 1.2rem;
    color: #6c757d !important;
    font-style: italic;
    margin-bottom: 18px;
}

.guide-description-large {
    font-size: 1.1rem;
    color: #495057 !important;
    margin-bottom: 20px;
}

.guide-tags-header {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tag-large {
    background: #3498db !important;
    color: white !important;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Guide Content Styles - Clean Typography - WORDPRESS COMPATIBLE */
.smtpcheckr-guide-content {
    font-size: 1rem;
    line-height: 1.7;
    color: #2c3e50 !important;
    max-width: 800px;
    margin: 0 auto;
    background: transparent !important;
    padding: 0 !important;
}

.smtpcheckr-guide-content * {
    color: inherit !important;
}

.smtpcheckr-guide-content h2 {
    font-size: 1.8rem !important;
    font-weight: 700 !important;
    color: #2c3e50 !important;
    margin: 35px 0 18px 0 !important;
    padding-bottom: 8px !important;
    border-bottom: 2px solid #3498db !important;
    background: transparent !important;
}

.smtpcheckr-guide-content h3 {
    font-size: 1.4rem !important;
    font-weight: 600 !important;
    color: #2c3e50 !important;
    margin: 28px 0 12px 0 !important;
    background: transparent !important;
}

.smtpcheckr-guide-content h4 {
    font-size: 1.2rem !important;
    font-weight: 600 !important;
    color: #34495e !important;
    margin: 22px 0 10px 0 !important;
    background: transparent !important;
}

.smtpcheckr-guide-content p {
    margin-bottom: 16px !important;
    color: #2c3e50 !important;
    background: transparent !important;
}

.smtpcheckr-guide-content ul,
.smtpcheckr-guide-content ol {
    margin: 16px 0 !important;
    padding-left: 20px !important;
    color: #2c3e50 !important;
}

.smtpcheckr-guide-content li {
    margin-bottom: 6px !important;
    color: #2c3e50 !important;
}

.smtpcheckr-guide-content pre {
    background: #f8f9fa !important;
    color: #2c3e50 !important;
    padding: 16px !important;
    border-radius: 6px !important;
    overflow-x: auto !important;
    margin: 20px 0 !important;
    font-size: 0.9rem !important;
    line-height: 1.4 !important;
    border: 1px solid #e9ecef !important;
    position: relative;
}

.smtpcheckr-guide-content code {
    background: #f1f3f4 !important;
    color: #c7254e !important;
    padding: 2px 5px !important;
    border-radius: 3px !important;
    font-size: 0.9em !important;
    font-weight: 600 !important;
}

.smtpcheckr-guide-content pre code {
    background: none !important;
    color: #2c3e50 !important;
    padding: 0 !important;
    font-weight: normal !important;
}

/* Special Content Boxes - Cleaner */
.guide-tip,
.guide-warning,
.guide-info {
    padding: 16px !important;
    border-radius: 6px !important;
    margin: 20px 0 !important;
    border-left: 4px solid;
}

.guide-tip {
    background: #e3f2fd !important;
    border-left-color: #2196f3 !important;
    color: #1565c0 !important;
}

.guide-tip h4 {
    color: #1976d2 !important;
    margin-top: 0 !important;
    background: transparent !important;
}

.guide-tip p {
    color: #1565c0 !important;
}

.guide-warning {
    background: #ffebee !important;
    border-left-color: #f44336 !important;
    color: #c62828 !important;
}

.guide-warning h4 {
    color: #d32f2f !important;
    margin-top: 0 !important;
    background: transparent !important;
}

.guide-warning p {
    color: #c62828 !important;
}

.guide-info {
    background: #e8f5e8 !important;
    border-left-color: #4caf50 !important;
    color: #2e7d32 !important;
}

.guide-info h4 {
    color: #388e3c !important;
    margin-top: 0 !important;
    background: transparent !important;
}

.guide-info p {
    color: #2e7d32 !important;
}

/* Tables - Clean */
.comparison-table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 20px 0 !important;
    background: #fff !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    border: 1px solid #e9ecef !important;
}

.comparison-table th,
.comparison-table td {
    padding: 12px !important;
    text-align: left !important;
    border-bottom: 1px solid #e9ecef !important;
    background: transparent !important;
    color: #2c3e50 !important;
}

.comparison-table th {
    background: #f8f9fa !important;
    color: #495057 !important;
    font-weight: 600 !important;
    border-bottom: 2px solid #e9ecef !important;
}

.comparison-table tr:hover {
    background: #f8f9fa !important;
}

.port-info {
    background: #f8f9fa !important;
    border: 1px solid #e9ecef !important;
    border-radius: 6px !important;
    padding: 16px !important;
    margin: 16px 0 !important;
}

.port-info ul {
    margin: 0 !important;
    color: #2c3e50 !important;
}

.port-info li {
    color: #2c3e50 !important;
}

/* Navigation - Clean */
.guide-navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    background: transparent !important;
}

.nav-btn {
    flex: 1;
    max-width: 250px;
    background: #3498db !important;
    color: white !important;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.nav-btn:hover {
    background: #2980b9 !important;
    transform: translateY(-1px);
}

/* Loading States - Simple */
.guide-loading {
    text-align: center;
    padding: 40px 20px;
    font-size: 1.1rem;
    color: #6c757d !important;
    background: #fff !important;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3 !important;
    border-top: 2px solid #3498db !important;
    border-radius: 50%;
    margin-left: 10px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error Messages - Simple */
.smtpcheckr-error {
    background: #f8d7da !important;
    color: #721c24 !important;
    border: 1px solid #f5c6cb !important;
    border-radius: 6px !important;
    padding: 16px !important;
    margin: 16px 0 !important;
    text-align: center;
    font-weight: 500;
}

/* Search functionality */
.guides-search {
    display: flex;
    gap: 8px;
    margin: 20px 0;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.guides-search-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #e9ecef !important;
    border-radius: 6px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s ease;
    background: #fff !important;
    color: #333 !important;
}

.guides-search-input:focus {
    border-color: #3498db !important;
}

.guides-search-btn {
    background: #3498db !important;
    color: white !important;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.guides-search-btn:hover {
    background: #2980b9 !important;
}

/* Copy code button */
.copy-code-btn {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    background: #6c757d !important;
    color: white !important;
    border: none !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    font-size: 0.75rem !important;
    cursor: pointer !important;
    opacity: 0.7 !important;
    transition: opacity 0.2s ease !important;
}

.copy-code-btn:hover {
    opacity: 1 !important;
    background: #495057 !important;
}

.copy-code-btn.copied {
    background: #28a745 !important;
    opacity: 1 !important;
}

/* Scroll to top button */
.scroll-to-top {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    background: #3498db !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    width: 50px !important;
    height: 50px !important;
    font-size: 18px !important;
    cursor: pointer !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.3s ease !important;
    z-index: 1000 !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2) !important;
}

.scroll-to-top.visible {
    opacity: 1 !important;
    visibility: visible !important;
}

.scroll-to-top:hover {
    background: #2980b9 !important;
    transform: translateY(-2px) !important;
}

/* Reading progress bar */
.reading-progress {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 3px !important;
    background: rgba(52, 152, 219, 0.2) !important;
    z-index: 999 !important;
}

.progress-fill {
    height: 100% !important;
    background: #3498db !important;
    transition: width 0.1s ease !important;
    width: 0% !important;
}

.reading-progress.completed .progress-fill {
    background: #28a745 !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .smtpcheckr-guides-grid.columns-2,
    .smtpcheckr-guides-grid.columns-3 {
        grid-template-columns: 1fr;
    }
    
    .smtpcheckr-table-of-contents {
        padding: 20px;
    }
    
    .toc-title {
        font-size: 1.8rem;
    }
    
    .toc-guide-item {
        flex-direction: column;
        text-align: center;
    }
    
    .toc-chapter {
        margin-right: 0;
        margin-bottom: 10px;
        align-self: center;
    }
    
    .smtpcheckr-single-guide {
        padding: 20px !important;
    }
    
    .smtpcheckr-single-guide .smtpcheckr-guide-title {
        font-size: 2rem !important;
    }
    
    .guide-navigation {
        flex-direction: column;
    }
    
    .comparison-table {
        font-size: 0.9rem;
    }
    
    .copy-code-btn {
        position: relative !important;
        float: right !important;
        margin-bottom: 10px !important;
    }
}

@media (max-width: 480px) {
    .toc-title {
        font-size: 1.5rem;
    }
    
    .smtpcheckr-single-guide .smtpcheckr-guide-title {
        font-size: 1.7rem !important;
    }
    
    .smtpcheckr-guide-content {
        font-size: 0.95rem;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 8px !important;
    }
}

/* Print Styles */
@media print {
    .guide-read-btn,
    .guide-read-btn-small,
    .nav-btn,
    .guides-search,
    .copy-code-btn,
    .scroll-to-top,
    .reading-progress {
        display: none !important;
    }
    
    .smtpcheckr-guide-card:hover {
        transform: none !important;
        box-shadow: none !important;
    }
    
    * {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
    }
}

/* WordPress theme compatibility overrides */
#guide-content-container *,
.smtpcheckr-single-guide *,
.smtpcheckr-guide-content * {
    box-sizing: border-box !important;
}

/* Ensure no theme conflicts */
#guide-content-container {
    clear: both !important;
    width: 100% !important;
    position: relative !important;
}

/* Force light theme for loaded guides */
#guide-content-container,
#guide-content-container * {
    background-color: inherit !important;
    color: inherit !important;
}

#guide-content-container {
    background: #fff !important;
    color: #333 !important;
}