/**
 * ============================================================================
 * DOCUMENTS MODULE STYLES
 * ============================================================================
 * 
 * File Path:        public/css/modules/documents.css
 * Version:          1.0.0
 * Created:          Saturday, 18 October 2025, 13:25 AEST
 * Last Modified:    Saturday, 18 October 2025, 13:25 AEST
 * 
 * Purpose:
 *   Provides styling for Building Documentation screens including document
 *   cards, applications section, loading states, and responsive layouts.
 *   Follows mobile-first approach and integrates with existing design system.
 * 
 * Dependencies:
 *   Base Styles:
 *     - /css/main.css           Core layout and typography
 *     - /css/components.css     Button and component styles
 * 
 * Components Styled:
 *   - Document cards with hover effects
 *   - Applications section cards
 *   - Loading spinner and states
 *   - Error messages with retry buttons
 *   - Empty state displays
 *   - Coming soon badges
 *   - Feature lists
 * 
 * Responsive Breakpoints:
 *   - Mobile: < 768px (single column)
 *   - Tablet: 768px - 1024px (2 columns)
 *   - Desktop: > 1024px (3 columns)
 * 
 * Color Scheme:
 *   Inherits from main.css with document-specific accents
 * 
 * Version History:
 *   1.0.0 (2025-10-18) - Initial creation
 * 
 * ============================================================================
 */

/* ============================================================================
   CONTAINER LAYOUTS
   ============================================================================ */

.documents-container,
.applications-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.documents-main,
.applications-main {
    margin-top: 20px;
}

/* ============================================================================
   APPLICATIONS SECTION
   ============================================================================ */

.applications-section {
    margin-bottom: 40px;
}

.applications-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.applications-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.applications-icon {
    font-size: 48px;
    flex-shrink: 0;
}

.applications-content {
    flex: 1;
}

.applications-content h2 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 600;
}

.applications-content p {
    margin: 0;
    opacity: 0.9;
}

.applications-card .btn {
    flex-shrink: 0;
    background: white;
    color: #667eea;
    border: none;
}

.applications-card .btn:hover {
    background: #f7f7f7;
}

/* ============================================================================
   SECTION HEADERS
   ============================================================================ */

.section-header {
    margin-bottom: 24px;
}

.section-header h2 {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 600;
    color: #1a202c;
}

.section-subtitle {
    margin: 0;
    color: #718096;
    font-size: 16px;
}

/* ============================================================================
   DOCUMENTS LIST
   ============================================================================ */

.documents-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

/* ============================================================================
   DOCUMENT CARDS
   ============================================================================ */

.document-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.document-card:hover {
    border-color: #cbd5e0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.document-icon {
    font-size: 40px;
    flex-shrink: 0;
}

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

.document-title {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 600;
    color: #1a202c;
}

.document-description {
    margin: 0 0 12px 0;
    color: #4a5568;
    font-size: 14px;
    line-height: 1.5;
}

.document-meta {
    display: flex;
    gap: 16px;
    align-items: center;
    font-size: 13px;
    color: #718096;
}

.document-date {
    display: flex;
    align-items: center;
    gap: 4px;
}

.document-version {
    padding: 2px 8px;
    background: #edf2f7;
    border-radius: 4px;
    font-weight: 500;
    color: #2d3748;
}

.document-actions {
    flex-shrink: 0;
}

/* ============================================================================
   LOADING STATE
   ============================================================================ */

.loading-state {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-state p {
    color: #718096;
    font-size: 16px;
}

/* ============================================================================
   ERROR STATE
   ============================================================================ */

.error-state {
    text-align: center;
    padding: 60px 20px;
}

.error-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.error-state p {
    color: #e53e3e;
    font-size: 16px;
    margin-bottom: 20px;
}

/* ============================================================================
   EMPTY STATE
   ============================================================================ */

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    color: #718096;
    font-size: 16px;
}

/* ============================================================================
   COMING SOON SECTION
   ============================================================================ */

.coming-soon-notice {
    text-align: center;
    padding: 40px 20px;
    background: #fff8e1;
    border: 2px dashed #ffa726;
    border-radius: 8px;
    margin-bottom: 40px;
}

.notice-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.coming-soon-notice h2 {
    margin: 0 0 12px 0;
    color: #f57c00;
    font-size: 24px;
}

.coming-soon-notice p {
    margin: 0;
    color: #e65100;
    font-size: 16px;
}

/* ============================================================================
   APPLICATION CARDS (for applications.html)
   ============================================================================ */

.application-card-section {
    margin-bottom: 32px;
}

.application-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.application-card.coming-soon {
    border-color: #ffa726;
    border-width: 2px;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: #f7fafc;
    border-bottom: 1px solid #e2e8f0;
}

.card-icon {
    font-size: 36px;
    flex-shrink: 0;
}

.card-title {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-title h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: #1a202c;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-coming-soon {
    background: #ffa726;
    color: white;
}

.card-body {
    padding: 24px;
}

.card-description {
    margin: 0 0 16px 0;
    color: #4a5568;
    font-size: 15px;
    line-height: 1.6;
}

.feature-list {
    margin: 0 0 24px 0;
    padding-left: 24px;
    color: #2d3748;
}

.feature-list li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.temp-instruction,
.important-note {
    padding: 16px;
    border-radius: 6px;
    margin-top: 20px;
    line-height: 1.6;
}

.temp-instruction {
    background: #e6f7ff;
    border-left: 4px solid #1890ff;
    color: #0050b3;
}

.important-note {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    color: #856404;
}

.temp-instruction a,
.important-note a {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
}

/* ============================================================================
   REFERENCE SECTION
   ============================================================================ */

.reference-section {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid #e2e8f0;
}

.reference-card {
    background: #f7fafc;
    padding: 24px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.reference-card h3 {
    margin: 0 0 16px 0;
    font-size: 20px;
    color: #1a202c;
}

.reference-card p {
    margin: 0 0 16px 0;
    color: #4a5568;
}

.document-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.document-links li {
    margin-bottom: 12px;
}

.link-button {
    display: inline-block;
    padding: 10px 16px;
    background: white;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    color: #2d3748;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    text-decoration: none;
}

.link-button:hover {
    background: #edf2f7;
    border-color: #a0aec0;
    color: #1a202c;
}

/* ============================================================================
   FOOTER
   ============================================================================ */

.page-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.footer-note,
.footer-contact {
    color: #718096;
    font-size: 14px;
    line-height: 1.6;
}

.footer-contact a {
    color: #3182ce;
    text-decoration: none;
    font-weight: 600;
}

.footer-contact a:hover {
    text-decoration: underline;
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

/* Tablet: 768px and up */
@media (min-width: 768px) {
    .documents-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .applications-card {
        padding: 32px;
    }
}

/* Desktop: 1024px and up */
@media (min-width: 1024px) {
    .documents-list {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .document-card {
        flex-direction: column;
        text-align: center;
    }
    
    .document-actions {
        width: 100%;
    }
    
    .document-actions .btn {
        width: 100%;
    }
}

/* Mobile: smaller screens */
@media (max-width: 767px) {
    .applications-card {
        flex-direction: column;
        text-align: center;
    }
    
    .applications-card .btn {
        width: 100%;
    }
    
    .document-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}
