
:root {
    --nfg-bigscreen-width: 680px;
    --pico-font-family-sans-serif: Helvetica, Arial, sans-serif;

    --arrow-back-bg: url("data:image/svg+xml;utf8,<?xml version=" 1.0 " encoding=" UTF-8 "?><svg width=" 24px " height=" 24px " viewBox=" 0 0 24 24 " stroke-width=" 1.8 " fill=" none " xmlns=" http://www.w3.org/2000/svg " color=" #000000 "><path d=" M21 12L3 12M3 12L11.5 3.5M3 12L11.5 20.5 " stroke=" #000000 " stroke-width=" 1.8 " stroke-linecap=" round " stroke-linejoin=" round "></path></svg>");

    --edit-icon-color: #4A90E2; /* Soft blue for the icon stroke */
    --edit-hover-bg: #e9f2fa; /* Very light blue for hover background */
}


body > header {
    z-index: 4;
    position: relative;
    padding: .5rem 0;
    border-bottom: var(--pico-border-width) solid transparent;


    .container {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .container a h3 {
        transform: translateY(10px);
    }
}

body > footer {
    position: sticky;
    top: 100vh;
}

.org-tags {
    line-height: .85em;
    font-family: var(--pico-font-family-sans-serif);
    font-size: small;
    color: var(--pico-primary-inverse);
    background-color: var(--pico-primary-background);
}

.top-nav {
    background-color: var(--pico-form-element-background-color);
    height: 2.5lh;
    position: fixed;
    width: 100%;
    padding: 0 0;
    top: 0;

    .logo {
        transform: translateY(3px);
    }

    .menu > summary {
        border: none !important;
        margin-top: -5px;
    }

    .menu > summary::before {
        border: none !important;
        margin-top: -5px;
    }

    .menu > summary::after {
        display: none;
    }

}

.org-logo {
    width: 64px;
    height: 64px;
    border-radius: 0.5rem;
    object-fit: cover;
}

.org-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 600;
    margin: 0.5rem 0;
}

.appointment-card {
    padding: 1rem;
}

.appointment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;

    .appointment-title {
        margin: 0;
        line-height: 1; /* Optional: makes it align better if status uses tight line height */
    }

    .appointment-status {
        padding: 0.25rem 0.75rem;
        border-radius: 9999px;
        font-size: 0.875rem;
    }
}

.status-pending {
    background-color: #FFF9C4;
    color: #6D4C41;
}

.status-confirmed {
    background-color: #E8F5E9;
    color: #2E7D32;
}

.status-canceled {
    background-color: #FFEBEE;
    color: #C62828;
}

.status-completed {
    background-color: #E3F2FD;
    color: #1565C0;
}

.status-approved {
    background-color: #F3E5F5;
    color: #6A1B9A;
}

.appointment-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    font-size: 0.875rem;
    color: #64748b;

    .detail-item {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;

        .detail-label {
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .detail-value {
            font-weight: 500;
        }
    }
}

.appointment-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

main {
    margin-top: 2.8lh;
}

main article {
    overflow-x: clip;
}

img.avatar {
    object-fit: cover;
    object-position: top center;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    margin: 0 10px;
}

@media (min-width: 1024px) {
    .container {
        max-width: var(--nfg-bigscreen-width);
    }
}

@media (min-width: 1280px) {
    .container {
        max-width: var(--nfg-bigscreen-width);
    }
}

@media (min-width: 1536px) {
    .container {
        max-width: var(--nfg-bigscreen-width);
    }
}

@media (min-width: 768px) {
    .container {
        max-width: var(--nfg-bigscreen-width);
    }
}


/* Works on Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--pico-card-background-color) var(--pico-background-color);
}

/* Works on Chrome, Edge, and Safari */
*::-webkit-scrollbar {
    width: 12px;
    border-radius: 0 10px 10px 0;
}

*::-webkit-scrollbar-track {
    background: var(--pico-background-color);
    border-radius: 10px;
}

*::-webkit-scrollbar-thumb {
    background-color: var(--pico-card-background-color);
    border-radius: 10px;
    border: 3px solid var(--pico-background-color);
}

.profile-banner {
    background-size: cover;
    background-position: center;
    background-color: var(--pico-card-background-color);
    border-radius: 10px;
    height: 256px;
    display: flex;
}

