/* ==========================================================================
   Colour variables (edit values here to change a colour site-wide)
   ========================================================================== */
 
:root {
    --color-white: #ffffff;
    --color-offwhite: #eeeeee;
    --color-lightgrey: #cccccc;
    --color-dimgrey: #777777;
    --color-black: #000000;
    --color-red: #ff0000;
    --color-darkgreen: #006400;
    --color-lightgreen: #ecfdf5;
    --color-lightgreen-2: #a7f3d0;
    --color-green-2: #10b981;
    --color-green: #047857;
    --color-cyan: #006699;
    --color-lightblue: #bde1ff;
    --color-lightblue-3: #cbd5e1;
    --color-lightblue-2: #e2e8f0;
    --color-mutedblue: #64748b;
    --color-darkblue-2: #1e293b;
    --color-blue: #2563eb;
    --color-blue-2: #1d4ed8;
    --color-darkblue: #00008b;
    --color-black-a5: rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   Typography & elements
   ========================================================================== */

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

/* Zebra striping */
table tr:nth-of-type(odd) {
    background: var(--color-offwhite);
}

table th,
table tr:first-child td {
    background: var(--color-darkgreen);
    color: var(--color-white);
    font-weight: 900;
}

table td,
th {
    padding: 6px;
    border: 1px solid var(--color-lightgrey);
    text-align: left;
    width: inherit !important;
    vertical-align: top;
}

/* ==========================================================================
   Content & components
   ========================================================================== */

#sp-bottom .sp-module-content h4 {
    color: var(--color-white) !important;
}

#sp-main-body {
    padding: 30px 0;
}

.sp-page-title-heading {
    padding: 100px;
}

.list-title img {
    float: left !important;
    padding: 0 20px 0 0 !important;
}

.dropfiles-content-table.dropfiles-content .table td.file_title a.title {
    color: var(--color-black) !important;
}

.categories-head h2 {
    font-size: 1.6rem !important;
    color: var(--color-darkblue) !important;
    text-transform: capitalize !important;
}

.info {
    color: var(--color-cyan);
    border: 1px solid var(--color-cyan);
    background: var(--color-lightblue);
    padding: 20px;
}

.com-dpcalendar-list .dp-event__title-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 5px;
    border-radius: 5px;
    display: none;
}

h2.dp-event__title {
    font-size: 1.6rem !important;
}

.mod-articles-category-group {
    font-size: 1.2rem !important;
    font-weight: 600 !important;
}

.dropfilescategory:not(.backcategory).catlink {
    min-width: 200px;
    text-align: center;
}

.dropfiles-content-table.dropfiles-content a {
    word-wrap: anywhere;
}

table.category th {
    background: var(--color-darkgreen);
    color: var(--color-white);
    font-weight: bold;
}

table.category tr td:first-child {
    width: 20%;
}

.dp-calendar table th,
.dp-calendar table tr td {
    color: var(--color-black);
    font-weight: 400;
    background: var(--color-white);
}

.sppb-person-image,
.sppb-person-image img {
    height: 280px !important;
}

/* ==========================================================================
   Forms & buttons
   ========================================================================== */

a.button,
a.btn {
    padding: 10px 15px;
    border: 1px solid var(--color-darkgreen);
    background: var(--color-darkgreen);
    color: var(--color-white);
    border-radius: 8px;
}

a.button:hover,
a.btn:hover {
    background: var(--color-white);
    color: var(--color-darkgreen);
    border: 1px solid var(--color-darkgreen);
    border-radius: 8px;
}

.nobtn a.button {
    padding: 0px !important;
    border: 0px !important;
    background: transparent !important;
    color: var(--color-red);
    border-radius: 0px;
}

/* Container styling - fills parent width */
ul.fields-container {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Base styling for standard card rows (Fields 1–3) */
ul.fields-container li.field-entry {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 1rem;
    width: 100%;
    box-sizing: border-box;
    padding: 0.875rem 1.25rem;
    background-color: var(--color-white);
    border: 1px solid var(--color-lightblue-2);
    border-radius: 10px;
    box-shadow: 0 1px 3px var(--color-black-a5);
    transition: all 0.2s ease-in-out;
}

ul.fields-container li.field-entry:hover {
    border-color: var(--color-lightblue-3);
    box-shadow: 0 4px 12px var(--color-black-a5);
    transform: translateY(-1px);
}

/* Labels */
ul.fields-container .field-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-mutedblue);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Base Values */
ul.fields-container .field-value {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-darkblue-2);
    text-align: right;
    word-break: break-word;
}

/* -------------------------------------------------------------
   4th Item Specific Layout (Full Width, Label on Top)
   ------------------------------------------------------------- */
ul.fields-container li.field-entry:nth-child(4) {
    grid-template-columns: 1fr;
    /* Switch from 2 columns to 1 full-width column */
    gap: 0.5rem;
    align-items: start;
}

ul.fields-container li.field-entry:nth-child(4) .field-label {
    margin-bottom: 0.25rem;
}

ul.fields-container li.field-entry:nth-child(4) .field-value {
    text-align: left;
    /* Left align value content for block layout */
    width: 100%;
}

/* Status Badge Highlight */
ul.fields-container li.status .field-value {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    background-color: var(--color-lightgreen);
    color: var(--color-green);
    border: 1px solid var(--color-lightgreen-2);
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.85rem;
    justify-self: end;
    /* Aligns badge to the right in 2-column mode */
}

/* Pulse indicator dot for Open status */
ul.fields-container li.status .field-value::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: var(--color-green-2);
    border-radius: 50%;
}

/* Survey Link Styling */
ul.fields-container li.survey-link .field-value a {
    color: var(--color-blue);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s ease;
}

ul.fields-container li.survey-link .field-value a:hover {
    color: var(--color-blue-2);
    text-decoration: underline;
}

/* ==========================================================================
   Footer
   ========================================================================== */

#sp-footer,
#sp-bottom {
    background: var(--color-dimgrey);
    color: var(--color-white);
}

#sp-footer a,
#sp-bottom a {
    color: var(--color-white) !important;
}

/* ==========================================================================
   REMOVED BY CSS CLEANER - commented out so you can review (safe to delete)
   ========================================================================== */

/* REMOVED: declarations overridden by a later rule (e.g. line 58) - original line 58
table th,
table tr:first-child td {
    font-weight: bold;
}
*/
