/* =========================================================================
   DOCUMENT-DETAIL.CSS - Webpage Document Detail Page
   -------------------------------------------------------------------------
   Theme: Premium Command Center (Navy & Gold, Golden Ratio, Glassmorphism)
   ========================================================================= */

/* Hero Section Custom Styles */
.page-header-document {
    background: linear-gradient(135deg, var(--dark-navy) 0%, var(--primary-navy) 100%);
    min-height: 260px;
    padding: var(--g-6) 0;
    position: relative;
    overflow: hidden;
}

.page-header-document-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.85;
    pointer-events: none;
    z-index: 1;
}

.page-header-document-glow {
    position: absolute;
    bottom: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(201, 162, 39, 0.12) 0%, rgba(201, 162, 39, 0) 70%);
    filter: blur(40px);
    pointer-events: none;
    z-index: 1;
}

/* Glassmorphic Metadata Container */
.meta-glass-pill {
    background-color: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transition: var(--transition-smooth);
}

.meta-glass-pill:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(201, 162, 39, 0.35);
    box-shadow: 0 8px 24px rgba(201, 162, 39, 0.1);
}

.meta-glass-divider {
    width: 1px;
    height: 14px;
    background: rgba(255, 255, 255, 0.15);
}

/* Sticky Sidebar Content */
.doc-sidebar-sticky {
    position: sticky;
    top: 110px;
    z-index: 10;
}

/* Download / Action Card */
.doc-action-card {
    background: var(--white);
    border-radius: var(--g-4);
    border: 1px solid rgba(11, 31, 58, 0.05);
    padding: var(--g-4);
    box-shadow: 0 10px 30px rgba(11, 31, 58, 0.03);
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.doc-action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-navy) 0%, var(--primary-gold) 100%);
}

.doc-icon-container {
    width: 88px;
    height: 88px;
    border-radius: var(--g-3);
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--g-3);
    transition: var(--transition-smooth);
    border: 1px solid rgba(11, 31, 58, 0.02);
}

.doc-action-card:hover .doc-icon-container {
    transform: scale(1.05) rotate(3deg);
    background: rgba(201, 162, 39, 0.06);
    border-color: rgba(201, 162, 39, 0.15);
}

/* Metadata List */
.doc-meta-card {
    background: var(--white);
    border-radius: var(--g-4);
    border: 1px solid rgba(11, 31, 58, 0.05);
    padding: var(--g-4);
    box-shadow: 0 10px 30px rgba(11, 31, 58, 0.03);
}

.doc-meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--g-2) 0;
    border-bottom: 1px dashed rgba(11, 31, 58, 0.08);
}

.doc-meta-item:last-child {
    border-bottom: none;
}

.doc-meta-label {
    font-size: var(--f-sm);
    font-weight: 500;
    color: var(--text-muted);
}

.doc-meta-value {
    font-size: var(--f-sm);
    font-weight: 700;
    color: var(--primary-navy);
}

/* Document Preview Card */
.doc-preview-card {
    background: var(--white);
    border-radius: var(--g-4);
    border: 1px solid rgba(11, 31, 58, 0.05);
    box-shadow: 0 10px 30px rgba(11, 31, 58, 0.03);
    overflow: hidden;
}

.doc-preview-header {
    background: var(--white);
    border-bottom: 1px solid rgba(11, 31, 58, 0.08);
    padding: var(--g-3) var(--g-4);
}

.doc-preview-body {
    background: #f8fafc;
    height: calc(100vh - 180px);
    min-height: 600px;
    position: relative;
}

.doc-preview-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Section Title Accent */
.doc-section-title {
    font-size: var(--f-h5);
    font-weight: 800;
    color: var(--primary-navy);
    display: flex;
    align-items: center;
    gap: var(--g-2);
    position: relative;
    padding-left: var(--g-3);
    margin-bottom: var(--g-3);
}

.doc-section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 15%;
    bottom: 15%;
    width: 3px;
    background: var(--primary-gold);
    border-radius: 2px;
}

/* Description Card */
.doc-description-card {
    background: var(--white);
    border-radius: var(--g-4);
    border: 1px solid rgba(11, 31, 58, 0.05);
    padding: var(--g-4);
    box-shadow: 0 10px 30px rgba(11, 31, 58, 0.03);
}

.doc-description-text {
    color: var(--text-dark);
    white-space: pre-line;
}

/* Related Documents */
.doc-related-card {
    background: var(--white);
    border-radius: var(--g-4);
    border: 1px solid rgba(11, 31, 58, 0.05);
    padding: var(--g-4);
    box-shadow: 0 10px 30px rgba(11, 31, 58, 0.03);
}

.related-doc-item {
    display: flex;
    align-items: center;
    gap: var(--g-3);
    padding: var(--g-2);
    border-radius: var(--g-3);
    background: #f8fafc;
    border: 1px solid rgba(11, 31, 58, 0.03);
    transition: var(--transition-smooth);
    text-decoration: none !important;
}

.related-doc-item:hover {
    transform: translateY(-2px);
    background: var(--white);
    border-color: rgba(201, 162, 39, 0.3);
    box-shadow: 0 8px 20px rgba(11, 31, 58, 0.06);
}

.related-doc-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--g-2);
    transition: var(--transition-smooth);
}

/* Pulse Animation for Status Dot */
.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #22c55e;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

/* Mobile Optimizations */
@media (max-width: 991px) {
    .doc-sidebar-sticky {
        position: static;
    }
    .doc-preview-body {
        height: 500px;
        min-height: 400px;
    }
}

/* Format Specific Styles to avoid inline styles */
.format-pdf { background-color: rgba(220, 53, 69, 0.06) !important; color: #dc3545 !important; border-color: rgba(220, 53, 69, 0.15) !important; }
.format-doc, .format-docx { background-color: rgba(13, 110, 253, 0.06) !important; color: #0d6efd !important; border-color: rgba(13, 110, 253, 0.15) !important; }
.format-xls, .format-xlsx { background-color: rgba(25, 135, 84, 0.06) !important; color: #218838 !important; border-color: rgba(25, 135, 84, 0.15) !important; }
.format-ppt, .format-pptx { background-color: rgba(255, 193, 7, 0.06) !important; color: #ffc107 !important; border-color: rgba(255, 193, 7, 0.15) !important; }
.format-zip, .format-rar { background-color: rgba(108, 117, 125, 0.06) !important; color: #6c757d !important; border-color: rgba(108, 117, 125, 0.15) !important; }

/* Inline-style overrides for utility components */
.max-w-480 { max-width: 480px; }
.doc-meta-value-filename { max-width: 180px; }
.related-doc-meta { font-size: var(--f-xs) !important; }
.break-word { word-break: break-word; }


