/* Additional responsive improvements for specific content types */

/* Better handling of keyboard recommendation content */
.post-content {
    /* Improve readability of spec lists */
    ul li, ol li {
        margin-bottom: 8px;
        line-height: 1.6;
    }
    
    /* Better handling of keyboard specs */
    p:contains("Polling rate"),
    p:contains("Response time"),
    p:contains("Key step sensitivity"),
    p:contains("Hotswappable"),
    p:contains("Rapid trigger") {
        @media (max-width: 768px) {
            margin-bottom: 5px;
            font-size: 0.9em;
        }
    }
    
    /* Better spacing for keyboard categories */
    h2, h3 {
        @media (max-width: 768px) {
            margin-top: 25px;
            margin-bottom: 15px;
            line-height: 1.3;
        }
    }
    
    /* Improve definition lists if used */
    dl {
        @media (max-width: 768px) {
            dt {
                font-weight: bold;
                margin-top: 10px;
                margin-bottom: 5px;
            }
            
            dd {
                margin-bottom: 10px;
                margin-left: 15px;
            }
        }
    }
}

/* Better handling of draft content indicators */
.draft-indicator {
    @media (max-width: 768px) {
        font-size: 0.8em;
        padding: 8px 12px;
        margin-bottom: 15px;
    }
}

/* Improve tag display on mobile */
.post-tags {
    @media (max-width: 768px) {
        .tag {
            display: inline-block;
            margin: 2px 4px 2px 0;
            padding: 4px 8px;
            font-size: 0.8em;
            border-radius: 12px;
            background-color: rgba(0, 0, 0, 0.1);
        }
    }
}

/* Better handling of metadata on mobile */
.post-meta {
    @media (max-width: 768px) {
        font-size: 0.8em;
        margin-bottom: 15px;
        
        .post-date {
            display: block;
            margin-bottom: 5px;
        }
        
        .post-categories {
            display: block;
        }
    }
}

/* Improve readability of specification lists */
.specs-list {
    @media (max-width: 768px) {
        li {
            padding: 8px 0;
            border-bottom: 1px solid rgba(0, 0, 0, 0.1);
            
            &:last-child {
                border-bottom: none;
            }
        }
        
        strong {
            display: block;
            margin-bottom: 2px;
        }
    }
}

/* Better handling of comparison tables */
.comparison-table {
    @media (max-width: 768px) {
        font-size: 0.8em;
        
        th {
            background-color: rgba(0, 0, 0, 0.05);
            font-weight: bold;
            padding: 10px 5px;
        }
        
        td {
            padding: 8px 5px;
            vertical-align: top;
        }
        
        /* Make first column sticky for better UX */
        th:first-child,
        td:first-child {
            position: sticky;
            left: 0;
            background-color: inherit;
            z-index: 10;
        }
    }
}

/* Improve code formatting for specs */
code {
    @media (max-width: 768px) {
        padding: 2px 4px;
        border-radius: 3px;
        background-color: rgba(0, 0, 0, 0.05);
        font-size: 0.9em;
    }
}

/* Better handling of long URLs in content */
a[href^="http"] {
    @media (max-width: 768px) {
        word-break: break-all;
        
        /* Truncate very long URLs */
        &[href*="://"] {
            max-width: 250px;
            display: inline-block;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            vertical-align: bottom;
        }
    }
}

/* Improve image captions on mobile */
.image-caption,
figcaption {
    @media (max-width: 768px) {
        font-size: 0.8em;
        text-align: center;
        margin-top: 8px;
        font-style: italic;
        color: rgba(0, 0, 0, 0.6);
    }
}

/* Better handling of note/warning boxes if they exist */
.note, .warning, .tip {
    @media (max-width: 768px) {
        padding: 12px;
        margin: 15px 0;
        border-radius: 4px;
        font-size: 0.9em;
        
        &.note {
            background-color: #e8f4f8;
            border-left: 4px solid #1e88e5;
        }
        
        &.warning {
            background-color: #fff3e0;
            border-left: 4px solid #ff9800;
        }
        
        &.tip {
            background-color: #f1f8e9;
            border-left: 4px solid #4caf50;
        }
    }
}

/* Improve print styles for mobile reading */
@media print {
    .post {
        max-width: none;
        padding: 0;
        margin: 0;
    }
    
    .post-title {
        font-size: 18pt;
        margin-bottom: 12pt;
    }
    
    .post-content {
        font-size: 11pt;
        line-height: 1.4;
    }
    
    .menu, .footer, .nav, .sharing-buttons {
        display: none !important;
    }
}

/* Dark mode specific improvements */
@media (prefers-color-scheme: dark) {
    .specs-list li {
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
    
    .comparison-table th {
        background-color: rgba(255, 255, 255, 0.05);
    }
    
    code {
        background-color: rgba(255, 255, 255, 0.05);
    }
    
    .note {
        background-color: rgba(30, 136, 229, 0.1);
    }
    
    .warning {
        background-color: rgba(255, 152, 0, 0.1);
    }
    
    .tip {
        background-color: rgba(76, 175, 80, 0.1);
    }
}