.profile-picture {
    width: 100px;
    height: 100px;
    margin: -70px auto;
    border-radius: 50%;
    background-size: cover;
    background-color: var(--pico-card-background-color);
    background-position: center;
    border: 5px solid var(--pico-card-background-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
}

.hideContent {
    overflow: hidden;
    height: 3lh;
    mask-image: linear-gradient(#000 80%, transparent 100%);
}

.showContent {
    height: auto;
}

.error {
    color: var(--pico-form-element-invalid-focus-color);
}

/**
 Services style
*/
.icon-check {
    color: var(--pico-primary-inverse);
}

.services {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--pico-border-width);

    .container {
        background-color: var(--pico-background-color);
        border-top: var(--pico-secondary-focus) solid var(--pico-border-width);
        border-bottom: var(--pico-secondary-focus) solid var(--pico-border-width);
        overflow-x: hidden;
        overflow-y: auto;
        padding: 1em;
    }

    input[type="checkbox"] + label {
        background-color: var(--pico-card-background-color);
        border: var(--pico-secondary-focus) solid var(--pico-border-width);
        box-shadow: var(--pico-card-box-shadow);
        -webkit-appearance: none;
        width: 100%;
        position: relative;
        border-radius: var(--pico-border-radius);
        cursor: pointer;
        outline: none;
        padding: calc(var(--pico-spacing) / 2) var(--pico-spacing);
        margin-bottom: calc(var(--pico-border-width) * 8);
    }

    input[type="checkbox"] {
        display: none;
        z-index: -1;
    }

    input[type="checkbox"] + label .service-title {
        display: flex;
        width: 100%;
        justify-content: space-between;
        color: var(--pico-primary);
    }

    input[type="checkbox"]:checked + label {
        background-color: var(--pico-primary-focus);
    }
}

nfg-app-cal {
    .calendar-header {
        display: grid;
        grid-template-columns: 6fr 1fr 1fr;
        grid-column-gap: .5em;
        justify-content: stretch;
        align-items: center;
        background-color: var(--pico-background-color);
        padding: 20px;
        font-weight: bold;
        /*font-size: 1.875em;*/
        border-bottom: var(--pico-border-width) solid var(--pico-table-border-color);
    }

    .calendar-header button {
        padding: calc(var(--pico-form-element-spacing-vertical) / 1.2) calc(var(--pico-form-element-spacing-horizontal) / 1.5);
        border: none;

    }

    .calendar-header button:before {
        margin: 0 auto;
    }

    .calendar-days {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        text-align: center;
    }

    .day {
        font-size: .875em;
        padding: .875em;
        background-color: var(--pico-background-color);
        border-bottom: var(--pico-border-width) solid var(--pico-table-border-color) !important;
        height: 2.2lh;
    }

    .day-header::first-letter {
        text-transform: capitalize;
    }

    .day-header {
        font-weight: bold;
        text-align: center;
        font-size: .875em;
        background-color: var(--pico-background-color);
        border-bottom: var(--pico-border-width) solid var(--pico-table-border-color);
        padding: 10px;
    }

    .day:hover, .day-selected {
        background-color: var(--pico-secondary-hover-background);
        border-radius: var(--pico-border-radius);
        color: var(--pico-secondary-inverse);
        cursor: pointer;
    }

    .day.past,
    .day.inactive {
        color: var(--pico-muted-color);
        cursor: pointer;
    }

    .day.past:hover,
    .day.inactive:hover {
        background-color: var(--pico-background-color);
        cursor: initial;
    }

    .day.past > div,
    .day.inactive > div {
        opacity: 0.5;
    }

    .today {
        color: var(--pico-background-color) !important;
    }

    .today-pin {
        height: 1.8em;
        width: 1.8em;
        border-radius: 100%;
        border: var(--pico-primary) .25em solid;
        background: var(--pico-primary);
        margin: 0 auto -1.6em auto;
    }
}

nfg-appointment-wizard {
    ol.stepper {
        --default-bg: var(--pico-secondary-border);
        --default-color: black;
        --active-bg: var(--pico-primary-background);
        --active-color: var(--pico-primary-inverse);
        --circle: 2.4em;
        --step-border: 3px;

        display: flex;
        list-style: none;
        justify-content: space-between;
        margin: 0 19px;
        padding: 0;
        /* font-size: 22px; */
        counter-reset: step;
        background: linear-gradient(var(--default-bg) 0 0) no-repeat 50% calc((var(--circle) - var(--step-border)) / 2)/100% var(--step-border);
    }

    ol.stepper {
        li {
            display: grid;
            place-items: center;
            gap: 5px;
        }

        li::before {
            content: counter(step) " ";
            counter-increment: step;
            display: grid;
            place-content: center;
            height: var(--circle);
            aspect-ratio: 1;
            background: var(--active-bg);
            color: var(--active-color);
            border: var(--step-border) solid var(--pico-primary-focus);
            box-sizing: border-box;
            border-radius: 50%;
        }

        li.active ~ li::before {
            background: var(--default-bg);
            color: var(--default-color);
            border: var(--step-border) solid var(--pico-secondary-border);
        }

        li.active::after {
            content: "";
            position: absolute;
            height: var(--step-border);
            right: 100%;
            top: calc((var(--circle) - var(--step-border)) / 2);
            /* same offset as the background */
            width: 100vw;
            /* very big value */
            background: var(--active-bg);

        }
    }
}

.timeslots {
    /*padding: .85em 0.4em;*/
    overflow-x: scroll;
    overflow-y: hidden;
    display: flex;
    flex-direction: row;
    height: 4lh;

    .timeslot {
        margin: 4px;
        transform: translateY(-100px);
        opacity: 0;
        animation: button-pop 0.1s ease forwards;

        div {
            /*font-size: 1.1rem;*/
            width: 2em;
        }
    }
}

nfg-app-wizard {
    .step {
        display: block;
        animation: step-appear 0.2s ease forwards;
    }

    footer {
        display: grid;
        grid-template-columns: 1fr !important;
        grid-template-rows: auto;
        gap: .5em;
        justify-content: space-between;
        margin-top: 64px;
    }
}

@keyframes step-appear {
    from {
        transform: translateY(-200px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes button-pop {
    from {
        transform: translateY(-100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

path#check-icon {
    stroke-dasharray: 22px;
    stroke-dashoffset: 22px;
    animation: check 0.4s ease-out forwards;
}

@keyframes check {
    from {
        stroke-dashoffset: 22px;
    }
    to {
        stroke-dashoffset: 0;
    }
}

.date-heading {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: #6c757d;
    margin: 1.5rem 0 0.5rem;
    padding-bottom: 0.5rem;
    align-items: center;
}

.today-label {
    font-size: 0.75rem;
    font-weight: bold;
    background-color: #007bff;
    color: #ffffff;
    padding: 0.2rem;
    border-radius: 0.25rem;
    margin-left: auto;
}

/* APPROVE (Subtle Green) */
.appointment-actions .approve-button {
    background-color: #E8F5E9;
    color: #2E7D32;
    border: 1px solid #2E7D32;
    font-size: 0.85rem;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem; /* space between icon & text */
    cursor: pointer;
    transition: background-color 0.2s;
}

.appointment-actions .approve-button:hover {
    background-color: #d7edd9; /* slightly darker on hover */
}

/* Force the checkmark icon inside the approve button to be green */
.approve-button .icon-check {
    stroke: #2E7D32 !important;
    fill: none !important;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* DECLINE (Subtle Red) */
.appointment-actions .decline-button {
    background-color: #FFEBEE; /* same subtle red as “canceled” status */
    color: #C62828;
    border: 1px solid #C62828;
    font-size: 0.85rem;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.appointment-actions .decline-button:hover {
    background-color: #fbdadd; /* slightly darker on hover */
}

/* SUGGEST A NEW TIME (Subtle Purple) */
.appointment-actions .suggest-button {
    background-color: #F3E5F5; /* same subtle lavender as “approved” status */
    color: #6A1B9A;
    border: 1px solid #6A1B9A;
    font-size: 0.85rem;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.appointment-actions .suggest-button:hover {
}

/* Let the SVG icon pick up the text color properly */
.appointment-actions button svg {
    width: 1em;
    height: 1em;
    stroke: currentColor; /* matches button text color */
    fill: none;
    vertical-align: middle;
}

/* Edit button styling */
.appointment-actions .edit-button {
    background-color: transparent;
    border: none;
    margin-left: auto; /* pushes it to the far right */
    padding: 4px; /* extra clickable area */
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.appointment-actions .edit-button:hover {
}

/* Icon styling for the edit button */
.appointment-actions .icon-edit {
    width: 1.25em;
    height: 1.25em;
    stroke: currentColor;
    fill: transparent;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

details > summary {
    font-size: 1.125rem; /* h5 size */
    font-weight: 600;
}

.full-width {
    margin-top: 0.75rem;
}

/* Optional: Stretch the textarea full width */
.full-width textarea {
    width: 100%;
}

.color-circle {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.form-group {
    display: flex;
    flex-direction: column;
    min-width: 250px;
    flex: 1;
}

.pagination {
    justify-content: center;
    display: flex;

    .step-links {
        display: flex;
        justify-content: space-between;
        width: 50%;
        min-width: 250px;
        max-width: 400px;
    }
}

.notfound {
    padding: 4em;
    opacity: 60%;

    h1 {
        text-align: center;
    }
}