/* Colour scheme */
:root {
    --yale-blue: #033F63;
    --stormy-teal: #28666E;
    --muted-teal: #7C9885;
    --dry-sage: #B5B682;
    --soft-peach: #FEDC97;
    --peach-tint: #FFEFCB; /* lighter Soft Peach for highlight panels */
    --cream: #FFF8EA;      /* very light Soft Peach for page backgrounds */
    --white: #ffffff;
}

body {
    background: var(--cream);
    color: var(--yale-blue);
    font-family: Georgia, "Times New Roman", serif;
}

/* Homepage only: Yale Blue band behind the top part of the photos */
.home-band {
    background-image: linear-gradient(var(--yale-blue), var(--yale-blue));
    background-size: 100% 170px;
    background-repeat: no-repeat;
    padding-top: 1.5rem;
}

/* ---------- Navbar (fixed to the top on every page) ---------- */

/* ".navbar.site-nav" so these colours win over Bootstrap's own dark navbar colours */
.navbar.site-nav {
    background: var(--yale-blue);
    border-bottom: 4px solid var(--soft-peach);
    padding: 0.6rem 0;
    --bs-navbar-color: var(--cream);
    --bs-navbar-hover-color: var(--soft-peach);
    --bs-navbar-active-color: var(--soft-peach);
    --bs-navbar-brand-color: var(--soft-peach);
    --bs-navbar-brand-hover-color: var(--white);
    --bs-navbar-toggler-border-color: rgba(254, 220, 151, 0.6);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-link {
    font-weight: 600;
}

/* Underline the page you're on */
.nav-link.active {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.4rem;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(254, 220, 151, 0.4);
}

/* ---------- Headings and text ---------- */

h1,
h2,
h3 {
    color: var(--yale-blue);
    font-weight: 700;
}

/* Section headings with a short Dry Sage underline */
h4 {
    display: inline-block;
    color: var(--stormy-teal);
    border-bottom: 3px solid var(--dry-sage);
    padding-bottom: 0.25rem;
}

.eyebrow,
.product-tag {
    color: var(--stormy-teal);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.btn-primary {
    background: var(--stormy-teal);
    border-color: var(--stormy-teal);
    border-radius: 999px;
    padding: 0.7rem 1.4rem;
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--yale-blue);
    border-color: var(--yale-blue);
}

.btn-light {
    color: var(--yale-blue);
    font-weight: 700;
}

.text-link {
    color: var(--stormy-teal);
    font-weight: 700;
    text-decoration: none;
}

.text-link:hover {
    color: var(--yale-blue);
    text-decoration: underline;
}

/* ---------- Homepage ---------- */

.market-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

/* Important Dates list: white cards with a Stormy Teal edge */
.list-group {
    --bs-list-group-bg: var(--white);
    --bs-list-group-color: var(--yale-blue);
    --bs-list-group-border-color: var(--muted-teal);
}

.list-group-item {
    border-left: 5px solid var(--stormy-teal);
}

.map-frame {
    display: block;
    border: 0;
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(3, 63, 99, 0.15);
}

.hero-section {
    overflow: hidden;
    padding: 5.5rem 0;
}

.hero-copy,
.section-heading > p:last-child {
    color: var(--stormy-teal);
    font-size: 1.15rem;
    line-height: 1.7;
    max-width: 35rem;
}

.hero-image {
    border: 12px solid var(--white);
    border-radius: 48% 48% 12px 12px;
    box-shadow: 0 1.25rem 2.5rem rgba(3, 63, 99, 0.18);
    height: 430px;
    object-fit: cover;
    width: 100%;
}

/* ---------- Stall pages ---------- */

/* Yale Blue intro block with the stall's logo, same blue as the homepage band */
.page-intro {
    background: var(--yale-blue);
    color: var(--cream);
    padding: 3.5rem 0;
}

.page-intro h1 {
    color: var(--white);
    font-size: clamp(2.2rem, 4vw, 3.4rem);
    line-height: 1.1;
}

.page-intro .eyebrow {
    color: var(--soft-peach);
}

.page-intro > .container > p:last-child {
    font-size: 1.15rem;
    line-height: 1.7;
    margin: 1.25rem auto 0;
    max-width: 35rem;
}

/* Each stall's own logo sits on the shared blue, framed in cream */
.stall-logo {
    border: 4px solid var(--cream);
    border-radius: 1rem;
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.25);
    height: auto;
    margin-bottom: 1.75rem;
    max-width: 80%;
    width: 300px;
}

