/* 
 * JGPNR Documentation Styles
 * Supplemental styles for components not easily handled by Tailwind utilities alone.
 */

:root {
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

/* DIAGRAM SYSTEM (Flowcharts) 
 * Used in System & Email Documentation
 */
.flowchart {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
    background: #f9fafb;
    /* gray-50 */
    border: 1px solid #e5e7eb;
    /* gray-200 */
    border-radius: 0.5rem;
    margin: 2rem 0;
    font-family: var(--font-sans);
}

.fc-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    width: 100%;
    flex-wrap: wrap;
}

.fc-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    min-width: 150px;
}

.fc-box {
    background: #ffffff;
    border: 1px solid #1f2937;
    /* gray-800 */
    padding: 1rem 1.5rem;
    text-align: center;
    min-width: 140px;
    position: relative;
    box-shadow: 2px 2px 0px #1f2937;
    /* Hard shadow for diagram feel */
    border-radius: 4px;
}

.fc-title {
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    display: block;
    text-transform: uppercase;
    color: #000;
}

.fc-subtitle {
    font-size: 0.75rem;
    color: #4b5563;
    /* gray-600 */
    display: block;
}

/* Connectors */
.fc-arrow-right {
    display: flex;
    align-items: center;
    justify-content: center;
}

.fc-arrow-right::after {
    content: "→";
    display: inline-block;
    font-size: 1.5rem;
    color: #9ca3af;
    /* gray-400 */
    font-weight: 300;
}

.fc-arrow-down {
    display: flex;
    justify-content: center;
    height: 30px;
    align-items: center;
}

.fc-arrow-down::after {
    content: "↓";
    display: block;
    font-size: 1.5rem;
    color: #9ca3af;
    /* gray-400 */
    font-weight: 300;
}

@media (max-width: 768px) {
    .fc-grid {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .fc-arrow-right::after {
        content: "↓";
    }

    .fc-col {
        width: 100%;
        gap: 1rem;
    }
}

/* RESPONSIVE TABLES
 * Enables horizontal scrolling on mobile for wide tables
 */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}

.table-responsive::-webkit-scrollbar {
    height: 6px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Override overflow-hidden on table wrappers for mobile */
@media (max-width: 768px) {
    .overflow-hidden {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    /* Add scroll hint shadow on tables */
    .overflow-hidden table {
        min-width: 500px;
    }
}