﻿/* ============================================================
   NYMR CLOCKING PANEL – FULL MODERN UI STYLESHEET
   ============================================================ */

:root {
    --nymr-green: #215732;
    --nymr-green-light: #2d7244;
    --nymr-cream: #f0e7c1;
    --nymr-blue: royalblue; 
    --pill-bg: #f5f5f5;
    --pill-hover: #ececec;
    --pill-selected-bg: #d6ead1;
    --pill-selected-border: #1a7133;
    --btn-green: #27ae60;
    --btn-red: #c0392b;
}


/* ============================================================
   WRAPPER
   ============================================================ */

.clocking-wrapper {
    max-width: 1600px;
    margin: auto;
    padding: 1.5rem;
    font-family: "Segoe UI", sans-serif;
    color:  var(--nymr-green);
}


/* ============================================================
   STATUS HEADER
   ============================================================ */

.status-card {
    background: var(--nymr-green);
    color: white;
    padding: 2rem 2.2rem 2.6rem;
    border-radius: 16px;
    text-align: center;
    margin-bottom: 1.6rem;
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.status-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: .4rem;
}

.status-in {
    background: var(--nymr-green)
}

.status-out {
    background: var(--btn-red)
}

.location {
    background: var(--nymr-blue)
}

.status-pill {
    display: inline-block;
    background: rgba(255,255,255,0.18);
    padding: .4rem 1.4rem;
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.03em;
    margin-bottom: .4rem;
}

.status-details {
    font-size: .95rem;
    opacity: .9;
}

/* ============================================================
   HEADER LOCATION SELECTOR
   ============================================================ */

.header-location-block {
    margin-top: 1.4rem;
}

.header-location-label {
    font-size: 1rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: .5rem;
    color: white;
}

.pill-search-header {
    width: 100%;
    padding: .55rem .9rem;
    border-radius: 10px;
    border: none;
    outline: none;
    margin-bottom: .7rem;
    font-size: 0.95rem;
}

.pill-list-header {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: center;
}

.header-pill {
    background: var(--pill-bg);
    padding: .55rem 1rem;
    border-radius: 999px;
    border: 2px solid transparent;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all .15s ease-in-out;
    white-space: nowrap;
}

    .header-pill:hover {
        background: var(--pill-hover);
        transform: translateY(-2px);
    }

    .header-pill.selected {
        background: var(--pill-selected-bg);
        border-color: var(--pill-selected-border);
        font-weight: 600;
    }

.header-location-dropdown {
    margin-top: .9rem;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
}


/* ============================================================
   MAIN LAYOUT – 2 COLUMNS ON DESKTOP
   ============================================================ */

.clocking-main-layout {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.3rem;
    flex-direction: column;
}

@media (min-width: 1100px) {
    .clocking-main-layout {
        flex-direction: row;
        height: 60vh;
    }

    .clocking-left-column,
    .clocking-right-column {
        flex: 1;
    }

    .today-card {
        height: 100%;
        max-height: 710px;
        overflow-y: auto;
    }
}


/* ============================================================
   SUMMARY BOXES
   ============================================================ */

.summary-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.1rem;
    margin-bottom: 1.3rem;
}

.summary-pill {
    background: var(--nymr-cream);
    border: 3px solid var(--nymr-border);
    border-radius: 18px;
    padding: 1.3rem 1rem;
    text-align: center;
}

.summary-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: .35rem;
}

.summary-value {
    font-size: 2rem;
    font-weight: 800;
}


/* ============================================================
   ROLE + LOCATION PILLS
   ============================================================ */

.selection-group {
    border: 3px solid var(--nymr-border);
    border-radius: 18px;
    padding: 1.1rem 1.2rem;
    margin-bottom: 1.4rem;
}

.selection-header {
    display: flex;
    justify-content: space-between;
}

.selection-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: white;
}

.selection-hint {
    font-size: .85rem;
    opacity: .7;
}

