/* =========================================================================
 * Pimbury Dental — colour palette (matches the Symfony legacy theme)
 * ========================================================================= */
:root {
    /* Brand */
    --pimbury-navy:        #27323e;   /* dark chart-card background, headers */
    --pimbury-navy-deep:   #1f2934;
    --pimbury-blue:        #367cc3;   /* primary interactive (buttons, links, badges) */
    --pimbury-blue-dark:   #23588c;   /* hover state for primary */
    --pimbury-blue-light:  #80b7d4;
    --pimbury-blue-soft:   #92bed9;

    /* Status colours */
    --pimbury-green:       #5acb09;   /* paid / success */
    --pimbury-green-dark:  #468c0a;
    --pimbury-red:         #b41c1c;   /* unpaid / error */

    /* Greyscale (cool greys to match Symfony) */
    --pimbury-grey-900:    #27323e;
    --pimbury-grey-700:    #58595c;
    --pimbury-grey-500:    #838383;
    --pimbury-grey-300:    #adb6c1;
    --pimbury-grey-200:    #dce3e8;
    --pimbury-grey-100:    #ecedef;
    --pimbury-grey-50:     #f6f7f9;
}

/* =========================================================================
 * Bootstrap primary overrides — make .btn-primary, .text-primary, .bg-primary
 * etc. use the Pimbury blue instead of Bootstrap's default.
 * ========================================================================= */
.btn-primary {
    background-color: var(--pimbury-blue);
    border-color: var(--pimbury-blue);
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--pimbury-blue-dark) !important;
    border-color: var(--pimbury-blue-dark) !important;
}
.btn-outline-primary {
    color: var(--pimbury-blue);
    border-color: var(--pimbury-blue);
}
.btn-outline-primary:hover {
    background-color: var(--pimbury-blue);
    border-color: var(--pimbury-blue);
}
.text-primary { color: var(--pimbury-blue) !important; }
.bg-primary   { background-color: var(--pimbury-blue) !important; }
.link-primary,
a { color: var(--pimbury-blue); }
a:hover { color: var(--pimbury-blue-dark); }

/* =========================================================================
 * Flash messages
 * ========================================================================= */
#flash-messages {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
}

/* =========================================================================
 * Home / account-setup hub tiles
 * ========================================================================= */
.setup-tile {
    background: linear-gradient(145deg, var(--pimbury-blue), var(--pimbury-blue-dark));
    border-radius: 16px;
    padding: 28px 20px;
    text-align: center;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(39, 50, 62, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.setup-tile i { font-size: 32px; }
.setup-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 26px rgba(39, 50, 62, 0.25);
    background: linear-gradient(145deg, var(--pimbury-blue-dark), var(--pimbury-navy));
    color: #fff;
}

.editor { height: 250px; }

/* =========================================================================
 * Chart archive — chart cards. Matches the Symfony legacy theme:
 * dark navy card, white text, blue circular badges for chart-number
 * and status icons (uploaded / sent), light-cyan horse name, white
 * price, grey/green status pills.
 * ========================================================================= */
.chart-card {
    background: #3b4756;            /* slightly lighter than --pimbury-navy so the page bg shows through */
    color: #fff;
    border-radius: 8px;
    padding: 1rem 1rem 0.75rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    min-height: 170px;
    position: relative;
    display: flex;
    flex-direction: column;
}
.chart-card:hover {
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
    transform: translateY(-2px);
}

/* Chart-number — plain text in the normal content flow (matches
   Symfony's .chart-id), not an absolutely-positioned pill. A pill wide
   enough for longer numbers (e.g. "#2018002") was overlapping the
   status-icon cluster in the top-right corner on narrow cards. */
.chart-number {
    display: block;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.2;
}

/* Top-right cluster: status icon badges + selection checkbox */
.chart-top-right {
    position: absolute;
    top: 0.55rem;
    right: 0.65rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    z-index: 2;
}
/* Status icons (uploaded / sent) — render the legacy Symfony PNGs at
   their native colour so the visual matches the original theme exactly. */
.chart-symbol {
    width: 22px;
    height: 22px;
    display: inline-block;
    vertical-align: middle;
}

.chart-check {
    cursor: pointer;
    width: 16px;
    height: 16px;
    accent-color: var(--pimbury-blue);
    margin-left: 0.15rem;
}

/* Body link — kill underline, inherit white */
.chart-link {
    color: inherit;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    flex: 1;
    margin-top: 2rem;          /* clear the absolutely-positioned icon row */
}
.chart-link:hover { color: inherit; text-decoration: none; }

.chart-content   { flex: 1; }
.chart-date      { color: rgba(255, 255, 255, 0.55); font-size: 0.75rem; }
.chart-client    {
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    margin: 0.5rem 0 0.15rem;
}
.chart-horse     {
    color: var(--pimbury-blue-light);
    font-size: 0.85rem;
    display: block;
}

.chart-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.6rem;
    margin-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.chart-price {
    font-size: 0.95rem;
    color: #fff;
    font-weight: 600;
}

/* Status pills — colours mirror the Symfony chart-card design:
   Unpaid  → solid slate-grey pill (subtle, "no action")
   Paid    → solid Pimbury-green pill with white text + ✓ prefix
   Both fully opaque so the contrast against the dark navy card matches
   the legacy look. */
.status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    display: inline-block;
    line-height: 1.3;
    border: 0;
}
.status.paid {
    background-color: var(--pimbury-green);
    color: #fff;
}
.status.unpaid {
    background-color: #8a96a3;
    color: #fff;
}

