/* ============================================================
   GLOBAL LAYOUT — FORCE FULL WIDTH FOR CPD PAGES
============================================================ */

.cpd-form-wrapper,
.cpdlog-container {
    width: 100% !important;
    max-width: 100% !important;
}

.cpd-form-wrapper *,
.cpdlog-container * {
    max-width: 100% !important;
}


/* ============================================================
   GENERAL PAGE STYLING
============================================================ */

body {
    background: #F1F1F1;
    font-family: Arial, sans-serif;
    color: #2D3034;
    padding: 20px;
    margin: 0;
}


/* ============================================================
   FORM BLOCKS
============================================================ */

.item {
    margin-bottom: 15px;
    padding: 12px;
    border: 1px solid #94AF9F;
    background: #CCDDD5;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    border-radius: 6px;
}

.field {
    display: flex;
    flex-direction: column;
    min-width: 180px;
    flex: 1;
}

.field input,
.field select {
    padding: 6px;
    background: #F1F1F1;
    border: 1px solid #94AF9F;
    border-radius: 4px;
    color: #2D3034;
}

label {
    font-weight: bold;
    font-size: 13px;
    margin-bottom: 4px;
}


/* ============================================================
   SUMMARY INFO TABLE
============================================================ */

.info-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
    background: #CCDDD5;
    box-shadow: 0 0 6px rgba(0,0,0,0.05);
    border-radius: 8px;
    overflow: hidden;
}

.info-table th,
.info-table td {
    border: 1px solid #46747D;
    padding: 10px;
    vertical-align: top;
    color: #364958;
}

.info-table th {
    background: #46747D;
    color: #EFEFEF;
}


/* Responsive summary table */
@media (max-width: 768px) {

    .info-table,
    .info-table thead,
    .info-table tbody,
    .info-table tr,
    .info-table th,
    .info-table td {
        display: block;
        width: 100%;
    }

    .info-table thead { display: none; }

    .info-table tr {
        border: 1px solid #46747D;
        margin-bottom: 15px;
        border-radius: 6px;
        background: #CCDDD5;
        padding: 10px;
    }

    .info-table td::before {
        content: attr(data-label);
        font-weight: bold;
        display: block;
        margin-bottom: 6px;
    }
}


/* ============================================================
   ENTRIES LIST (GRID)
============================================================ */

.table-container {
    width: 100%;
    margin-top: 20px;
}

.headings {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    background: #46747D;
    color: white;
    border-radius: 6px 6px 0 0;
}

.headings div {
    padding: 8px;
    text-align: center;
    font-weight: bold;
    border-right: 1px solid #D6E2DD;
}

.headings div:last-child {
    border-right: none;
}

.entry {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    border: 1px solid #37A0AC;
   
}

.entry div {
    padding: 6px;
    border-right: 1px solid #37A0AC;
    display: flex;
    align-items: center;
}

.entry div:last-child { border-right: none; }


/* ============================================================
   FIXED TOTALS ROW (NO THICK PADDING, NO BORDERS)
============================================================ */

.entry.totals {
    background: #37A0AC !important;
    color: white !important;
    font-weight: 600;
    padding: 0 !important;
    border: none !important;
    height: auto !important;
    min-height: auto !important;
}

.entry.totals div {
    padding: 4px 6px !important;
    border: none !important;
    margin: 0 !important;
}


/* Mobile/tablet entry layout */
@media (max-width: 900px) {

    .headings { display: none; }

    .entry {
        grid-template-columns: 1fr;
        border-radius: 6px;
        margin-bottom: 12px;
    }

    .entry div {
        flex-direction: column;
        text-align: left;
        border-bottom: 1px solid #D6E2DD;
        border-right: none !important;
        background: #CCDDD5;
    }

    .entry div:last-child {
        border-bottom: none;
    }

    .entry.totals {
        text-align: center;
        background: #37A0AC !important;
    }
}


/* ============================================================
   PRINT MODE — CLEAN + REMOVE COLUMN
============================================================ */

@media print {

    header, footer, nav, .menu, .sidebar, .widget-area,
    .site-header, .site-footer, .entry-header, .page-header,
    .wp-block-navigation, .wp-block-template-part,
    .wp-block-group, .wp-block-site-title, .top-menu-links,
    .wp-block-post-title, .entry-title, .wp-block-heading,
    .button-bar {
        display: none !important;
    }

    body {
        margin: 0 !important;
        padding: 0 !important;
        background: white !important;
    }

    .cpd-form-wrapper,
    .cpdlog-container,
    .table-container {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .headings > div:nth-child(8),
    .entry > div:nth-child(8),
    .entry.totals > div:nth-child(8) {
        display: none !important;
        visibility: hidden !important;
    }

    .headings,
    .entry,
    .entry.totals {
        grid-template-columns: repeat(7, 1fr) !important;
    }

    .entry.totals {
        background: #37A0AC !important;
        color: #fff !important;
        padding: 4px 0 !important;
        border: none !important;
    }

    .entry.totals div {
        padding: 4px 6px !important;
        border: none !important;
    }
}


/* ============================================================
   MOBILE/TABLET LABELS FOR TOTAL HOURS ROW
============================================================ */
@media (max-width: 900px) {

    .entry.totals {
        grid-template-columns: 1fr 1fr !important;
        padding: 5px !important;
    }

    /* "Total Hours" heading stays full width */
    .entry.totals div:first-child {
        grid-column: 1 / -1;
        font-size: 18px;
        font-weight: 700;
        margin-bottom: 6px;
        background: #37A0AC !important;
        color: white !important;
        text-align: center;
    }

    /* Label before normal hours */
    .entry.totals div:nth-child(2)::before {
        content: "Total Hours";
        display: block;
        font-weight: 600;
        margin-bottom: 4px;
        color: #fff;
    }

    /* Label before participatory hours */
    .entry.totals div:nth-child(3)::before {
        content: "Participatory";
        display: block;
        font-weight: 600;
        margin-bottom: 4px;
        color: #fff;
    }

    /* Hide empty last div */
    .entry.totals div:nth-child(4) {
        display: none !important;
    }
}