.pill-search {
    width: 100%;
    padding: .55rem .9rem;
    margin: .75rem 0;
    border-radius: 10px;
    border: none;
    outline: none;
    font-size: 0.95rem;
}

.pill-list,
.pill-list-horizontal {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
}

.pill-list-horizontal {
    justify-content: flex-start;
}

.pill-button {
    background: var(--pill-bg);
    border-radius: 999px;
    padding: .55rem 1rem;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: .9rem;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    transition: all .15s ease-in-out;
}

    .pill-button:hover {
        background: var(--pill-hover);
        transform: translateY(-2px);
    }

    .pill-button.selected {
        background: var(--pill-selected-bg);
        border-color: var(--pill-selected-border);
        font-weight: 600;
    }


/* ============================================================
   SELECT (DXCOMBOBOX) STYLING
   ============================================================ */

.selection-input .dxbs-text-edit,
.header-location-dropdown .dxbs-text-edit {
    border-radius: 12px !important;
    border: 2px solid var(--nymr-border) !important;
    padding: .4rem .6rem !important;
}

.dxbs-listbox {
    border-radius: 12px !important;
}


/* ============================================================
   CLOCK IN / OUT BUTTONS
   ============================================================ */

.buttons-row {
    display: flex;
    gap: 1.2rem;
}

.big-btn {
    flex: 1;
    border: none;
    border-radius: 18px;
    padding: 1.3rem 1.2rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: white;
    cursor: pointer;
    transition: all .15s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

    .big-btn:hover:not(:disabled) {
        transform: translateY(-3px);
        box-shadow: 0 8px 18px rgba(0,0,0,.2);
    }

.clock-in-btn {
    background: var(--btn-green);
}

.clock-out-btn {
    background: var(--btn-red);
}

.big-btn:disabled {
    opacity: .5;
    cursor: default;
    transform: none !important;
}

.spacer {margin-top:20px}
/* ============================================================
   ACTIVITY TIMELINE
   ============================================================ */

.today-card {
    background: #fff;
    border: 3px solid var(--nymr-border);
    border-radius: 18px;
    padding: 1.3rem 1.3rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
}

.today-title {
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: .8rem;
}

.timeline {
    padding: 0;
    list-style: none;
}

.timeline-item {
    padding: .8rem 0;
    border-bottom: 1px solid #eee;
}

    .timeline-item:last-child {
        border-bottom: none;
    }

    .timeline-item.open {
        background: #f2f7f2;
    }

.time-range {
    font-weight: 700;
    margin-bottom: .2rem;
}

.timeline-details {
    font-size: .95rem;
    color: #444;
}

.duration {
    font-style: italic;
    margin-top: .15rem;
}

/* ============================================================
   WHO IS OR HAS BEEN CLOCKED IN PANEL
   ============================================================ */

/* ---------- WHO DASHBOARD ---------- */

.who-wrapper {
    margin-top: 1.5rem;
}

/* SUMMARY BAR */

.who-summary-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.25rem;
    border-radius: 16px;
    background: #f7f5ea;
    border: 2px solid var(--border-green);
    margin-bottom: 1.5rem;
}

.who-summary-main {
    display: flex;
    flex-direction: column;
}

.who-summary-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--nymr-green);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.who-summary-subtitle {
    font-size: 0.9rem;
    opacity: 0.8;
}

.who-summary-metrics {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.who-summary-pill {
    min-width: 130px;
    padding: 0.6rem 0.9rem;
    border-radius: 999px;
    border: 2px solid var(--border-green);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

    .who-summary-pill.live {
        background: #e9f7ef;
    }

    .who-summary-pill.today {
        background: #fdf3e7;
    }

.who-summary-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.1rem;
}

.who-summary-value {
    font-size: 1.4rem;
    font-weight: 700;
}

/* LOCATION GRID */

.who-location-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
}

.who-location-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