.section-padding {
    padding: 4rem 0;
}

.section-heading {
    margin: 0 auto;
    max-width: 40rem;
}

.section-heading h2,
.order-banner h2 {
    font-size: clamp(2.2rem, 4vw, 3.4rem);
}

.feature-card,
.product-card {
    background: var(--white);
    border: 1px solid rgba(124, 152, 133, 0.45);
    border-radius: 1rem;
    height: 100%;
    overflow: hidden;
    box-shadow: 0 0.6rem 1.4rem rgba(3, 63, 99, 0.08);
}

.feature-card img,
.product-card > img {
    height: 220px;
    object-fit: cover;
    width: 100%;
}

.feature-card-body,
.product-card-body {
    padding: 1.5rem;
}

.feature-card h3,
.product-card h2 {
    font-size: 1.5rem;
}

.feature-card p,
.product-card p {
    line-height: 1.6;
}

.product-card-body strong {
    color: var(--stormy-teal);
    font-size: 1.1rem;
}

.feature-card-highlight {
    align-items: center;
    background: var(--peach-tint);
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.feature-icon {
    color: var(--stormy-teal);
    font-size: 4rem;
    line-height: 1;
    padding-top: 1.5rem;
}

.product-card-accent {
    background: var(--peach-tint);
}

.product-card-art {
    color: var(--stormy-teal);
    font-size: 7rem;
    line-height: 1;
    padding: 2rem 0 0;
    text-align: center;
}

.order-banner {
    background: var(--yale-blue);
    color: var(--white);
    padding: 5rem 0;
}

.order-banner h2,
.order-banner .eyebrow {
    color: var(--white);
}

.order-banner p:not(.eyebrow) {
    color: var(--cream);
    font-size: 1.1rem;
}

/* ---------- Footer ---------- */

.site-footer {
    background: var(--stormy-teal);
    color: var(--cream);
    padding: 1.5rem 0;
}

.site-footer a {
    color: var(--soft-peach);
}

/* ---------- Small screens ---------- */

@media (max-width: 991.98px) {
    .navbar-nav {
        padding-top: 1rem;
    }

    .hero-section {
        padding: 3.5rem 0;
    }
}

/* =====================================================================
   Added for logins, dashboards, events and reviews
   ===================================================================== */

/* ---------- Navbar extras ---------- */

.navbar-brand {
    line-height: 1.15;
}

/* "Welcome, Declan." under the logo when logged in */
.nav-welcome {
    display: block;
    color: var(--cream);
    font-size: 0.85rem;
    font-weight: 400;
}

/* Dashboard / Log In button on the right */
.nav-button {
    border: 2px solid var(--soft-peach);
    border-radius: 999px;
    color: var(--soft-peach);
    font-weight: 700;
    padding: 0.35rem 1.1rem;
}

.nav-button:hover,
.nav-button.active {
    background: var(--soft-peach);
    border-color: var(--soft-peach);
    color: var(--yale-blue);
}

.nav-logout {
    font-size: 0.9rem;
    font-weight: 400;
}

/* ---------- Stars and reviews ---------- */

.stars {
    color: #C98A0B;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.reviews-band {
    background: var(--peach-tint);
    padding: 3rem 0 3.5rem;
}

.review-card {
    background: var(--white);
    border: 1px solid rgba(124, 152, 133, 0.45);
    border-radius: 1rem;
    box-shadow: 0 0.6rem 1.4rem rgba(3, 63, 99, 0.08);
    padding: 1.25rem 1.4rem;
}

.review-card a {
    color: var(--stormy-teal);
}

/* arrows sit either side of the cards, like the sketch */
.review-carousel {
    padding: 0 3.25rem;
}

.review-carousel .carousel-control-prev,
.review-carousel .carousel-control-next {
    opacity: 1;
    width: 2.75rem;
}

.carousel-arrow {
    align-items: center;
    background: var(--yale-blue);
    border-radius: 50%;
    color: var(--soft-peach);
    display: flex;
    font-size: 1.2rem;
    height: 2.5rem;
    justify-content: center;
    width: 2.5rem;
}

/* star picker on the review form: the radio buttons are hidden and the stars are their labels */
.star-picker {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 0.15rem;
}

.star-picker input {
    height: 1px;
    opacity: 0;
    position: absolute;
    width: 1px;
}

.star-picker label {
    color: #CFC7B5;
    cursor: pointer;
    font-size: 2rem;
    line-height: 1;
}

.star-picker input:checked ~ label,
.star-picker label:hover,
.star-picker label:hover ~ label {
    color: #C98A0B;
}

.star-picker input:focus-visible + label {
    outline: 2px solid var(--stormy-teal);
    outline-offset: 2px;
}

.form-panel {
    background: var(--white);
    border: 1px solid rgba(124, 152, 133, 0.45);
    border-radius: 1rem;
    padding: 1.5rem;
}

/* ---------- Artisans list ---------- */

.artisan-card {
    background: var(--white);
    border: 1px solid rgba(124, 152, 133, 0.45);
    border-radius: 1rem;
    box-shadow: 0 0.6rem 1.4rem rgba(3, 63, 99, 0.08);
    color: var(--yale-blue);
    display: block;
    height: 100%;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
}

.artisan-card:hover {
    box-shadow: 0 1rem 2rem rgba(3, 63, 99, 0.16);
    color: var(--yale-blue);
    transform: translateY(-3px);
}

.artisan-card-logo {
    align-items: center;
    display: flex;
    height: 180px;
    justify-content: center;
    padding: 1.25rem;
}

.artisan-card-logo img {
    border-radius: 0.75rem;
    max-height: 100%;
    max-width: 75%;
}

.artisan-card-body {
    padding: 1.25rem 1.5rem;
}

.artisan-card-body h2 {
    font-size: 1.4rem;
    margin-bottom: 0.25rem;
}

/* ---------- Events ---------- */

.event-card {
    background: var(--white);
    border: 1px solid rgba(124, 152, 133, 0.45);
    border-radius: 1rem;
    box-shadow: 0 0.6rem 1.4rem rgba(3, 63, 99, 0.08);
    display: flex;
    height: 100%;
    overflow: hidden;
}

.event-date {
    align-items: center;
    background: var(--yale-blue);
    color: var(--soft-peach);
    display: flex;
    flex: 0 0 5.5rem;
    flex-direction: column;
    justify-content: center;
    padding: 1rem 0.5rem;
    text-align: center;
}

.event-day {
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1;
}

.event-month {
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.event-card-body {
    flex: 1;
    padding: 1.25rem 1.4rem;
}

.event-card-body h2 {
    font-size: 1.4rem;
}

.event-card-body a {
    color: var(--stormy-teal);
}

.progress {
    background: rgba(124, 152, 133, 0.25);
    height: 0.6rem;
}

.progress-bar {
    background: var(--stormy-teal);
}

/* ---------- Log in and sign up ---------- */

.auth-card {
    background: var(--white);
    border: 1px solid rgba(124, 152, 133, 0.45);
    border-radius: 1rem;
    box-shadow: 0 0.6rem 1.4rem rgba(3, 63, 99, 0.08);
    margin: 0 auto;
    max-width: 26rem;
    padding: 2rem;
}

/* the artisan sign-up has more boxes, so it gets a bit more room */
.auth-card-wide {
    max-width: 34rem;
}

/* Customer / Artisan / Organiser tabs on the log in page */
.auth-tabs {
    background: var(--cream);
    border: 1px solid rgba(124, 152, 133, 0.45);
    border-radius: 999px;
    display: flex;
    padding: 0.25rem;
}

.auth-tabs .nav-item {
    flex: 1;
}

.auth-tabs .nav-link {
    border-radius: 999px;
    color: var(--stormy-teal);
    font-size: 0.95rem;
    padding: 0.45rem 0.5rem;
    text-align: center;
}

.auth-tabs .nav-link:hover {
    color: var(--yale-blue);
}

.auth-tabs .nav-link.active {
    background: var(--yale-blue);
    color: var(--soft-peach);
    text-decoration: none; /* the navbar underlines active links, but the pill shows it already */
}

/* small headings inside the artisan sign-up form */
.form-section {
    border-bottom: 2px solid var(--dry-sage);
    color: var(--stormy-teal);
    font-size: 1.05rem;
    margin-bottom: 1rem;
    padding-bottom: 0.35rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--stormy-teal);
    box-shadow: 0 0 0 0.2rem rgba(40, 102, 110, 0.25);
}

/* ---------- Dashboard: Metro-style tiles, but a bit more modern ---------- */

.dash {
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    padding: 2.5rem 0 4rem;
}

.dash h1,
.dash h2 {
    font-family: Georgia, "Times New Roman", serif;
}

.dash-heading {
    margin-bottom: 1.5rem;
}

.dash-heading h1 {
    font-size: 2.4rem;
    margin-bottom: 0.25rem;
}

.dash-heading p {
    color: var(--stormy-teal);
    margin-bottom: 0;
}

/* links in the line under the heading (not the buttons next to it) */
.dash-heading p a {
    color: var(--stormy-teal);
    font-weight: 600;
}

.dash-subheading {
    font-size: 1.6rem;
    margin: 2.5rem 0 1rem;
}

.back-link {
    color: var(--stormy-teal);
    display: inline-block;
    font-weight: 600;
    margin-bottom: 0.75rem;
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

/* 4 tiles across. The big one takes 2 across and 2 down. */
.tile-grid {
    display: grid;
    gap: 0.9rem;
    grid-auto-rows: 9.5rem;
    grid-template-columns: repeat(4, 1fr);
}

.tile {
    border-radius: 0.9rem;
    color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: 1rem 1.15rem;
    position: relative;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
}

.tile:hover,
.tile:focus-visible {
    box-shadow: 0 0.9rem 1.8rem rgba(3, 63, 99, 0.25);
    color: var(--white);
    filter: brightness(1.06);
    transform: translateY(-3px);
}

.tile-big {
    grid-column: span 2;
    grid-row: span 2;
}

.tile-top {
    align-items: flex-start;
    display: flex;
    justify-content: space-between;
}

.tile-icon {
    font-size: 1.6rem;
    opacity: 0.9;
}

/* thin, big numbers like the old Windows Phone tiles */
.tile-number {
    font-size: 3rem;
    font-weight: 300;
    line-height: 1;
}

.tile-big .tile-number {
    font-size: 4.5rem;
}

.tile-label {
    font-size: 1.05rem;
    font-weight: 600;
}

.tile-big .tile-label {
    font-size: 1.35rem;
}

.tile-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tile-list li {
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.45rem 0;
}

.tile-blue { background: var(--yale-blue); }
.tile-teal { background: var(--stormy-teal); }
.tile-sage { background: #5E7D68; }   /* Muted Teal, darkened so white text is readable */
.tile-olive { background: #6F7040; }  /* Dry Sage, darkened for the same reason */

.tile-peach,
.tile-peach:hover,
.tile-peach:focus-visible {
    background: var(--soft-peach);
    color: var(--yale-blue);
}

/* bottom row of short tiles: account, log out, edit stall page */
.tile-grid-strip {
    grid-auto-rows: 5.25rem;
    margin-top: 0.9rem;
}

.tile-strip {
    align-items: center;
    flex-direction: row;
    gap: 0.9rem;
    justify-content: flex-start;
}

.tile-strip .tile-label {
    display: block;
}

.tile-sub {
    display: block;
    font-size: 0.85rem;
    opacity: 0.85;
}

.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }

.tile-light,
.tile-light:hover,
.tile-light:focus-visible {
    background: #E9E2D2;
    color: var(--yale-blue);
}

/* stall logos on their own colour, used on the manage artisans page and the edit form */
.logo-thumb,
.logo-preview {
    align-items: center;
    border-radius: 0.6rem;
    display: flex;
    justify-content: center;
}

.logo-thumb {
    height: 56px;
    padding: 0.4rem;
    width: 90px;
}

.logo-thumb img {
    max-height: 100%;
    max-width: 100%;
}

.logo-preview {
    height: 110px;
    padding: 0.75rem;
}

.logo-preview img {
    max-height: 100%;
    max-width: 60%;
}

/* role labels on the users page */
.role-badge {
    border-radius: 999px;
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.15rem 0.6rem;
}

.role-organiser { background: var(--yale-blue); color: var(--soft-peach); }
.role-artisan { background: var(--stormy-teal); color: var(--white); }
.role-customer { background: var(--peach-tint); color: var(--yale-blue); }

/* white panels used across the dashboard pages */
.studio-card {
    background: var(--white);
    border: 1px solid rgba(124, 152, 133, 0.35);
    border-radius: 0.9rem;
    box-shadow: 0 0.6rem 1.4rem rgba(3, 63, 99, 0.06);
    overflow: hidden;
}

/* Earnings, YouTube Studio style: metric tabs across the top, chart underneath */
.studio-tabs {
    border-bottom: 1px solid rgba(124, 152, 133, 0.35);
    display: flex;
}

.studio-tab {
    background: none;
    border: 0;
    border-top: 4px solid transparent;
    color: var(--yale-blue);
    flex: 1;
    padding: 1rem 1.25rem;
    text-align: left;
}

.studio-tab + .studio-tab {
    border-left: 1px solid rgba(124, 152, 133, 0.35);
}

.studio-tab span {
    display: block;
    font-size: 0.9rem;
    opacity: 0.8;
}

.studio-tab strong {
    display: block;
    font-size: 1.8rem;
    font-weight: 400;
}

.studio-tab:hover {
    background: rgba(254, 220, 151, 0.25);
}

.studio-tab.active {
    background: var(--peach-tint);
    border-top-color: var(--stormy-teal);
}

.studio-chart {
    height: 320px;
    padding: 1.25rem;
}

.studio-note {
    font-size: 0.9rem;
    margin: 0;
    padding: 0 1.25rem 1.25rem;
}

/* tables on the dashboard pages */
.dash-table th {
    color: var(--stormy-teal);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.dash-table th,
.dash-table td {
    padding: 0.85rem 1.25rem;
}

.table-thumb {
    border-radius: 0.5rem;
    height: 56px;
    object-fit: cover;
    width: 72px;
}

.form-narrow {
    max-width: 44rem;
}

.booking-list li {
    align-items: center;
    border-top: 1px solid rgba(124, 152, 133, 0.3);
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
}

/* inbox: unread messages are bold with a dot */
.inbox-row {
    border-bottom: 1px solid rgba(124, 152, 133, 0.3);
    color: var(--yale-blue);
    display: flex;
    gap: 0.75rem;
    padding: 0.9rem 1.25rem;
    text-decoration: none;
}

.inbox-row:hover {
    background: rgba(254, 220, 151, 0.25);
    color: var(--yale-blue);
}

.inbox-row.current {
    background: var(--peach-tint);
}

.inbox-dot {
    border-radius: 50%;
    flex: 0 0 0.6rem;
    height: 0.6rem;
    margin-top: 0.45rem;
}

.inbox-row.unread .inbox-dot {
    background: var(--stormy-teal);
}

.inbox-row.unread .inbox-subject {
    font-weight: 700;
}

.inbox-text,
.inbox-subject,
.inbox-meta {
    display: block;
}

.inbox-meta {
    font-size: 0.85rem;
    opacity: 0.75;
}

/* ---------- Dashboard on smaller screens ---------- */

@media (max-width: 991.98px) {
    .tile-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* only 2 columns here, so wide tiles take the whole row */
    .span-2,
    .span-3 {
        grid-column: 1 / -1;
    }
}

@media (max-width: 575.98px) {
    .tile-grid {
        grid-auto-rows: 8rem;
    }

    .tile-number {
        font-size: 2.4rem;
    }

    .studio-tabs {
        flex-direction: column;
    }

    .studio-tab + .studio-tab {
        border-left: 0;
        border-top: 1px solid rgba(124, 152, 133, 0.35);
    }

    .review-carousel {
        padding: 0 2.75rem;
    }
}