/* =========================================================================
 * Filter section — UNPAID / PAID toggle pills.
 * Replaces the plain Bootstrap form-check checkboxes with coloured pill
 * buttons matching the Symfony filter design.
 * ========================================================================= */
.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1.1rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    color: #fff;
    cursor: pointer;
    user-select: none;
    margin-bottom: 0;
    transition: filter 0.15s ease, opacity 0.15s ease;
}
.filter-pill input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
    width: 14px;
    height: 14px;
    accent-color: #fff;
}
.filter-pill-unpaid { background-color: var(--pimbury-blue); }
.filter-pill-paid   { background-color: var(--pimbury-green); }

/* Unchecked state — slightly dimmed so the user sees the "active" pill */
.filter-pill:has(input:not(:checked)) { opacity: 0.55; }
.filter-pill:hover { filter: brightness(1.05); }

/* Payment submenu (hover dropdown above the chart card) */
.paid-submenu {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 -4px 12px rgba(39, 50, 62, 0.20);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.25s ease;
    z-index: 1000;
    margin-bottom: 0.5rem;
}
.chart-card:hover .paid-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.paid-submenu-content { padding: 0.5rem 0; }

.switch-paid {
    color: var(--pimbury-grey-700);
    transition: background-color 0.15s, color 0.15s;
}
.switch-paid:hover {
    background-color: var(--pimbury-grey-100);
    color: var(--pimbury-blue);
}

/* =========================================================================
 * Form elements — pick up the Pimbury palette on focus
 * ========================================================================= */
.form-control:focus,
.form-select:focus {
    border-color: var(--pimbury-blue);
    box-shadow: 0 0 0 0.2rem rgba(54, 124, 195, 0.20);
}
.form-check-input:checked {
    background-color: var(--pimbury-blue);
    border-color: var(--pimbury-blue);
}

/* =========================================================================
 * Toast / flash colours (uses Bootstrap .alert classes, matches palette)
 * ========================================================================= */
.alert-success { background-color: #e6f5d5; border-color: var(--pimbury-green); color: var(--pimbury-green-dark); }
.alert-danger,
.alert-error   { background-color: #f5dede; border-color: var(--pimbury-red);   color: var(--pimbury-red); }
.alert-warning { background-color: #fff4d6; border-color: #d4a000;              color: #735300; }
.alert-info    { background-color: #dbeaf6; border-color: var(--pimbury-blue);  color: var(--pimbury-blue-dark); }