@media (min-width: 1000px) {
    .who-location-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1400px) {
    .who-location-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.who-empty {
    padding: 1.25rem;
    border-radius: 14px;
    background: #fff;
    border: 2px dashed var(--border-green);
    text-align: center;
    font-style: italic;
}

/* LOCATION CARD */

.who-location-card {
    background: #fff;
    border-radius: 18px;
    border: 3px solid var(--border-green);
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    min-height: 220px;
}

.who-card-header {
    padding: 0.9rem 1.1rem;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
}

.who-card-title {
    font-size: 1.1rem;
    font-weight: 700;
}

.who-card-subtitle {
    font-size: 0.85rem;
    opacity: 0.8;
}

.who-card-badges {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: flex-end;
}

.who-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid rgba(0,0,0,0.12);
}

.who-badge-live {
    background: #e9f7ef;
    color: #1e8449;
}

.who-badge-today {
    background: #fdf3e7;
    color: #d35400;
}

/* CARD BODY: TWO COLUMNS */

.who-card-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 900px) {
    .who-card-body {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.who-column {
    padding: 0.8rem 1rem;
    max-height: 260px;
    overflow-y: auto;
}

    .who-column + .who-column {
        border-left: 1px solid rgba(0,0,0,0.05);
    }

.who-column-title {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.who-column-live {
    background: rgba(33, 87, 50, 0.02);
}

.who-column-earlier {
    background: rgba(0, 0, 0, 0.01);
}

.who-column-empty {
    font-size: 0.85rem;
    font-style: italic;
    opacity: 0.7;
}

/* PERSON ROWS */

.who-person-row {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.4rem 0;
    border-bottom: 1px dashed rgba(0,0,0,0.08);
    font-size: 0.9rem;
}

    .who-person-row:last-child {
        border-bottom: none;
    }

.who-person-main {
    flex: 1 1 auto;
}

.who-person-name {
    font-weight: 600;
}

.who-person-role {
    font-size: 0.8rem;
    opacity: 0.8;
}

.who-person-meta {
    text-align: right;
    font-size: 0.8rem;
    white-space: nowrap;
}

/* Staff vs Volunteer emphasis */

.who-person-row.staff .who-person-name {
    color: #1e8449;
}

.who-person-row.volunteer .who-person-name {
    color: #6c3483;
}

/* DEPARTMENT COLOUR-CODING (LOCATION-BASED) */

.who-location-card.dept-pickering .who-card-header {
    background: #eaf5e9;
}

.who-location-card.dept-grosmont .who-card-header {
    background: #e9f3fb;
}

.who-location-card.dept-goathland .who-card-header {
    background: #fcefee;
}

.who-location-card.dept-unassigned .who-card-header {
    background: #f8f9f9;
}

.who-location-card.dept-default .who-card-header {
    background: #f5f7f2;
}

.who-live-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: rgba(33, 87, 50, 0.08); /* soft green tint */
    color: #215732;
}

.who-live-dot {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 999px;
    background: #27ae60; /* green dot */
    box-shadow: 0 0 0 0 rgba(39, 174, 96, 0.7);
}

/* When refreshing, make the dot pulse / spin */
.who-live-dot--spin {
    animation: who-live-pulse 0.8s ease-out infinite;
}

@keyframes who-live-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(39, 174, 96, 0.7);
    }

    70% {
        transform: scale(1.4);
        box-shadow: 0 0 0 8px rgba(39, 174, 96, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(39, 174, 96, 0);
    }
}

.view-icon-button {
    background: none;
    border: none;
    padding: 4px;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.45;
    transition: all .15s ease-in-out;
}

    .view-icon-button:hover {
        opacity: 0.8;
    }

    .view-icon-button.active {
        opacity: 1;
    }

    .view-icon-button svg {
        fill: #215732; /* NYMR green */
    }


/* RESPONSIVE TWEAKS */

@media (max-width: 768px) {
    .who-card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .who-card-badges {
        align-items: flex-start;
    }

    .who-person-meta {
        text-align: left;
    }
}
