/* Mobile file card optimizations - Override Ghost default styles */

/* File card mobile styles with !important to override theme defaults */
@media (max-width: 768px) {
    .gh-content .kg-file-card-container {
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 12px !important;
        min-height: 80px !important;
    }
    
    .gh-content .kg-file-card-icon {
        margin-right: 0 !important;
        margin-bottom: 6px !important;
        align-self: flex-start !important;
        width: 24px !important;
        height: 24px !important;
        flex-shrink: 0 !important;
    }
    
    .gh-content .kg-file-card-icon svg {
        width: 24px !important;
        height: 24px !important;
        max-width: 24px !important;
        max-height: 24px !important;
    }
    
    .gh-content .kg-file-card-contents {
        margin-bottom: 6px !important;
        width: 100% !important;
        flex: 1 !important;
    }
    
    .gh-content .kg-file-card-download {
        margin-left: 0 !important;
        align-self: stretch !important;
        display: flex !important;
        justify-content: flex-end !important;
        height: auto !important;
        min-height: 32px !important;
    }
    
    .gh-content .kg-file-card-download-button {
        padding: 4px 8px !important;
        font-size: 0.7rem !important;
        max-width: 60px !important;
        width: auto !important;
        height: 24px !important;
        min-height: 24px !important;
        line-height: 1.1 !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 3px !important;
    }
    
    .gh-content .kg-file-card-download-button svg {
        width: 8px !important;
        height: 8px !important;
        margin-right: 2px !important;
        flex-shrink: 0 !important;
    }
}

/* Extra small mobile screens */
@media (max-width: 480px) {
    .gh-content .kg-file-card-container {
        min-height: 64px !important;
    }
    
    /* Hide file icon on very small screens to prevent display issues */
    .gh-content .kg-file-card-icon {
        display: none !important;
    }
    
    .gh-content .kg-file-card-download {
        height: auto !important;
        min-height: 20px !important;
    }
    
    .gh-content .kg-file-card-download-button {
        padding: 2px 6px !important;
        font-size: 0.65rem !important;
        max-width: 50px !important;
        width: auto !important;
        height: 20px !important;
        min-height: 20px !important;
    }
    
    /* Hide download button icon on very small screens to save space */
    .gh-content .kg-file-card-download-button svg {
        display: none !important;
    }
}
