/**
 * Document Search Styles
 * Styles for document results in search interface
 */

/* ==========================================================================
   Documents Section Header
   ========================================================================== */

.documents-section-header {
    margin-bottom: 5px;
}

.documents-section-title {
    font-weight: 600;
    color: #333;
    margin: 0;
}

.documents-label {
    color: #000;
    font-size: 30px;
    font-style: normal;
    font-weight: 300;
    line-height: 64px;
    letter-spacing: 1px;
}

.documents-count {
    font-size: 20px;
    font-weight: 400;
}

/* ==========================================================================
   Document Results Grid
   ========================================================================== */

.document-results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.document-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: #fff;
    border: 1px solid #e0e0e0;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.document-item:hover {
    border-color: #ccc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.document-icon-link {
    flex-shrink: 0;
    display: block;
    text-decoration: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
    cursor: pointer;
    /* Ensure touch-friendly tap target on mobile */
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    tap-highlight-color: rgba(0, 0, 0, 0.1);
}

.document-icon-link:hover {
    opacity: 0.85;
    transform: scale(1.02);
}

.document-icon-link:active {
    transform: scale(0.98);
}

.document-icon {
    flex-shrink: 0;
    width: 60px;
    height: 75px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.document-icon-link:hover .document-icon {
    border-color: #999;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.document-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.document-content {
    flex: 1;
    min-width: 0;
}

.document-category {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 6px;
}

.document-title {
    font-size: 22px;
    font-weight: 400;
    line-height: 1.4;
    margin: 0;
    padding: 0;
}

.document-title a {
    color: #000 !important;
    text-decoration: underline;
    display: block;
    transition: font-weight 0.2s ease;
}

.document-title a:hover,
.document-title a:focus,
.document-title a:active,
.document-title a:visited {
    color: #000 !important;
    font-weight: 700;
}

/* No Documents Message */
.no-documents {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-documents p {
    font-size: 16px;
    margin: 0;
}

/* ==========================================================================
   View More Button
   ========================================================================== */

.document-view-more-container {
    text-align: center;
    margin: 30px 0;
}

.document-view-more-btn {
    background: #666;
    color: #fff;
    border: none;
    padding: 12px 40px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.document-view-more-btn:hover {
    background: #000;
}

.document-view-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ==========================================================================
   Skeleton Loading
   ========================================================================== */

.document-skeleton-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: #fff;
    border: 1px solid #e0e0e0;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.document-skeleton-icon {
    flex-shrink: 0;
    width: 60px;
    height: 75px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
}

.document-skeleton-content {
    flex: 1;
    min-width: 0;
}

.document-skeleton-category {
    width: 40%;
    height: 10px;
    margin-bottom: 6px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 2px;
}

.document-skeleton-title {
    width: 85%;
    height: 14px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 2px;
}

@keyframes skeleton-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

@keyframes skeleton-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 1024px) {
    .document-results-grid {
        gap: 15px;
    }
    
    .document-item {
        padding: 12px;
    }
}

@media (max-width: 768px) {
    .document-results-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .document-item {
        gap: 12px;
    }
    
    .document-icon {
        width: 50px;
        height: 62px;
    }
}

@media (max-width: 480px) {
    .document-category {
        font-size: 9px;
    }
    
    .document-title {
        font-size: 18px;
    }
    
    .document-title a {
        font-size: inherit;
    }
}

