
/* ==========================================================
   KMC-SHARP DIRECTORY PAGE
   Existing website colour palette
========================================================== */

.directory-page {
    background: #fff8ee;
    padding: 38px 20px 50px;
    font-family: "Poppins", sans-serif;
    color: #4e342e;
    min-height: 60vh;
}

.directory-container {
    width: 100%;
    max-width: 1250px;
    margin: 0 auto;
}

/* ================= PAGE HEADING ================= */

.directory-page-heading {
    margin-bottom: 30px;
}

.directory-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin-bottom: 20px;
    font-size: 12px;
    color: #795548;
}

.directory-breadcrumb a {
    color: #BF360C;
    text-decoration: none;
}

.directory-breadcrumb a:hover {
    text-decoration: underline;
}

.directory-breadcrumb span:last-child {
    font-weight: 600;
}

.directory-page-heading h1 {
    color: #BF360C;
    font-size: 29px;
    font-weight: 700;
    margin: 0 0 12px;
    padding-bottom: 12px;
    border-bottom: 3px solid #E65100;
}

.directory-page-heading > p {
    max-width: 900px;
    color: #4e342e;
    font-size: 14px;
    line-height: 1.9;
    margin: 0;
}

.directory-heading-line {
    display: none;
}

/* ================= MAIN CONTENT CONTAINER ================= */

.directory-content {
    background: #ffffff;
    border: 1px solid #FDC591;
    border-radius: 6px;
    padding: 28px;
    box-shadow: 0 5px 18px rgba(78, 52, 46, 0.055);
}

/* ================= CONTENT HEADING ================= */

.directory-section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 22px;
}

.directory-section-heading h2 {
    color: #BF360C;
    font-size: 21px;
    font-weight: 700;
    margin: 0 0 7px;
}

.directory-section-heading p {
    font-size: 13px;
    color: #795548;
    line-height: 1.7;
    margin: 0;
}

.directory-record-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 10px 14px;
    border: 1px solid #FDC591;
    border-radius: 4px;
    color: #BF360C;
    background: #fff8ee;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.directory-record-label i {
    font-size: 16px;
    color: #E65100;
}

/* ================= SAMPLE DATA NOTICE ================= */

.directory-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px 17px;
    margin-bottom: 24px;
    background: #fff8ee;
    border: 1px solid #FDC591;
    border-left: 4px solid #E65100;
    border-radius: 4px;
}

.directory-notice > i {
    color: #BF360C;
    font-size: 18px;
    margin-top: 3px;
}

.directory-notice p {
    margin: 0;
    color: #4e342e;
    font-size: 12px;
    line-height: 1.8;
}

.directory-notice strong {
    color: #BF360C;
}

/* ================= SEARCH TOOLBAR ================= */

.directory-table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 15px;
}

.directory-table-toolbar label {
    color: #BF360C;
    font-size: 13px;
    font-weight: 600;
}

.directory-table-toolbar label i {
    color: #E65100;
    margin-right: 6px;
}

.directory-table-toolbar input {
    width: 360px;
    max-width: 100%;
    min-height: 42px;
    padding: 10px 13px;
    border: 1px solid #FDC591;
    border-radius: 4px;
    outline: none;
    color: #4e342e;
    background: #ffffff;
    font-family: inherit;
    font-size: 12px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.directory-table-toolbar input::placeholder {
    color: #9a8175;
}

.directory-table-toolbar input:focus {
    border-color: #E65100;
    box-shadow: 0 0 0 3px rgba(230, 81, 0, 0.09);
}

/* ================= TABLE WRAPPER ================= */

.directory-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #FDC591;
    border-radius: 4px;
    background: #ffffff;
}

/* ================= DIRECTORY TABLE ================= */

.directory-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    font-size: 12px;
    color: #4e342e;
}

.directory-table thead th {
    padding: 15px 12px;
    background: #fff1e2;
    color: #BF360C;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.6;
    border-bottom: 2px solid #E65100;
    white-space: nowrap;
}

.directory-table tbody td {
    padding: 13px 12px;
    border-bottom: 1px solid #f4e5d9;
    vertical-align: top;
    line-height: 1.75;
}

.directory-table tbody tr:not(.directory-group-row) {
    transition: background-color 0.15s ease;
}

.directory-table tbody tr:not(.directory-group-row):hover {
    background: #fffaf4;
}

.directory-table tbody tr:last-child td {
    border-bottom: none;
}

/* SERIAL NUMBER */

.directory-table tbody td:first-child {
    width: 65px;
    color: #795548;
    font-weight: 500;
}

/* OFFICER NAME PLACEHOLDERS */

.sample-officer {
    display: inline-block;
    color: #795548;
    font-style: italic;
    font-size: 11px;
}

/* POSITION CODE */

.directory-table tbody td:nth-child(5) {
    color: #BF360C;
    font-weight: 600;
    white-space: nowrap;
}

/* POSITION COUNT */

.directory-table tbody td:nth-child(6) {
    text-align: center;
    font-weight: 600;
}

/* ================= DEPARTMENT GROUP ROWS ================= */

.directory-table .directory-group-row td {
    padding: 12px 15px;
    color: #BF360C;
    background: #fff8ee;
    border-top: 1px solid #FDC591;
    border-bottom: 1px solid #FDC591;
    border-left: 3px solid #E65100;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.7;
}

/* ================= NO RESULTS ================= */

.directory-table tfoot td {
    padding: 20px;
    text-align: center;
    color: #795548;
    background: #fffaf4;
    font-size: 13px;
}

/* ================= TABLE FOOTER ================= */

.directory-table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 18px;
}

.directory-table-footer p {
    margin: 0;
    color: #795548;
    font-size: 12px;
}

.directory-print-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 16px;
    background: #E65100;
    color: #ffffff;
    border: 1px solid #E65100;
    border-radius: 4px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.directory-print-btn:hover {
    background: #BF360C;
    border-color: #BF360C;
}

.directory-print-btn:focus-visible {
    outline: 2px solid #BF360C;
    outline-offset: 3px;
}





/* =========================================================
   OFFICIAL CONTACT DETAILS
========================================================= */

.directory-table {
    min-width: 1150px;
}

.directory-table tbody td a {
    color: #BF360C;
    text-decoration: none;
    font-weight: 500;
    overflow-wrap: anywhere;
}

.directory-table tbody td a:hover {
    color: #E65100;
    text-decoration: underline;
}

/* Contact number column */
.directory-table tbody td:nth-child(7) {
    white-space: nowrap;
}

/* Email column */
.directory-table tbody td:nth-child(8) {
    min-width: 190px;
}

/* Group headings span all eight columns */
.directory-table .directory-group-row td {
    text-align: left;
}

/* Mobile table scrolling */
@media (max-width: 900px) {
    .directory-table {
        min-width: 1150px;
    }
}

@media print {
    .directory-table {
        min-width: 0;
        font-size: 8px;
    }
}


/* ================= TABLET ================= */

@media (max-width: 900px) {

    .directory-page {
        padding: 30px 15px 40px;
    }

    .directory-content {
        padding: 22px 18px;
    }

    .directory-section-heading h2 {
        font-size: 19px;
    }

    .directory-table {
        min-width: 850px;
    }

    .directory-table-toolbar input {
        width: 320px;
    }
}

/* ================= MOBILE ================= */

@media (max-width: 600px) {

    .directory-page {
        padding: 24px 10px 32px;
    }

    .directory-page-heading {
        margin-bottom: 22px;
    }

    .directory-page-heading h1 {
        font-size: 24px;
    }

    .directory-page-heading > p {
        font-size: 13px;
    }

    .directory-content {
        padding: 17px 12px;
    }

    .directory-section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
        margin-bottom: 18px;
    }

    .directory-section-heading h2 {
        font-size: 18px;
    }

    .directory-record-label {
        padding: 8px 11px;
    }

    .directory-notice {
        padding: 12px;
        gap: 9px;
    }

    .directory-notice p {
        font-size: 11px;
    }

    .directory-table-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .directory-table-toolbar input {
        width: 100%;
        box-sizing: border-box;
    }

    .directory-table {
        min-width: 850px;
    }

    .directory-table-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .directory-print-btn {
        width: 100%;
    }
}

/* ================= PRINT ================= */

@media print {

    body {
        background: #ffffff !important;
    }

    .govt-utility-bar,
    .govt-main-nav,
    .directory-breadcrumb,
    .directory-table-toolbar,
    .directory-print-btn,
    .govt-hero-footer {
        display: none !important;
    }

    .directory-page {
        padding: 0;
        background: #ffffff;
    }

    .directory-container {
        max-width: none;
    }

    .directory-content {
        padding: 0;
        border: none;
        box-shadow: none;
    }

    .directory-notice {
        break-inside: avoid;
    }

    .directory-table-wrapper {
        overflow: visible;
        border: 1px solid #cccccc;
    }

    .directory-table {
        min-width: 0;
        font-size: 9px;
    }

    .directory-table thead {
        display: table-header-group;
    }

    .directory-table tr {
        break-inside: avoid;
    }

    .directory-table thead th,
    .directory-table tbody td,
    .directory-table .directory-group-row td {
        padding: 6px;
        color: #4e342e;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .directory-table .directory-group-row td {
        background: #fff8ee !important;
    }

    .directory-table tfoot {
        display: none;
    }
}




/* ==========================================================
   UPDATED DIRECTORY TABLE - SIX COLUMNS
========================================================== */

.directory-table {
    width: 100%;
    min-width: 950px;
    border-collapse: collapse;
    table-layout: auto;
}

/* Contact number */

.directory-table tbody td:nth-child(5) {
    white-space: nowrap;
}

/* Email address */

.directory-table tbody td:nth-child(6) {
    min-width: 190px;
    overflow-wrap: anywhere;
}

/* Clickable contact details */

.directory-table tbody td a {
    color: #BF360C;
    text-decoration: none;
    font-weight: 500;
}

.directory-table tbody td a:hover {
    color: #E65100;
    text-decoration: underline;
}

/* Department headings */

.directory-table .directory-group-row td {
    text-align: left;
}

/* Tablet and mobile */

@media (max-width: 900px) {

    .directory-table {
        min-width: 950px;
    }

}

/* Print */

@media print {

    .directory-table {
        min-width: 0;
        font-size: 9px;
    }

    .directory-table thead th,
    .directory-table tbody td,
    .directory-table .directory-group-row td {
        padding: 6px;
    }

}





