@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=Montserrat:wght@400;500;600;700&display=swap');

/* --------------------------------------------------------------------------
   AI-assisted weekly menu
   -------------------------------------------------------------------------- */

.plan-week-control {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-family: Manrope, Arial, sans-serif;
}

.plan-week-trigger {
    min-height: 40px;
    padding: 9px 15px;
    border: 0;
    border-radius: 999px;
    background: #061936;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: Manrope, Arial, sans-serif;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 5px 14px rgba(6, 25, 54, 0.15);
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.plan-week-trigger:hover,
.plan-week-trigger[aria-expanded='true'] {
    background: #163f64;
    box-shadow: 0 7px 18px rgba(6, 25, 54, 0.2);
    transform: translateY(-1px);
}

.plan-week-trigger:focus-visible,
.plan-week-panel button:focus-visible,
.plan-week-panel input:focus-visible,
.plan-week-panel textarea:focus-visible,
.plan-week-review-bar button:focus-visible,
.plan-week-event-action:focus-visible {
    outline: 3px solid rgba(91, 176, 189, 0.42);
    outline-offset: 2px;
}

.plan-week-trigger img {
    width: 16px;
    height: 16px;
    filter: brightness(0) invert(1);
}

.custom-calendar-header {
    position: relative;
}

.plan-week-panel {
    position: absolute;
    z-index: 120;
    top: calc(100% + 10px);
    right: 28px;
    width: min(780px, calc(100vw - 48px));
    max-height: min(760px, calc(100vh - 120px));
    box-sizing: border-box;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 16px 24px 20px;
    border: 1px solid #dfe7ea;
    border-radius: 18px;
    background: #ffffff;
    color: #061936;
    box-shadow: 0 22px 60px rgba(6, 25, 54, 0.2);
    text-align: left;
}

.plan-week-panel[hidden] {
    display: none !important;
}

.plan-week-section-heading,
.plan-week-footer,
.plan-week-slider-label,
.plan-week-slider-range {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.plan-week-panel h3,
.plan-week-panel p {
    margin: 0;
}

.plan-week-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.plan-week-drawer-header h2 {
    margin: 0;
    color: #061936;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
}

.plan-week-panel h3 {
    color: #061936;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
}

.plan-week-section-heading p,
.plan-week-footer p {
    margin-top: 5px;
    color: #66727b;
    font-size: 12px;
    line-height: 1.5;
}

.plan-week-close {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    padding: 9px;
    border: 0;
    border-radius: 50%;
    background: #f2f5f6;
    cursor: pointer;
}

.plan-week-close:hover {
    background: #e7edef;
}

.plan-week-close img {
    width: 100%;
    height: 100%;
}

.plan-week-close--floating {
    position: absolute;
    z-index: 1;
    top: 8px;
    right: 12px;
}

.plan-week-form {
    margin-top: 10px;
}

.plan-week-section {
    margin-top: 16px;
    padding: 18px;
    border: 0;
    border-radius: 14px;
    background: #ffffff;
}

.plan-week-section-heading {
    align-items: flex-start;
}

.plan-week-panel-target-summary {
    margin-top: 4px;
    padding: 11px 13px;
    border: 1px solid #deecef;
    border-radius: 10px;
    background: #f9fcfd;
    transition: background 180ms ease;
}

.plan-week-panel-target-summary--active-day {
    background: linear-gradient(135deg, #fffdf8 0%, #fff5e7 100%);
}

.plan-week-panel-target-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.plan-week-panel-target-title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.plan-week-panel-target-edit {
    min-height: 28px;
    padding: 4px 8px;
    border: 1px solid #c3dde1;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #ffffff;
    color: #16788a;
    font-size: 10px;
    cursor: pointer;
}

.plan-week-panel-target-edit:hover,
.plan-week-panel-target-edit:focus-visible {
    border-color: #5bb0bd;
    background: #e4f5f7;
    outline: none;
}

.plan-week-panel-target-edit svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.plan-week-day-schedule {
    margin: 10px 0 0;
    padding: 9px 1px 1px;
    border-top: 1px solid rgba(117, 128, 137, 0.16);
}

.plan-week-day-schedule-heading {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.plan-week-day-schedule-heading h3 {
    margin: 0;
    color: #061936;
    font-size: 12px;
}

.plan-week-day-schedule-heading span {
    color: #758089;
    font-size: 12px;
    font-weight: 700;
}

.plan-week-day-selector {
    position: relative;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
    margin-top: 8px;
    padding: 0;
}

.plan-week-day-selector::before {
    content: '';
    position: absolute;
    z-index: 0;
    top: 23px;
    right: 5%;
    left: 5%;
    height: 2px;
    background: linear-gradient(90deg, #bcdde1 0%, #d5e5e4 50%, #efc98f 100%);
}

.plan-week-day-selector-item {
    position: relative;
    z-index: 1;
    min-width: 0;
    min-height: 48px;
    padding: 6px 7px;
    border: 1px solid #d3e5e8;
    border-radius: 9px;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 6px;
    color: #61717d;
    background: rgba(255, 255, 255, 0.76);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.plan-week-day-selector-marker {
    grid-row: 1 / 3;
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 7px;
    display: grid;
    place-items: center;
    color: #3d9dab;
    background: #e7f5f7;
    box-shadow: none;
    transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.plan-week-day-selector-marker > span {
    width: 12px;
    height: 12px;
    background: currentColor;
    -webkit-mask: url('/images/planner/person-walking-solid-full.svg') center / contain no-repeat;
    mask: url('/images/planner/person-walking-solid-full.svg') center / contain no-repeat;
    transform-origin: 50% 100%;
}

.plan-week-day-selector-name {
    font-size: 10px;
    font-weight: 800;
    line-height: 1.1;
}

.plan-week-day-selector-type {
    font-size: 8px;
    font-weight: 700;
    line-height: 1.1;
    opacity: 0.78;
}

.plan-week-day-selector-item--active-day {
    border-color: #efd1a4;
    color: #985307;
    background: rgba(255, 247, 235, 0.9);
}

.plan-week-day-selector-item--active-day .plan-week-day-selector-marker {
    color: #d77e15;
    background: #ffe6bd;
}

.plan-week-day-selector-item--active-day .plan-week-day-selector-marker > span {
    -webkit-mask-image: url('/images/planner/fire.svg');
    mask-image: url('/images/planner/fire.svg');
    animation: plan-week-fire-icon 900ms ease-in-out infinite alternate;
}

@keyframes plan-week-fire-icon {
    0% { opacity: 0.78; transform: translateY(1px) scale(0.92, 1); }
    55% { opacity: 1; transform: translateY(-1px) scale(1.06, 1.12) rotate(2deg); }
    100% { opacity: 0.9; transform: scale(0.96, 1.06) rotate(-2deg); }
}

@media (prefers-reduced-motion: reduce) {
    .plan-week-day-selector-marker > span,
    .plan-week-calendar-day-type-icon,
    .planner-nutrition-day-type-icon {
        animation: none;
    }
}

.plan-week-day-selector-item--selected {
    border-color: #5bb0bd;
    color: #16788a;
    background: #ffffff;
    box-shadow: 0 3px 10px rgba(6, 25, 54, 0.1), 0 0 0 2px rgba(91, 176, 189, 0.16);
}

.plan-week-day-selector-item--selected .plan-week-day-selector-marker {
    color: #ffffff;
    background: #4ba6b3;
    box-shadow: none;
    transform: none;
}

.plan-week-day-selector-item--selected.plan-week-day-selector-item--active-day {
    border-color: #e59a36;
    color: #985307;
    background: #fffaf2;
    box-shadow: 0 3px 10px rgba(126, 72, 8, 0.1), 0 0 0 2px rgba(229, 154, 54, 0.18);
}

.plan-week-day-selector-item--selected.plan-week-day-selector-item--active-day .plan-week-day-selector-marker {
    color: #ffffff;
    background: #e59a36;
    box-shadow: none;
}

.plan-week-day-selector-item:hover,
.plan-week-day-selector-item:focus-visible {
    border-color: currentColor;
    outline: none;
    transform: translateY(-2px);
}

.plan-week-day-selector-item:focus-visible .plan-week-day-selector-marker {
    box-shadow: 0 0 0 3px rgba(61, 157, 171, 0.22);
}

.plan-week-panel-target-summary dl {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px 12px;
    margin: 9px 0 0;
}

.plan-week-panel-target-summary dl > div {
    min-width: 0;
}

.plan-week-panel-target-summary dt {
    color: #758089;
    font-size: 9px;
    font-weight: 700;
}

.plan-week-panel-target-summary dd {
    margin: 2px 0 0;
    color: #061936;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.plan-week-slider {
    display: block;
    margin-top: 16px;
}

.plan-week-slider-label {
    margin-bottom: 8px;
    color: #34424c;
    font-size: 12px;
    font-weight: 600;
}

.plan-week-slider-label output {
    color: #061936;
    font-size: 12px;
    font-weight: 800;
}

.plan-week-macro-slider .plan-week-slider-label {
    gap: 6px;
    white-space: nowrap;
}

.plan-week-macro-slider .plan-week-slider-label > span {
    min-width: 0;
}

.plan-week-macro-slider .plan-week-slider-label output {
    flex: 0 0 auto;
}

.plan-week-slider input[type='range'] {
    width: 100%;
    height: 4px;
    margin: 4px 0;
    border-radius: 999px;
    accent-color: var(--plan-week-target-accent, #5bb0bd);
    cursor: pointer;
}

.plan-week-slider-range {
    margin-top: 5px;
    color: #919ba2;
    font-size: 9px;
}

.plan-week-macro-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.plan-week-micronutrient-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.plan-week-targets-section {
    --plan-week-target-accent: #5bb0bd;
    --plan-week-target-accent-soft: #e4f5f7;
    position: relative;
    overflow: hidden;
    padding-top: 10px;
    padding-bottom: 14px;
    border: 1px solid #deecef;
    background: #ffffff;
    transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.custom-calendar-header > .plan-week-targets-section--planner {
    margin: 8px 0 0 50px;
    padding: 8px 14px 12px;
    overflow: visible;
    color: #061936;
    font-family: Manrope, Arial, sans-serif;
    background: linear-gradient(135deg, #fcfeff 0%, #f5fafc 100%);
    scroll-margin-top: 18px;
    text-align: left;
}

.custom-calendar-header > .plan-week-targets-section--planner.plan-week-targets-section--active-day {
    --plan-week-target-accent: #e59a36;
    --plan-week-target-accent-soft: #fff0d9;
    background: linear-gradient(135deg, #fffdf8 0%, #fff5e7 100%);
}

.plan-week-targets-heading {
    position: relative;
    z-index: 2;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}

.plan-week-targets-heading h3 {
    flex: 0 0 auto;
}

.plan-week-day-type-control {
    min-width: 0;
    display: inline-flex;
    align-items: center;
}

.plan-week-day-type-label {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: #62717b;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    transition: color 160ms ease;
}

.plan-week-day-type-icon {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    background: currentColor;
}

.plan-week-day-type-icon--fire {
    -webkit-mask: url('/images/planner/fire.svg') center / contain no-repeat;
    mask: url('/images/planner/fire.svg') center / contain no-repeat;
}

.plan-week-day-type-icon--walking {
    -webkit-mask: url('/images/planner/person-walking-solid-full.svg') center / contain no-repeat;
    mask: url('/images/planner/person-walking-solid-full.svg') center / contain no-repeat;
}

.plan-week-day-type-label--selected {
    color: #ffffff;
    font-weight: 800;
}

.plan-week-day-type-switch {
    position: relative;
    width: 140px;
    height: 28px;
    margin: 0;
    flex: 0 0 auto;
    cursor: pointer;
}

.plan-week-day-type-switch input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.plan-week-day-type-switch-track {
    position: absolute;
    inset: 0;
    padding: 2px;
    border: 1px solid #9ecbd1;
    border-radius: 999px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    overflow: hidden;
    background: #eaf5f6;
    transition: border-color 160ms ease, background-color 160ms ease;
}

.plan-week-day-type-switch-track::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: calc(50% - 2px);
    height: 22px;
    border-radius: 999px;
    background: #5bb0bd;
    box-shadow: 0 1px 3px rgba(6, 25, 54, 0.18);
    transition: transform 180ms ease, background-color 180ms ease;
}

.plan-week-day-type-switch input:checked + .plan-week-day-type-switch-track {
    border-color: #dc8d2a;
    background: #fff0d9;
}

.plan-week-day-type-switch input:checked + .plan-week-day-type-switch-track::before {
    background: #e59a36;
    transform: translateX(100%);
}

.plan-week-day-type-switch input:focus-visible + .plan-week-day-type-switch-track {
    outline: 3px solid color-mix(in srgb, var(--plan-week-target-accent) 38%, transparent);
    outline-offset: 2px;
}

.plan-week-active-calculate {
    flex: 0 0 auto;
    min-height: 28px;
    padding: 0 10px;
    border: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #985307;
    background: #fff0d9;
    font-family: inherit;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 150ms ease, opacity 150ms ease;
}

.plan-week-active-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.plan-week-active-actions[hidden] {
    display: none !important;
}

.plan-week-active-calculate-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.plan-week-method-trigger {
    min-height: 28px;
    padding: 5px 9px;
    border: 1px solid #d7b77e;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #755019;
    background: #fffaf0;
    font-size: 10px;
    font-weight: 750;
    font-family: inherit;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.plan-week-method-trigger svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
    flex: 0 0 auto;
}

.plan-week-method-trigger:hover,
.plan-week-method-trigger:focus-visible,
.plan-week-method-trigger[aria-expanded='true'] {
    border-color: #d99a32;
    background: #fff0d9;
    outline: none;
}

.plan-week-method-trigger:focus-visible {
    box-shadow: 0 0 0 3px rgba(229, 154, 54, 0.24);
}

.plan-week-method-details {
    position: absolute;
    z-index: 40;
    top: calc(100% + 9px);
    left: 0;
    width: min(480px, calc(100vw - 36px));
    max-height: min(620px, calc(100vh - 110px));
    padding: 16px;
    border: 1px solid #d9e7ea;
    border-radius: 14px;
    overflow-y: auto;
    color: #20313d;
    background: #ffffff;
    box-shadow: 0 16px 42px rgba(6, 25, 54, 0.2);
    text-align: left;
}

.plan-week-method-details[hidden] {
    display: none !important;
}

.plan-week-method-details > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.plan-week-method-details h4,
.plan-week-method-details h5,
.plan-week-method-details p,
.plan-week-method-details ol,
.plan-week-method-details dl {
    margin-top: 0;
}

.plan-week-method-details h4 {
    margin-bottom: 0;
    color: #061936;
    font-size: 16px;
    font-weight: 800;
}

.plan-week-method-kicker {
    display: block;
    margin-bottom: 2px;
    color: #b36f13;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.plan-week-method-close {
    width: 28px;
    height: 28px;
    padding: 6px;
    border: 1px solid #d9e7ea;
    border-radius: 50%;
    color: #52636e;
    background: #f7fbfc;
    cursor: pointer;
}

.plan-week-method-close svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 1.8;
}

.plan-week-method-intro {
    margin-bottom: 12px;
    color: #53646f;
    font-size: 11px;
    line-height: 1.5;
}

.plan-week-method-section {
    margin-top: 10px;
    padding: 10px 11px;
    border-radius: 10px;
    background: #f4f9fa;
}

.plan-week-method-section h5,
.plan-week-method-result h5 {
    margin-bottom: 5px;
    color: #12283b;
    font-size: 11px;
    font-weight: 850;
}

.plan-week-method-section p,
.plan-week-method-section ol {
    margin-bottom: 0;
    color: #425662;
    font-size: 10px;
    line-height: 1.5;
}

.plan-week-method-section ol {
    padding-left: 18px;
}

.plan-week-method-section li + li {
    margin-top: 4px;
}

.plan-week-method-note {
    margin: 10px 0 0;
    padding-left: 9px;
    border-left: 3px solid #5bb0bd;
    color: #435864;
    font-size: 10px;
    line-height: 1.45;
}

.plan-week-method-result {
    margin-top: 12px;
    padding: 11px;
    border: 1px solid #f0d8ad;
    border-radius: 10px;
    background: #fffaf0;
}

.plan-week-method-result dl {
    margin-bottom: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
}

.plan-week-method-result dl > div:last-child {
    grid-column: 1 / -1;
}

.plan-week-method-result dt {
    color: #78858e;
    font-size: 8px;
    font-weight: 750;
}

.plan-week-method-result dd {
    margin: 2px 0 0;
    color: #061936;
    font-size: 11px;
    font-weight: 850;
}

.plan-week-method-details footer {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.plan-week-method-link {
    padding: 6px 9px;
    border: 1px solid #a8d4da;
    border-radius: 7px;
    color: #1e7481;
    background: #f3fbfc;
    font: 750 9px/1.2 inherit;
    cursor: pointer;
}

.plan-week-method-link:hover,
.plan-week-method-link:focus-visible {
    border-color: #5bb0bd;
    background: #e7f6f8;
    outline: none;
}

.plan-week-active-calculate:hover,
.plan-week-active-calculate:focus-visible {
    background: #ffe2b6;
    outline: none;
}

.plan-week-active-calculate:focus-visible {
    box-shadow: 0 0 0 3px rgba(229, 154, 54, 0.28);
}

.plan-week-active-calculate:disabled {
    opacity: 0.58;
    cursor: wait;
}

.plan-week-active-calculate img {
    width: 12px;
    height: 12px;
}

.plan-week-active-calculate-status {
    max-width: 260px;
    color: #61717d;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.3;
    text-align: right;
    white-space: normal;
}

.plan-week-targets-heading > .plan-week-active-calculate-status:not([hidden]) {
    margin-left: auto;
}

.plan-week-targets-heading > .plan-week-active-calculate-status:not([hidden]) + .plan-week-targets-toggle {
    margin-left: 0;
}

.plan-week-targets-section--planner .plan-week-targets-heading > .plan-week-active-calculate-status:not([hidden]) {
    margin-right: 0;
}

.plan-week-active-calculate-status[hidden] {
    display: none !important;
}

.plan-week-active-calculate-status--error {
    color: #b54335;
}

#lifestyle.plan-week-lifestyle--missing,
#lifestyle.plan-week-lifestyle--focused,
#anthropometric.plan-week-dossier-data--focused,
#clientCoords.plan-week-dossier-data--focused {
    animation: plan-week-lifestyle-attention 900ms ease-in-out 2;
    box-shadow: 0 0 0 4px rgba(229, 154, 54, 0.42), 0 8px 24px rgba(6, 25, 54, 0.12);
}

.plan-week-lifestyle-data-message {
    margin: 8px 0 12px;
    padding: 8px 11px;
    border-radius: 8px;
    color: #914f09;
    background: #fff0d9;
    font-size: 12px;
    font-weight: 800;
}

@keyframes plan-week-lifestyle-attention {
    0%, 100% { box-shadow: 0 0 0 4px rgba(229, 154, 54, 0.24), 0 8px 24px rgba(6, 25, 54, 0.08); }
    50% { box-shadow: 0 0 0 7px rgba(229, 154, 54, 0.48), 0 8px 24px rgba(6, 25, 54, 0.14); }
}

.plan-week-targets-toggle {
    margin-left: auto;
    width: 27px;
    height: 27px;
    padding: 5px;
    border: 1px solid #cfe3e6;
    border-radius: 50%;
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    background: #f3fafb;
    color: #16788a;
    cursor: pointer;
    transition: border-color 150ms ease, background-color 150ms ease;
}

.plan-week-targets-toggle:hover,
.plan-week-targets-toggle:focus-visible {
    border-color: var(--plan-week-target-accent, #5bb0bd);
    background: var(--plan-week-target-accent-soft, #e4f5f7);
    outline: none;
}

.plan-week-targets-toggle svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    transition: transform 180ms ease;
}

.plan-week-targets-section--collapsed .plan-week-targets-toggle svg {
    transform: rotate(-90deg);
}

.plan-week-targets-section--collapsed {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}

.plan-week-targets-sticky {
    position: fixed;
    z-index: 119;
    box-sizing: border-box;
    min-height: 58px;
    padding: 8px 12px;
    border: 1px solid #cfe3e6;
    border-radius: 0 0 12px 12px;
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr) max-content;
    align-items: center;
    gap: 16px;
    overflow: hidden;
    color: #061936;
    background: linear-gradient(135deg, rgba(252, 254, 255, 0.98), rgba(239, 248, 250, 0.98));
    box-shadow: 0 8px 20px rgba(6, 25, 54, 0.13);
    font-family: Manrope, Arial, sans-serif;
    animation: plan-week-sticky-target-in 160ms ease-out;
}

.plan-week-targets-sticky[hidden] {
    display: none !important;
}

.plan-week-targets-sticky h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.plan-week-targets-sticky dl {
    min-width: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(6, minmax(64px, 1fr));
    gap: 8px 14px;
}

.plan-week-targets-sticky dl div {
    min-width: 0;
}

.plan-week-targets-sticky dt {
    margin: 0 0 1px;
    overflow: hidden;
    color: #65717f;
    font-size: 8px;
    font-weight: 600;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.plan-week-targets-sticky dd {
    margin: 0;
    color: #061936;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
}

.plan-week-targets-sticky-edit {
    min-height: 30px;
    padding: 5px 9px;
    border: 1px solid #91cfda;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: #ffffff;
    color: #16788a;
    font-family: inherit;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
}

.plan-week-targets-sticky-edit:hover,
.plan-week-targets-sticky-edit:focus-visible {
    border-color: #5bb0bd;
    background: #eaf7f9;
    outline: none;
}

.plan-week-targets-sticky-edit svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

@keyframes plan-week-sticky-target-in {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 800px) {
    .plan-week-targets-sticky {
        grid-template-columns: minmax(0, 1fr) max-content;
        gap: 6px 10px;
    }

    .plan-week-targets-sticky h3 {
        grid-column: 1;
    }

    .plan-week-targets-sticky dl {
        grid-column: 1 / -1;
        grid-row: 2;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .plan-week-targets-sticky-edit {
        grid-column: 2;
        grid-row: 1;
    }
}

.plan-week-targets-layout[hidden] {
    display: none !important;
}

.plan-week-targets-section--planner.plan-week-targets-section--attention {
    animation: plan-week-target-attention 1.35s ease-out;
}

@keyframes plan-week-target-attention {
    0%,
    100% {
        border-color: #deecef;
        box-shadow: 0 0 0 0 rgba(91, 176, 189, 0);
    }

    22% {
        border-color: #5bb0bd;
        box-shadow: 0 0 0 5px rgba(91, 176, 189, 0.24), 0 8px 22px rgba(6, 25, 54, 0.12);
    }
}

@media (prefers-reduced-motion: reduce) {
    .plan-week-targets-section--planner.plan-week-targets-section--attention {
        animation-duration: 1ms;
    }
}

.custom-calendar-header.plan-week-targets-mounted {
    margin-bottom: 0;
    padding-bottom: 0;
}

.custom-calendar-header.plan-week-targets-mounted + #calendar {
    margin-top: -28px;
    padding-top: 0;
}

.custom-calendar-header.plan-week-targets-collapsed + #calendar {
    margin-top: 0;
}

.custom-calendar-header.plan-week-targets-mounted + #calendar .fc-col-header-cell {
    padding-top: 0;
    padding-bottom: 0;
}

.custom-calendar-header.plan-week-targets-mounted + #calendar .fc-scrollgrid-sync-inner {
    padding-top: 0;
    padding-bottom: 0;
}

.custom-calendar-header.plan-week-targets-mounted + #calendar .fc-day-header-content {
    height: 30px;
    padding-top: 0;
    padding-bottom: 0;
}

.custom-calendar-header.plan-week-targets-mounted + #calendar .fc-day-header-number {
    width: 24px;
    height: 24px;
}

.plan-week-targets-section--planner h3 {
    margin: 0;
    color: #061936;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
}

.plan-week-targets-section--planner .plan-week-targets-layout {
    grid-template-columns: minmax(0, 690px) 220px;
    justify-content: space-between;
    gap: 16px;
}

.plan-week-targets-section--planner .plan-week-slider {
    margin-top: 5px;
}

.plan-week-targets-section--planner .plan-week-slider-label {
    margin-bottom: 1px;
}

.plan-week-targets-section--planner .plan-week-slider-range {
    margin-top: 0;
    font-size: 8px;
}

.plan-week-targets-section--planner .plan-week-macro-grid,
.plan-week-targets-section--planner .plan-week-micronutrient-grid {
    gap: 5px 14px;
}

.plan-week-targets-section--planner .plan-week-macro-plate {
    width: 220px;
}

.plan-week-targets-section--planner .plan-week-plate-stage {
    width: 210px;
    height: 174px;
}

.plan-week-targets-section--planner .plan-week-plate-disc {
    width: 174px;
    height: 174px;
}

.plan-week-targets-section--planner .plan-week-plate-rim {
    inset: 13px;
}

.plan-week-targets-section--planner input:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--plan-week-target-accent) 42%, transparent);
    outline-offset: 2px;
}

.plan-week-targets-section .plan-week-slider {
    margin-top: 8px;
}

.plan-week-targets-section .plan-week-slider-label {
    margin-bottom: 4px;
}

.plan-week-targets-section .plan-week-slider input[type='range'] {
    margin: 1px 0;
}

.plan-week-targets-section .plan-week-slider-range {
    margin-top: 2px;
}

.plan-week-targets-section .plan-week-macro-grid,
.plan-week-targets-section .plan-week-micronutrient-grid {
    gap: 12px 16px;
}

/* Keep the always-visible planner card compact. These rules intentionally
   follow the generic panel target styles so they are not overridden. */
.custom-calendar-header > .plan-week-targets-section--planner .plan-week-targets-layout {
    align-items: center;
}

.custom-calendar-header > .plan-week-targets-section--planner .plan-week-target-controls {
    display: grid;
    row-gap: 7px;
}

.custom-calendar-header > .plan-week-targets-section--planner .plan-week-slider {
    margin-top: 0;
}

.custom-calendar-header > .plan-week-targets-section--planner .plan-week-slider-label {
    min-height: 16px;
    margin-bottom: 0;
    font-size: 12px;
    line-height: 1.25;
}

.custom-calendar-header > .plan-week-targets-section--planner .plan-week-slider-label output {
    font-size: 12px;
}

.custom-calendar-header > .plan-week-targets-section--planner .plan-week-slider input[type='range'] {
    appearance: none;
    -webkit-appearance: none;
    height: 18px;
    margin: 0;
    background: transparent;
}

.custom-calendar-header > .plan-week-targets-section--planner .plan-week-slider input[type='range']::-webkit-slider-runnable-track {
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(
        to right,
        var(--plan-week-target-accent) 0,
        var(--plan-week-target-accent) var(--plan-week-range-progress, 50%),
        #414548 var(--plan-week-range-progress, 50%),
        #414548 100%
    );
}

.custom-calendar-header > .plan-week-targets-section--planner .plan-week-slider input[type='range']::-webkit-slider-thumb {
    width: 12px;
    height: 12px;
    margin-top: -5px;
    border: 0;
    border-radius: 50%;
    appearance: none;
    -webkit-appearance: none;
    background: var(--plan-week-target-accent);
    cursor: grab;
}

.custom-calendar-header > .plan-week-targets-section--planner .plan-week-slider input[type='range']::-moz-range-track {
    height: 2px;
    border-radius: 999px;
    background: #414548;
}

.custom-calendar-header > .plan-week-targets-section--planner .plan-week-slider input[type='range']::-moz-range-progress {
    height: 2px;
    border-radius: 999px;
    background: var(--plan-week-target-accent);
}

.custom-calendar-header > .plan-week-targets-section--planner .plan-week-slider input[type='range']::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 50%;
    background: var(--plan-week-target-accent);
    cursor: grab;
}

.custom-calendar-header > .plan-week-targets-section--planner .plan-week-slider-range {
    min-height: 9px;
    margin-top: -1px;
    font-size: 9px;
    line-height: 1;
}

.custom-calendar-header > .plan-week-targets-section--planner .plan-week-macro-grid,
.custom-calendar-header > .plan-week-targets-section--planner .plan-week-micronutrient-grid {
    gap: 3px 18px;
}

.custom-calendar-header > .plan-week-targets-section--planner .plan-week-plate-stage {
    height: 158px;
    transform: translateY(-12px);
}

.custom-calendar-header > .plan-week-targets-section--planner .plan-week-plate-disc {
    width: 158px;
    height: 158px;
}

.plan-week-targets-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 238px;
    gap: 22px;
    align-items: center;
}

.plan-week-target-controls {
    min-width: 0;
}

.plan-week-macro-plate {
    --plate-scale: 0.9;
    --protein-scale: 0.75;
    --carbohydrates-scale: 0.95;
    --fat-scale: 0.8;
    --fibre-scale: 0.72;
    width: 238px;
    margin: 0;
    display: grid;
    justify-items: center;
    align-self: start;
}

.plan-week-plate-stage {
    position: relative;
    width: 228px;
    height: 214px;
    display: grid;
    place-items: center;
    isolation: isolate;
}

.plan-week-plate-stage::before {
    position: absolute;
    z-index: -1;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(92, 70, 42, 0.08), rgba(92, 70, 42, 0) 70%);
    content: '';
    transform: scale(1.2);
}

.plan-week-plate-stage::after {
    position: absolute;
    top: 25px;
    right: 10px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #f6c966;
    box-shadow: -13px -13px 0 -2px #5bb0bd, 6px 21px 0 -2px #ef8f70;
    content: '';
    opacity: 0.8;
}

.plan-week-plate-disc {
    position: relative;
    width: 202px;
    height: 202px;
    border: 2px solid #dccdb9;
    border-radius: 50%;
    background: #fffaf1;
    box-shadow: 0 12px 22px rgba(75, 57, 36, 0.16), inset 0 0 0 9px #f5ecdf, inset 0 0 0 11px #e8d9c6;
    transform: scale(var(--plate-scale));
    transform-origin: center;
    transition: transform 180ms cubic-bezier(0.2, 0.9, 0.3, 1.25);
}

.plan-week-plate-rim {
    position: absolute;
    inset: 17px;
    border: 1px solid rgba(218, 197, 169, 0.72);
    border-radius: 50%;
    background: radial-gradient(circle at 42% 32%, #fffefb 0%, #fff9ee 72%, #f3e6d5 100%);
}

.plan-week-plate-food {
    position: absolute;
    z-index: 2;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 3px rgba(55, 39, 23, 0.18));
    transition: transform 180ms cubic-bezier(0.2, 0.9, 0.3, 1.25), filter 180ms ease;
    will-change: transform;
}

.plan-week-plate-food--fibre {
    top: -1px;
    left: 20%;
    width: 60%;
    transform: scale(var(--fibre-scale));
    transform-origin: center 42%;
}

.plan-week-plate-food--carbohydrates {
    bottom: 4px;
    left: -2px;
    width: 54%;
    transform: rotate(-6deg) scale(var(--carbohydrates-scale));
    transform-origin: 58% 62%;
}

.plan-week-plate-food--protein {
    right: 1px;
    bottom: 3px;
    width: 50%;
    transform: rotate(5deg) scale(var(--protein-scale));
    transform-origin: 42% 60%;
}

.plan-week-plate-food--fat {
    top: 31%;
    right: 0;
    width: 34%;
    transform: rotate(8deg) scale(var(--fat-scale));
    transform-origin: 45% 50%;
}

.plan-week-health-summary {
    margin-top: 18px;
    padding: 0 18px;
}

.plan-week-meal-times {
    margin-top: 18px;
    padding: 0 18px;
}

.plan-week-training-time {
    margin-top: 18px;
    margin-right: 0;
    margin-left: 0;
    padding: 8px 12px 8px 8px;
    display: block;
    border: 1px solid #d6e8eb;
    border-radius: 12px;
    background: linear-gradient(105deg, #f2fafb 0%, #ffffff 66%);
    box-sizing: border-box;
}

.plan-week-training-time[hidden] {
    display: none;
}

.plan-week-training-time h3 {
    margin: 0;
    white-space: nowrap;
}

.plan-week-training-header {
    display: flex;
    min-height: 24px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.plan-week-training-details {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: start;
    gap: 22px;
    padding-top: 4px;
}

.plan-week-training-details[hidden] {
    display: none;
}

.plan-week-training-animation {
    width: 64px;
    height: 54px;
    overflow: hidden;
    border-radius: 10px;
    background: transparent;
    transform: translateY(-10px) scale(1.42);
    transform-origin: center left;
}

.plan-week-training-animation svg {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.plan-week-training-animation--fallback::before {
    content: '\1F3CB';
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    color: #55adba;
    font-size: 28px;
}

.plan-week-training-settings {
    display: grid;
    width: 100%;
    min-width: 0;
    gap: 8px;
}

.plan-week-training-time-row {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
}

.plan-week-training-column-heading {
    color: #34424c;
    font: 700 10px Manrope, Arial, sans-serif;
}

.plan-week-training-intensity-column {
    display: grid;
    grid-template-columns: max-content 70px;
    align-items: start;
    justify-content: start;
    gap: 18px;
    min-width: 0;
}

.plan-week-training-intensity-column .plan-week-training-animation {
    margin-top: 0;
}

.plan-week-training-add-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0;
    color: #53636d;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}

.plan-week-training-add-toggle input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.plan-week-training-add-toggle-track {
    display: flex;
    width: 30px;
    height: 18px;
    padding: 2px;
    align-items: center;
    border-radius: 999px;
    background: #ccd9dc;
    box-sizing: border-box;
    transition: background-color 160ms ease;
}

.plan-week-training-add-toggle-track > span {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgb(6 25 54 / 20%);
    transition: transform 160ms ease;
}

.plan-week-training-add-toggle input:checked + .plan-week-training-add-toggle-track {
    background: #55adba;
}

.plan-week-training-add-toggle input:checked + .plan-week-training-add-toggle-track > span {
    transform: translateX(12px);
}

.plan-week-training-add-toggle input:focus-visible + .plan-week-training-add-toggle-track {
    outline: 3px solid rgb(91 176 189 / 35%);
    outline-offset: 2px;
}

.plan-week-training-time-control {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    color: #34424c;
    font-size: 10px;
    font-weight: 700;
}

.plan-week-training-time-field {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.plan-week-training-time-icon {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    background: #eaf6f7;
    color: #438f9a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.plan-week-training-time-icon svg {
    width: 14px;
    height: 14px;
}

.plan-week-training-time-control input {
    flex: 0 0 112px;
    width: 112px;
    height: 34px;
    box-sizing: border-box;
    padding: 5px 7px;
    border: 1px solid #d5dfe3;
    border-radius: 8px;
    background: #ffffff;
    color: #061936;
    font: 600 11px Manrope, Arial, sans-serif;
}

.plan-week-training-intensity {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.plan-week-training-intensity-label {
    flex: 0 0 auto;
    margin: 0;
    color: #34424c;
    font: 700 10px Manrope, Arial, sans-serif;
}

.plan-week-training-intensity-options {
    display: inline-flex;
    flex-wrap: wrap;
    max-width: 100%;
    gap: 3px;
    padding: 3px;
    border-radius: 9px;
    background: #eaf4f6;
}

.plan-week-training-intensity-options label {
    margin: 0;
    cursor: pointer;
}

.plan-week-training-intensity-options input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

.plan-week-training-intensity-options span {
    display: block;
    min-width: 56px;
    padding: 5px 9px;
    border-radius: 7px;
    color: #53636d;
    font: 700 10px Manrope, Arial, sans-serif;
    text-align: center;
    transition: color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.plan-week-training-intensity-options input:checked + span {
    background: #ffffff;
    color: #147d8d;
    box-shadow: 0 1px 5px rgb(8 43 65 / 12%);
}

.plan-week-training-intensity-options input:focus-visible + span {
    outline: 2px solid #58b5c2;
    outline-offset: 1px;
}

.plan-week-meal-times > p {
    margin-top: 4px;
    color: #67737b;
    font-size: 10px;
}

.plan-week-meal-time-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 8px;
}

.plan-week-meal-times-heading {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px 14px;
}

.plan-week-meal-time {
    padding: 8px;
    border: 1px solid #e0eaec;
    border-radius: 10px;
    display: grid;
    gap: 5px;
    background: #fbfdfe;
    color: #34424c;
    font-size: 10px;
    font-weight: 700;
}

.plan-week-meal-time-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.plan-week-meal-time-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.plan-week-meal-toggle {
    position: relative;
    flex: 0 0 auto;
    cursor: pointer;
}

.plan-week-meal-toggle input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.plan-week-meal-toggle-track {
    display: flex;
    width: 30px;
    height: 18px;
    padding: 2px;
    align-items: center;
    border-radius: 999px;
    background: #ccd9dc;
    box-sizing: border-box;
    transition: background-color 160ms ease;
}

.plan-week-meal-toggle-track > span {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(6, 25, 54, 0.2);
    transition: transform 160ms ease;
}

.plan-week-meal-toggle input:checked + .plan-week-meal-toggle-track {
    background: #55adba;
}

.plan-week-meal-toggle input:checked + .plan-week-meal-toggle-track > span {
    transform: translateX(12px);
}

.plan-week-meal-toggle input:focus-visible + .plan-week-meal-toggle-track {
    outline: 3px solid rgba(91, 176, 189, 0.4);
    outline-offset: 2px;
}

.plan-week-meal-time-icon {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    border-radius: 7px;
    background: #eaf6f7;
    color: #438f9a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.plan-week-meal-time-icon svg {
    width: 14px;
    height: 14px;
}

.plan-week-meal-time > input[type='time'] {
    width: 100%;
    min-width: 0;
    height: 34px;
    box-sizing: border-box;
    padding: 5px 7px;
    border: 1px solid #d5dfe3;
    border-radius: 8px;
    background: #ffffff;
    color: #061936;
    font: 600 11px Manrope, Arial, sans-serif;
}

.plan-week-meal-time--disabled {
    background: #f5f7f8;
}

.plan-week-meal-time--disabled .plan-week-meal-time-label,
.plan-week-meal-time--disabled > input[type='time'] {
    opacity: 0.45;
}

.plan-week-health-summary-content {
    margin-top: 10px;
    color: #34424c;
}

.plan-week-health-summary-content dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px 12px;
    margin: 0;
}

.plan-week-health-summary-item {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(96px, 0.8fr) minmax(0, 1.4fr);
    align-items: start;
    gap: 12px;
    padding: 9px 11px;
    border: 1px solid #e2ecef;
    border-radius: 9px;
    background: linear-gradient(135deg, #fbfdfe 0%, #f5fafb 100%);
    font-size: 10px;
    line-height: 1.45;
}

.plan-week-health-summary-item dt {
    color: #67737b;
    font-weight: 600;
}

.plan-week-health-summary-item dd {
    min-width: 0;
    margin: 0;
    color: #061936;
    font-weight: 600;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.plan-week-additional-instructions {
    display: grid;
    gap: 7px;
    margin-top: 16px;
    padding-top: 13px;
    border-top: 1px solid #e3ecef;
    color: #34424c;
    font-size: 12px;
    font-weight: 700;
}

.plan-week-additional-instructions-field {
    display: block;
    padding: 3px;
    border-radius: 10px;
    background: linear-gradient(110deg, #37aebe 0%, #557fd1 50%, #9a59ce 100%);
    box-shadow: 0 3px 10px rgba(57, 105, 132, 0.14);
    transition: box-shadow 160ms ease;
}

.plan-week-additional-instructions-field:focus-within {
    box-shadow: 0 0 0 3px rgba(91, 176, 189, 0.18), 0 5px 14px rgba(75, 91, 159, 0.18);
}

.plan-week-additional-instructions textarea {
    display: block;
    width: 100%;
    height: 34px;
    min-height: 34px;
    box-sizing: border-box;
    padding: 8px 10px;
    resize: vertical;
    border: 0;
    border-radius: 7px;
    background: #ffffff;
    color: #061936;
    font: 500 13px/1.4 Manrope, Arial, sans-serif;
}

.plan-week-additional-instructions textarea:focus {
    outline: none;
}

.plan-week-additional-instructions textarea::placeholder {
    color: #929da3;
}

.plan-week-form-error {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 9px;
    background: #fff0f1;
    color: #a53e46;
    font: 600 11px/1.45 Manrope, Arial, sans-serif;
}

.plan-week-planner-error {
    box-sizing: border-box;
    width: 100%;
    margin: 8px auto 0;
    padding: 10px 12px;
    border-radius: 9px;
    background: #fff0f1;
    color: #a53e46;
    font: 600 12px/1.45 Manrope, Arial, sans-serif;
}

.plan-week-planner-error[hidden] {
    display: none;
}

.custom-calendar-header.plan-week-targets-mounted.plan-week-error-visible + #calendar {
    margin-top: 0;
}

.plan-week-footer {
    margin-top: 18px;
}

.plan-week-footer p {
    max-width: 310px;
}

.plan-week-generate,
.plan-week-confirm-all,
.plan-week-dismiss-review {
    min-height: 42px;
    padding: 10px 16px;
    border: 0;
    border-radius: 10px;
    background: #5bb0bd;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: Manrope, Arial, sans-serif;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.plan-week-generate:hover,
.plan-week-confirm-all:hover,
.plan-week-dismiss-review:hover {
    background: #438f9a;
}

.plan-week-generate:disabled {
    cursor: wait;
    opacity: 0.68;
}

.plan-week-generate img {
    width: 16px;
    height: 16px;
    filter: brightness(0) invert(1);
}

.plan-week-panel--loading .plan-week-section {
    pointer-events: none;
    opacity: 0.7;
}

.plan-week-review-bar {
    width: fit-content;
    flex: 0 0 100%;
    order: 10;
    box-sizing: border-box;
    margin: 8px 0 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    font-family: Manrope, Arial, sans-serif;
    box-shadow: none;
}

.plan-week-review-copy {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.plan-week-review-icon {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #061936;
    display: flex;
    align-items: center;
    justify-content: center;
}

.plan-week-review-icon img {
    width: 17px;
    height: 17px;
    filter: brightness(0) invert(1);
}

.plan-week-review-copy div {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.plan-week-review-copy strong {
    color: #061936;
    font-size: 12px;
}

.plan-week-review-copy span {
    color: #66727b;
    font-size: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.plan-week-review-progress {
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: #dbe8ea;
}

.plan-week-review-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #39b777;
    transition: width 0.25s ease;
}

.plan-week-review-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.plan-week-planning-status {
    display: inline-flex;
    flex: 0 0 100%;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 6px;
    color: #56636c;
    font: 700 10px Manrope, Arial, sans-serif;
    white-space: nowrap;
}

.plan-week-planning-spinner {
    width: 14px;
    height: 14px;
    box-sizing: border-box;
    border: 2px solid #d3e7ea;
    border-top-color: #5bb0bd;
    border-radius: 50%;
    animation: plan-week-spin 0.7s linear infinite;
}

.plan-week-slot-choice-dropdown {
    position: fixed;
    z-index: 11000;
    width: min(230px, calc(100vw - 20px));
    box-sizing: border-box;
    padding: 8px;
    border: 1px solid #d5dfe3;
    border-radius: 10px;
    background: #ffffff;
    color: #061936;
    font-family: Manrope, Arial, sans-serif;
    box-shadow: 0 12px 28px rgba(6, 25, 54, 0.2);
}

.plan-week-slot-choice-context {
    display: block;
    padding: 3px 6px 7px;
    color: #66727b;
    font-size: 9px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.plan-week-slot-instructions {
    display: grid;
    gap: 4px;
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px solid #e3ebee;
}

.plan-week-slot-instructions > span {
    color: #46545e;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.3;
}

.plan-week-slot-instructions-input {
    width: 100%;
    min-height: 48px;
    max-height: 84px;
    box-sizing: border-box;
    padding: 7px 8px;
    border: 2px solid transparent;
    border-radius: 8px;
    background: linear-gradient(#ffffff, #ffffff) padding-box,
        linear-gradient(115deg, #37aebe 0%, #557fd1 52%, #9a59ce 100%) border-box;
    color: #061936;
    font: 500 10px/1.4 Manrope, Arial, sans-serif;
    resize: vertical;
}

.plan-week-slot-instructions-input::placeholder {
    color: #9aa4aa;
}

.plan-week-slot-instructions-input:focus {
    border-color: transparent;
    box-shadow: 0 0 0 3px rgba(91, 176, 189, 0.16), 0 4px 12px rgba(85, 127, 209, 0.1);
    outline: none;
}

.plan-week-slot-choice-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
    margin: 0;
}

.plan-week-slot-choice-actions[hidden] {
    display: none;
}

.plan-week-slot-choice-actions button {
    width: 100%;
    min-height: 36px;
    padding: 8px 10px;
    border-radius: 7px;
    justify-content: flex-start;
    text-align: left;
    font: 700 11px Manrope, Arial, sans-serif;
    cursor: pointer;
}

.plan-week-slot-manual {
    border: 0;
    background: #ffffff;
    color: #56636c;
}

.plan-week-slot-manual:hover {
    background: #f2f6f7;
}

.plan-week-slot-food-ai {
    border: 1px solid #b9dce1;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #f0fafb;
    color: #176f7d;
}

.plan-week-slot-food-ai:hover,
.plan-week-slot-food-ai:focus-visible {
    border-color: #5bb0bd;
    background: #e2f5f7;
    outline: none;
}

.plan-week-slot-food-ai img,
.plan-week-food-ai-estimate img {
    width: 14px;
    height: 14px;
}

.plan-week-slot-food-ai img {
    filter: invert(55%) sepia(32%) saturate(856%) hue-rotate(140deg) brightness(91%);
}

.plan-week-slot-choice-dropdown--food-ai {
    width: min(370px, calc(100vw - 20px));
    max-height: calc(100vh - 20px);
    overflow-y: auto;
}

.plan-week-food-ai-panel {
    display: grid;
    gap: 10px;
    padding: 4px 2px 2px;
}

.plan-week-food-ai-panel[hidden],
.plan-week-food-ai-review[hidden],
.plan-week-food-ai-assumptions[hidden],
.plan-week-food-ai-add[hidden] {
    display: none;
}

.plan-week-food-ai-description,
.plan-week-food-ai-name-row label,
.plan-week-food-ai-serving-row label,
.plan-week-food-ai-macros label {
    display: grid;
    gap: 4px;
    min-width: 0;
    color: #52616b;
    font-size: 9px;
    font-weight: 700;
}

.plan-week-food-ai-description > span {
    color: #25394c;
    font-size: 11px;
}

.plan-week-food-ai-description textarea,
.plan-week-food-ai-review input,
.plan-week-food-ai-review select {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #cbdde1;
    border-radius: 7px;
    background: #ffffff;
    color: #061936;
    font: 500 10px/1.35 Manrope, Arial, sans-serif;
    outline: none;
}

.plan-week-food-ai-description textarea {
    min-height: 58px;
    padding: 8px 9px;
    resize: vertical;
}

.plan-week-food-ai-review input,
.plan-week-food-ai-review select {
    height: 30px;
    padding: 5px 7px;
}

.plan-week-food-ai-description textarea:focus,
.plan-week-food-ai-review input:focus,
.plan-week-food-ai-review select:focus {
    border-color: #5bb0bd;
    box-shadow: 0 0 0 2px rgba(91, 176, 189, 0.14);
}

.plan-week-food-ai-review {
    display: grid;
    gap: 9px;
    padding-top: 9px;
    border-top: 1px solid #e1eaed;
}

.plan-week-food-ai-name-row {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 8px;
}

.plan-week-food-ai-serving-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.plan-week-food-ai-macros {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}

.plan-week-food-ai-macros label > div {
    position: relative;
}

.plan-week-food-ai-macros input {
    padding-right: 27px;
}

.plan-week-food-ai-macros small {
    position: absolute;
    top: 50%;
    right: 7px;
    color: #87939b;
    font-size: 8px;
    font-weight: 600;
    transform: translateY(-50%);
    pointer-events: none;
}

.plan-week-food-ai-assumptions {
    margin: 0;
    padding: 7px 8px;
    border-radius: 6px;
    background: #fff8e9;
    color: #6c604b;
    font-size: 9px;
    line-height: 1.4;
}

.plan-week-food-ai-basket {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid #d5e6e9;
    border-radius: 8px;
    background: #f8fcfd;
}

.plan-week-food-ai-basket-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.plan-week-food-ai-basket-heading strong,
.plan-week-food-ai-basket-heading span,
.plan-week-food-ai-basket-item strong,
.plan-week-food-ai-basket-item span,
.plan-week-food-ai-basket-totals small,
.plan-week-food-ai-basket-totals strong {
    display: block;
}

.plan-week-food-ai-basket-heading strong {
    color: #25394c;
    font-size: 11px;
}

.plan-week-food-ai-basket-heading div > span {
    margin-top: 1px;
    color: #71808d;
    font-size: 9px;
}

.plan-week-food-ai-basket-heading > span {
    font-size: 18px;
}

.plan-week-food-ai-basket-title-row {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 5px;
}

.plan-week-food-ai-basket-title-row > strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.plan-week-food-ai-basket-edit-name {
    display: inline-flex;
    flex: 0 0 auto;
    width: 19px;
    height: 19px;
    padding: 1px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.plan-week-food-ai-basket-edit-name:hover {
    background: #e2f3f5;
}

.plan-week-food-ai-basket-edit-name img {
    width: 16px;
    height: 16px;
}

.plan-week-food-ai-basket-name-input {
    width: 150px;
    height: 27px;
    box-sizing: border-box;
    padding: 4px 7px;
    border: 1px solid #5bb0bd;
    border-radius: 6px;
    color: #25394c;
    font: 700 10px Manrope, Arial, sans-serif;
    outline: none;
    box-shadow: 0 0 0 2px rgba(91, 176, 189, 0.14);
}

.plan-week-food-ai-basket-name-input[hidden],
.plan-week-food-ai-basket-edit-name[hidden],
#planWeekFoodBasketTitle[hidden] {
    display: none;
}

.plan-week-food-ai-basket-items {
    display: grid;
    max-height: 112px;
    overflow-y: auto;
    gap: 5px;
}

.plan-week-food-ai-basket-empty {
    margin: 0;
    padding: 8px;
    color: #71808d;
    font-size: 9px;
    text-align: center;
}

.plan-week-food-ai-basket-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 7px;
    border: 1px solid #e1ebed;
    border-radius: 6px;
    background: #ffffff;
}

.plan-week-food-ai-basket-item > div {
    min-width: 0;
}

.plan-week-food-ai-basket-item strong {
    overflow: hidden;
    color: #25394c;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.plan-week-food-ai-basket-item span {
    margin-top: 1px;
    color: #71808d;
    font-size: 8px;
}

.plan-week-food-ai-basket-item button {
    flex: 0 0 auto;
    width: 21px;
    height: 21px;
    padding: 0;
    border: 1px solid #efcccc;
    border-radius: 50%;
    background: #ffffff;
    color: #b54747;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.plan-week-food-ai-basket-totals {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding-top: 7px;
    border-top: 1px solid #e1ebed;
}

.plan-week-food-ai-basket-total-label {
    margin-bottom: -4px;
    color: #25394c;
    font-size: 9px;
}

.plan-week-food-ai-basket-totals small {
    color: #788590;
    font-size: 7px;
}

.plan-week-food-ai-basket-totals strong {
    margin-top: 1px;
    color: #25394c;
    font-size: 9px;
}

.plan-week-food-ai-basket-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
    gap: 7px;
}

.plan-week-food-ai-save-basket,
.plan-week-food-ai-save-template {
    min-height: 32px;
    padding: 7px 10px;
    border: 0;
    border-radius: 7px;
    background: #327b86;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
}

.plan-week-food-ai-save-template {
    border: 1px solid #358795;
    color: #287481;
    background: #ffffff;
}

.plan-week-food-ai-save-basket:disabled,
.plan-week-food-ai-save-template:disabled {
    background: #d5e2e4;
    color: #829197;
    cursor: not-allowed;
}

.plan-week-food-ai-buttons {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr);
    gap: 6px;
}

.plan-week-food-ai-buttons button {
    min-height: 32px;
    padding: 6px 9px;
    border-radius: 7px;
    font-size: 10px;
    font-weight: 700;
}

.plan-week-food-ai-back {
    border: 1px solid #d1dde0;
    background: #ffffff;
    color: #66727b;
}

.plan-week-food-ai-estimate,
.plan-week-food-ai-add {
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center !important;
    gap: 6px;
    background: #5bb0bd;
    color: #ffffff;
    text-align: center !important;
}

.plan-week-food-ai-estimate img {
    filter: brightness(0) invert(1);
}

.plan-week-food-ai-buttons button:disabled {
    cursor: wait;
    opacity: 0.7;
}

.plan-week-slot-ai {
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    background: #5bb0bd;
    color: #ffffff;
}

.plan-week-slot-ai-control {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    border-radius: 7px;
    background: #5bb0bd;
}

.plan-week-slot-choice-actions .plan-week-slot-ai-control .plan-week-slot-ai {
    min-width: 0;
    border-radius: 7px;
}

.plan-week-slot-ai-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.plan-week-slot-ai img {
    width: 14px;
    height: 14px;
    filter: brightness(0) invert(1);
}

.plan-week-slot-ai:disabled {
    cursor: wait;
    opacity: 0.75;
}

.plan-week-slot-choice-actions .plan-week-slot-target-trigger {
    width: 36px;
    min-height: 36px;
    padding: 0;
    border: 0;
    border-radius: 0 7px 7px 0;
    display: grid;
    place-items: center;
    background: transparent;
    color: #ffffff;
    cursor: pointer;
}

.plan-week-slot-target-trigger:hover,
.plan-week-slot-target-trigger:focus-visible {
    background: rgba(6, 25, 54, 0.12);
    outline: none;
}

.plan-week-slot-target-trigger:focus-visible {
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.85);
}

.plan-week-slot-target-trigger svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.plan-week-slot-target-tooltip {
    position: absolute;
    left: calc(100% + 9px);
    bottom: 0;
    z-index: 2;
    width: 230px;
    box-sizing: border-box;
    padding: 13px 14px;
    border: 1px solid #d5dfe3;
    border-radius: 9px;
    background: #ffffff;
    color: #061936;
    box-shadow: 0 10px 24px rgba(6, 25, 54, 0.18);
    opacity: 0;
    pointer-events: none;
    transform: translateX(-4px);
    visibility: hidden;
    transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
}

.plan-week-slot-target-tooltip::before {
    position: absolute;
    right: 100%;
    bottom: 0;
    width: 9px;
    height: 100%;
    content: '';
}

.plan-week-slot-target-tooltip::after {
    position: absolute;
    left: -5px;
    bottom: 13px;
    width: 9px;
    height: 9px;
    border-left: 1px solid #d5dfe3;
    border-bottom: 1px solid #d5dfe3;
    background: #ffffff;
    content: '';
    transform: rotate(45deg);
}

.plan-week-slot-ai:hover + .plan-week-slot-target-tooltip,
.plan-week-slot-ai:focus-visible + .plan-week-slot-target-tooltip,
.plan-week-slot-target-tooltip:hover,
.plan-week-slot-target-tooltip:focus-within {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
    visibility: visible;
}

.plan-week-slot-target-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 7px;
    gap: 8px;
}

.plan-week-slot-target-heading strong {
    font-size: 12px;
}

.plan-week-slot-choice-actions .plan-week-slot-target-edit {
    width: auto;
    min-height: 26px;
    padding: 4px 7px;
    border: 1px solid #c3dde1;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f3fafb;
    color: #16788a;
    font-size: 9px;
    cursor: pointer;
}

.plan-week-slot-target-edit:hover,
.plan-week-slot-target-edit:focus-visible {
    border-color: #5bb0bd;
    background: #e4f5f7;
    outline: none;
}

.plan-week-slot-target-edit svg {
    width: 11px;
    height: 11px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.plan-week-slot-choice-dropdown--stacked-target .plan-week-slot-target-tooltip {
    right: 0;
    bottom: calc(100% + 8px);
    left: auto;
    transform: translateY(4px);
}

.plan-week-slot-choice-dropdown--stacked-target .plan-week-slot-target-tooltip::before {
    top: 100%;
    right: 0;
    bottom: auto;
    width: 100%;
    height: 8px;
}

.plan-week-slot-choice-dropdown--stacked-target .plan-week-slot-target-tooltip::after {
    right: 12px;
    bottom: -5px;
    left: auto;
    border: 0;
    border-right: 1px solid #d5dfe3;
    border-bottom: 1px solid #d5dfe3;
}

.plan-week-slot-choice-dropdown--stacked-target .plan-week-slot-ai:hover + .plan-week-slot-target-tooltip,
.plan-week-slot-choice-dropdown--stacked-target .plan-week-slot-ai:focus-visible + .plan-week-slot-target-tooltip,
.plan-week-slot-choice-dropdown--stacked-target .plan-week-slot-target-tooltip:hover,
.plan-week-slot-choice-dropdown--stacked-target .plan-week-slot-target-tooltip:focus-within {
    transform: translateY(0);
}

.plan-week-slot-target-tooltip dl {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px 10px;
    margin: 0;
}

.plan-week-slot-target-tooltip dl > div {
    min-width: 0;
}

.plan-week-slot-target-tooltip dt {
    color: #758089;
    font-size: 9px;
    font-weight: 700;
    line-height: 1.2;
}

.plan-week-slot-target-tooltip dd {
    margin: 2px 0 0;
    color: #061936;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}

.plan-week-slot-choice-error {
    margin-top: 12px;
    color: #b42318;
    font-size: 10px;
    line-height: 1.4;
}

.plan-week-cancel-all {
    min-height: 38px;
    padding: 9px 12px;
    border: 1px solid #cad6da;
    border-radius: 9px;
    background: #ffffff;
    color: #56636c;
    font: 700 11px Manrope, Arial, sans-serif;
    cursor: pointer;
}

.plan-week-review-working {
    color: #5b6871;
    font-size: 10px;
}

.plan-week-review-meals {
    grid-column: 1 / -1;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(230px, calc((100% - 27px) / 4));
    gap: 9px;
    padding: 2px 0 5px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: #b9d5d9 transparent;
}

.plan-week-review-meal {
    min-width: 0;
    min-height: 78px;
    box-sizing: border-box;
    padding: 8px;
    border: 1px solid #d9e8ea;
    border-radius: 10px;
    background: #ffffff;
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    scroll-snap-align: start;
}

.plan-week-review-meal--approved {
    border-color: rgba(57, 183, 119, 0.34);
    background: #f7fcf9;
}

.plan-week-review-meal--error {
    border-color: #efc7c7;
    background: #fffafa;
}

.plan-week-review-meal-image {
    width: 56px;
    height: 56px;
    overflow: hidden;
    border-radius: 8px;
    background: #e7f2f4;
}

.plan-week-review-meal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.plan-week-review-meal-image--empty {
    box-sizing: border-box;
    padding: 18px;
    background: #061936;
}

.plan-week-review-meal-image--empty img {
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.plan-week-review-meal-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.plan-week-review-meal-context {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #5b7077;
    font: 700 8px/1.25 Manrope, Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.035em;
}

.plan-week-review-meal-copy > strong {
    min-width: 0;
    overflow: hidden;
    color: #061936;
    font: 700 11px/1.25 Manrope, Arial, sans-serif;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.plan-week-review-meal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 7px;
    color: #67767c;
    font: 600 8px/1.2 Manrope, Arial, sans-serif;
}

.plan-week-review-meal-error {
    overflow: hidden;
    color: #b44343;
    font: 600 8px/1.2 Manrope, Arial, sans-serif;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.plan-week-review-meal-decision {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    gap: 6px;
}

.plan-week-review-meal-status {
    color: #668087;
    font: 700 7px/1 Manrope, Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.plan-week-review-meal--approved .plan-week-review-meal-status {
    color: #27875a;
}

.plan-week-review-meal-actions {
    display: inline-flex;
    gap: 4px;
}

.plan-week-review-meal-action {
    width: 24px;
    height: 24px;
    box-sizing: border-box;
    padding: 6px;
    border: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.plan-week-review-meal-action--confirm {
    background: #3aae77;
}

.plan-week-review-meal-action--cancel {
    border: 1px solid #d4e0e2;
    background: #ffffff;
}

.plan-week-review-meal-action img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.plan-week-review-meal-action--confirm img {
    filter: brightness(0) invert(1);
}

.plan-week-review-card-spinner {
    width: 16px;
    height: 16px;
    box-sizing: border-box;
    border: 2px solid #c7dadd;
    border-top-color: #3aae77;
    border-radius: 50%;
    animation: plan-week-spin 0.7s linear infinite;
}

/* AI provenance and review actions are overlays. They never change the event's
   measured dimensions, which keeps FullCalendar rows stable while decisions run. */
.fc-event.ai-generated-event {
    position: relative;
    border-color: #5bb0bd !important;
    box-shadow: inset 0 0 0 1px rgba(91, 176, 189, 0.45);
}

.plan-week-event-chrome {
    position: absolute;
    inset: 0;
    z-index: 8;
    pointer-events: none;
    overflow: hidden;
    border-radius: inherit;
}

.plan-week-ai-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    max-width: calc(100% - 62px);
    height: 20px;
    box-sizing: border-box;
    padding: 3px 6px;
    border-radius: 999px;
    background: #061936;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font: 700 8px/1 Manrope, Arial, sans-serif;
    box-shadow: 0 2px 6px rgba(6, 25, 54, 0.18);
}

.plan-week-ai-badge img {
    flex: none;
    width: 10px;
    height: 10px;
    filter: brightness(0) invert(1);
}

.plan-week-ai-badge > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.plan-week-event-actions {
    position: absolute;
    top: 3px;
    right: 3px;
    display: inline-flex;
    gap: 3px;
    pointer-events: auto;
}

.plan-week-event-action {
    width: 22px;
    height: 22px;
    box-sizing: border-box;
    padding: 5px;
    border: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 7px rgba(6, 25, 54, 0.16);
}

.plan-week-event-action--confirm {
    background: #3aae77;
}

.plan-week-event-action--cancel {
    background: #ffffff;
}

.plan-week-event-action:hover {
    transform: scale(1.07);
}

.plan-week-event-action:disabled {
    cursor: wait;
    opacity: 0.78;
}

.plan-week-event-action img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.plan-week-event-action--confirm img {
    filter: brightness(0) invert(1);
}

.plan-week-mini-spinner {
    width: 10px;
    height: 10px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: plan-week-spin 0.7s linear infinite;
}

.fc-event.ai-weekly-draft-event .fc-recipe-portion-badge {
    right: 7px !important;
}

.fc-event.plan-week-training-event {
    --plan-week-training-accent: #4d9eac;
    --plan-week-training-surface: #f1f9fb;
    border-color: transparent !important;
    background: var(--plan-week-training-surface) !important;
    color: #173d47 !important;
    cursor: default !important;
}

.fc-event.plan-week-training-event--low {
    --plan-week-training-accent: #55adba;
    --plan-week-training-surface: #f1f9fb;
}

.fc-event.plan-week-training-event--moderate {
    --plan-week-training-accent: #55adba;
    --plan-week-training-surface: #f1f9fb;
}

.fc-event.plan-week-training-event--high {
    --plan-week-training-accent: #55adba;
    --plan-week-training-surface: #f1f9fb;
}

.fc-event.plan-week-training-event .fc-week-pill,
.fc-event.plan-week-training-event .month-pill,
.fc-event.plan-week-training-event .fc-event-main-frame {
    border: 0 !important;
    background: var(--plan-week-training-surface) !important;
    color: #173d47 !important;
    box-shadow: none;
}

.fc-training-block-animation {
    display: none;
    flex: 0 0 auto;
    width: 62px;
    height: 62px;
    overflow: hidden;
    border-radius: 8px;
    background: transparent;
}

.fc-training-block-animation svg {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.fc-timeGridWeek-view .fc-timegrid-event-harness.fc-week-solo:not(.fc-overlap-group)
    .plan-week-training-event .fc-training-block-animation,
.fc-timeGridDay-view .plan-week-training-event .fc-training-block-animation {
    display: block;
}

.fc-timeGridWeek-view .fc-timegrid-event-harness.fc-week-solo:not(.fc-overlap-group)
    .plan-week-training-event .fc-week-pill {
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 7px 7px 9px;
}

.fc-timeGridWeek-view .fc-timegrid-event-harness.fc-week-solo:not(.fc-overlap-group)
    .plan-week-training-event .fc-week-pill-title {
    order: 1;
    flex: 0 0 auto;
    width: 100%;
    text-align: center;
}

.fc-timeGridWeek-view .fc-timegrid-event-harness.fc-week-solo:not(.fc-overlap-group)
    .plan-week-training-event .fc-training-block-animation {
    order: 2;
}

.fc-event.plan-week-training-event .fc-training-block-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    height: 100%;
    padding: 7px;
    overflow: hidden;
    box-sizing: border-box;
}

.fc-event.plan-week-training-event .fc-training-block-card .fc-event-title {
    order: 1;
    width: 100%;
    text-align: center;
}

.fc-event.plan-week-training-event .fc-training-block-card .fc-training-block-animation {
    order: 2;
}

.fc-timeGridWeek-view .fc-event.ai-generated-event .fc-week-pill,
.fc-dayGridMonth-view .fc-event.ai-generated-event .month-pill {
    padding-left: 29px;
    padding-right: 52px;
}

.fc-timeGridWeek-view .fc-event.ai-generated-event .plan-week-ai-badge,
.fc-dayGridMonth-view .fc-event.ai-generated-event .plan-week-ai-badge {
    width: 20px;
    padding: 5px;
}

.fc-timeGridWeek-view .fc-event.ai-generated-event .plan-week-ai-badge > span,
.fc-dayGridMonth-view .fc-event.ai-generated-event .plan-week-ai-badge > span {
    display: none;
}

.fc-timeGridWeek-view .fc-week-overlap-group .plan-week-event-chrome {
    pointer-events: none;
}

@keyframes plan-week-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 900px) {
    .plan-week-panel {
        right: 12px;
        width: min(780px, calc(100vw - 24px));
    }

    .plan-week-review-bar {
        margin: 8px 0 0;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .plan-week-review-progress {
        display: none;
    }
}

@media (max-width: 720px) {
    .plan-week-meal-time-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .plan-week-panel-target-summary dl {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .plan-week-targets-layout {
        grid-template-columns: 1fr;
    }

    .plan-week-targets-section--planner .plan-week-targets-layout {
        grid-template-columns: 1fr;
    }

    .plan-week-targets-section--planner .plan-week-targets-heading > .plan-week-active-calculate-status:not([hidden]) {
        margin-right: 0;
    }

    .plan-week-macro-plate {
        order: -1;
        justify-self: center;
    }
}

@media (max-width: 640px) {
    .plan-week-targets-heading {
        flex-wrap: wrap;
    }

    .plan-week-control {
        order: -1;
        width: 100%;
        justify-content: center;
    }

    .plan-week-trigger {
        width: 100%;
    }

    .plan-week-panel {
        position: fixed;
        z-index: 10050;
        inset: 12px;
        width: auto;
        max-height: calc(100vh - 24px);
        padding: 18px;
        border-radius: 15px;
    }

    .plan-week-drawer-header {
        position: sticky;
        z-index: 3;
        top: -18px;
        margin: -18px -18px 0;
        padding: 14px 18px 12px;
        border-bottom: 1px solid #e2eaed;
        background: #ffffff;
    }

    .custom-calendar-header > .plan-week-targets-section--planner {
        margin-left: 0;
    }

    .plan-week-macro-grid {
        grid-template-columns: 1fr;
    }

    .plan-week-micronutrient-grid {
        grid-template-columns: 1fr;
    }

    .plan-week-macro-plate {
        width: 210px;
    }

    .plan-week-plate-stage {
        width: 210px;
        height: 195px;
    }

    .plan-week-plate-disc {
        width: 184px;
        height: 184px;
    }

    .plan-week-health-summary {
        padding: 0;
    }

    .plan-week-meal-times {
        padding: 0;
    }

    .plan-week-training-time {
        margin-right: 0;
        margin-left: 0;
        padding: 8px;
    }

    .plan-week-training-details {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .plan-week-training-settings {
        display: grid;
    }

    .plan-week-training-animation {
        width: 68px;
        height: 68px;
        transform: none;
    }

    .plan-week-training-intensity-column {
        grid-template-columns: minmax(0, 1fr) 68px;
    }

    .plan-week-training-intensity-column .plan-week-training-animation {
        margin-top: 7px;
    }

    .plan-week-training-time-row,
    .plan-week-training-intensity {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .plan-week-training-time-control {
        flex-wrap: wrap;
    }

    .plan-week-training-intensity-options {
        max-width: 100%;
    }

    .plan-week-training-intensity-options span {
        min-width: 0;
        padding-right: 7px;
        padding-left: 7px;
    }

    .plan-week-health-summary-content dl {
        grid-template-columns: 1fr;
    }

    .plan-week-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .plan-week-generate {
        width: 100%;
    }

    .plan-week-review-bar {
        width: 100%;
        margin: 8px 0 0;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .plan-week-review-meals {
        grid-auto-columns: minmax(260px, 86vw);
    }

    .plan-week-review-actions {
        justify-content: stretch;
    }

    .plan-week-review-actions button {
        flex: 1;
    }

    .plan-week-ai-badge > span {
        display: none;
    }

    .plan-week-ai-badge {
        width: 20px;
        padding: 5px;
    }
}

/* Desktop Plan Week opens as a non-modal right-side menu instead of a floating box. */
@media (min-width: 641px) {
    .plan-week-panel {
        position: fixed;
        z-index: 10020;
        top: var(--plan-week-drawer-top, 0);
        right: 0;
        bottom: 0;
        width: min(820px, calc(100vw - 24px));
        height: auto;
        max-height: none;
        padding: 16px 20px 24px;
        border: 0;
        border-left: 1px solid #dfe7ea;
        border-radius: 0;
        box-shadow: -10px 0 32px rgba(6, 25, 54, 0.18);
        overflow-x: hidden;
    }

    .plan-week-drawer-header {
        position: sticky;
        z-index: 3;
        top: -16px;
        margin: -16px -20px 0;
        padding: 14px 20px 12px;
        border-bottom: 1px solid #e2eaed;
        background: #ffffff;
    }

    .plan-week-form {
        width: 100%;
        min-width: 0;
        margin-top: 0;
    }

    .plan-week-form > *,
    .plan-week-section,
    .plan-week-targets-layout {
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    .plan-week-training-intensity {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }
}

@media (max-width: 420px) {
    .plan-week-meal-time-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .plan-week-trigger,
    .plan-week-event-action,
    .plan-week-review-progress span {
        transition: none;
    }
}

.plannerContainer {
    margin-top: 20px;
    margin-bottom: 20px;
}

/* Custom Calendar Header Styles */
.custom-calendar-header {
    max-width: 1100px;
    margin: 0 auto 20px auto;
    background: white;
    border-radius: 16px;
    padding: 20px 30px;
}

.calendar-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.planner-nutrition-summary {
    box-sizing: border-box;
    max-width: 1100px;
    margin: -6px auto 20px auto;
    border: 1px solid #5bb0bd;
    background: #ADCFD5;
    font-family: Manrope, Arial, sans-serif;
}

.fc-timeGridWeek-view .fc-scrollgrid-section-header .planner-nutrition-summary {
    max-width: none;
    margin: 0;
    border-left: 0;
    border-right: 0;
}

.fc-timeGridWeek-view .planner-nutrition-content {
    overflow-x: hidden;
    box-shadow: inset 1px 0 0 #76b9c3, inset -1px 0 0 #76b9c3;
}

.fc-timeGridWeek-view .planner-nutrition-day {
    box-sizing: border-box;
    min-width: 0;
}

.plannerContainer.day-view-active .calendar-toolbar-views > .planner-nutrition-summary {
    position: relative;
    max-width: none;
    margin: 0;
    border: 0;
    background: transparent;
    flex: 0 0 auto;
}

.plannerContainer.day-view-active .calendar-toolbar-views > .planner-nutrition-summary .planner-nutrition-toggle {
    width: auto;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    background: #ADCFD5;
    font-size: 14px;
    font-weight: 400;
}

.plannerContainer.day-view-active .calendar-toolbar-views > .planner-nutrition-summary .planner-nutrition-content {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 30;
    width: 210px;
    grid-template-columns: 1fr;
    background: #ffffff;
    border: 1px solid #dfe5e8;
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(6, 25, 54, 0.16);
    overflow: hidden;
}

.plannerContainer.day-view-active .calendar-toolbar-views > .planner-nutrition-summary .planner-nutrition-day {
    min-width: 0;
    padding: 12px 14px 10px;
    background: #ffffff;
    border-left: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 22px;
    row-gap: 12px;
}

.plannerContainer.day-view-active .calendar-toolbar-views > .planner-nutrition-summary .planner-nutrition-row {
    display: block;
    line-height: 1.15;
}

.plannerContainer.day-view-active .calendar-toolbar-views > .planner-nutrition-summary .planner-nutrition-row--primary {
    grid-column: 1 / -1;
}

.plannerContainer.day-view-active .calendar-toolbar-views > .planner-nutrition-summary .planner-nutrition-label {
    display: block;
    margin-bottom: 3px;
    color: #9aa3aa;
    font-size: 11px;
    font-weight: 400;
}

.plannerContainer.day-view-active .calendar-toolbar-views > .planner-nutrition-summary .planner-nutrition-value {
    display: block;
    color: #1f2933;
    font-size: 13px;
    font-weight: 500;
    text-align: left;
}

.planner-nutrition-toggle {
    width: 100%;
    min-height: 38px;
    border: 0;
    background: #ADCFD5;
    color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: Manrope, Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.planner-nutrition-chevron {
    width: 8px;
    height: 8px;
    border-right: 1px solid #8aaeb5;
    border-bottom: 1px solid #8aaeb5;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    margin-top: -4px;
}

.planner-nutrition-summary--expanded .planner-nutrition-chevron {
    transform: rotate(225deg);
    margin-top: 4px;
}

.planner-nutrition-content {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(7, minmax(120px, 1fr));
    overflow-x: auto;
}

.plannerContainer.day-view-active .planner-nutrition-content {
    grid-template-columns: minmax(220px, 1fr);
}

.planner-nutrition-day {
    box-sizing: border-box;
    min-width: 120px;
    padding: 8px 12px;
    border-left: 1px solid #76b9c3;
    background: #ffffff;
}

.planner-nutrition-day:first-child {
    border-left: 0;
}

.fc-timeGridWeek-view .planner-nutrition-day:first-child {
    border-left: 1px solid #76b9c3;
}

.fc-timeGridWeek-view .planner-nutrition-day:last-child {
    border-right: 1px solid #76b9c3;
    box-shadow: inset -1px 0 0 #76b9c3;
}

.planner-nutrition-day-type {
    width: 22px;
    height: 22px;
    margin-left: auto;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #277f8c;
    background: #e7f5f7;
}

.planner-nutrition-day-type:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.planner-activity-tooltip {
    position: fixed;
    z-index: 10050;
    width: max-content;
    max-width: 180px;
    padding: 5px 7px;
    border-radius: 5px;
    color: #ffffff;
    background: #233846;
    box-shadow: 0 4px 10px rgba(6, 25, 54, 0.2);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    pointer-events: none;
}

.planner-nutrition-label--with-day-type {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
}

.planner-nutrition-day-type-icon {
    width: 12px;
    height: 12px;
    background: currentColor;
    -webkit-mask: url('/images/planner/person-walking-solid-full.svg') center / contain no-repeat;
    mask: url('/images/planner/person-walking-solid-full.svg') center / contain no-repeat;
}

.planner-nutrition-day-type--active {
    color: #ad620c;
    background: #fff0d9;
}

.planner-nutrition-day-type--active .planner-nutrition-day-type-icon {
    -webkit-mask-image: url('/images/planner/fire.svg');
    mask-image: url('/images/planner/fire.svg');
    transform-origin: 50% 100%;
    animation: plan-week-fire-icon 900ms ease-in-out infinite alternate;
}

.planner-nutrition-day-label {
    color: #5a5a5a;
    font-size: 12px;
    font-weight: 600;
    line-height: 16px;
    margin-bottom: 4px;
}

.planner-nutrition-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    line-height: 1.7;
}

.planner-nutrition-row--primary {
    display: block;
    width: 100%;
    line-height: 1.25;
    margin-bottom: 8px;
}

.planner-nutrition-row--primary .planner-nutrition-label,
.planner-nutrition-row--primary .planner-nutrition-value {
    display: block;
    width: 100%;
    text-align: left;
}

.planner-nutrition-row--primary .planner-nutrition-label--with-day-type {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.planner-nutrition-label {
    color: #5b5b5b;
    font-size: 12px;
    font-weight: 400;
}

.planner-nutrition-value {
    color: #061936;
    font-size: 15px;
    font-weight: 500;
    text-align: right;
    white-space: nowrap;
}

.planner-nutrition-row--over-target .planner-nutrition-value {
    color: #e47b18 !important;
    font-weight: 700;
}

/* Date Navigation Container - Center: arrows + date display */
.date-navigation-container,
.calendar-date-nav-group {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    padding: 0;
    gap: 10px;
    width: auto;
    height: 38px;
    justify-content: center;
}

.date-text-container,
.calendar-date-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0;
    gap: 4px;
    height: 38px;
    flex: none;
    order: 1;
    flex-grow: 0;
}

.date-range-text,
.calendar-main-date {
    min-height: 18px;
    font-family: Arial, sans-serif;
    font-style: normal;
    font-weight: 700;
    font-size: 16px;
    line-height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #000000;
    flex: none;
    order: 0;
    flex-grow: 0;
    margin: 0;
}

/* Stabilize arrow positions per view — week varies most, others need less room */
.plannerContainer:not(.month-view-active):not(.year-view-active):not(.day-view-active) .calendar-main-date {
    min-width: 160px;
}

.plannerContainer.day-view-active .calendar-main-date {
    min-width: 110px;
}

.plannerContainer.month-view-active .calendar-main-date {
    min-width: 100px;
}

.week-indicator-text,
.calendar-week-indicator {
    min-width: 38px;
    height: 16px;
    font-family: Manrope, Arial, sans-serif;
    font-style: normal;
    font-weight: 500;
    font-size: 12px;
    line-height: 16px;
    display: flex;
    align-items: center;
    text-align: center;
    letter-spacing: -0.02em;
    color: #000000;
    opacity: 0.5;
    flex: none;
    order: 1;
    flex-grow: 0;
    margin: 0;
}

/* Arrow buttons */
.arrow-button-left,
.arrow-button-right,
.calendar-nav-btn {
    width: 24px;
    height: 24px;
    background: #5bb0bd;
    border-radius: 50px;
    border: none;
    flex: none;
    flex-grow: 0;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

.arrow-button-left,
.calendar-prev-btn {
    order: 0;
}

.arrow-button-right,
.calendar-next-btn {
    order: 2;
}

.arrow-button-left:hover,
.arrow-button-right:hover,
.calendar-nav-btn:hover {
    background: rgba(91, 176, 189, 0.85);
}

.arrow-button-left .arrow-icon,
.arrow-button-right .arrow-icon,
.calendar-nav-btn .arrow-icon,
.calendar-nav-btn svg {
    position: absolute;
    height: 24px;
    width: 14px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    flex-shrink: 0;
}

.arrow-button-left .arrow-icon path,
.arrow-button-right .arrow-icon path,
.calendar-nav-btn svg path {
    stroke: #ffffff;
    stroke-width: 2;
}

/* Right: View toggles + icon pill (grouped) */
.calendar-toolbar-views {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.calendar-view-icon-toggles {
    display: none;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 4px;
    min-height: 32px;
    box-sizing: border-box;
    background: #f2f2f2;
    border-radius: 80px;
    gap: 0;
}
.calendar-view-icon-toggles.show-icon-toggles {
    display: flex;
}

.calendar-icon-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    min-height: 32px;
    border: none;
    border-radius: 80px;
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease;
}

.calendar-icon-toggle-btn:hover:not(.active) {
    background: rgba(230, 230, 230, 0.5);
}

.calendar-icon-toggle-btn.active {
    background: #5bb0bd;
}

.calendar-icon-toggle-img {
    width: 16px;
    height: 16px;
    display: block;
    pointer-events: none;
}

.calendar-icon-toggle-btn.active .calendar-icon-toggle-img--ham {
    filter: brightness(0) invert(1);
}

.calendar-icon-toggle-btn:not(.active) .calendar-icon-toggle-img--cal {
    filter: brightness(0) opacity(0.55);
}

.calendar-icon-toggle-btn.active .calendar-icon-toggle-img--cal {
    filter: none;
}

/* Right: View toggles */
.calendar-view-toggles {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    row-gap: 6px;
    column-gap: 0;
    padding: 4px 6px;
    min-height: 32px;
    box-sizing: border-box;
    background: #f2f2f2;
    border-radius: 80px;
}

.view-toggle-btn.toggle-button {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    flex: 0 0 auto;
    padding: 8px 12px;
    gap: 10px;
    min-height: 32px;
    border-radius: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-toggle-btn.toggle-button .toggle-button-text {
    font-family: Montserrat, Arial, sans-serif;
    font-style: normal;
    font-weight: 500;
    font-size: 13px;
    line-height: 16px;
    display: flex;
    align-items: center;
    text-align: center;
    white-space: nowrap;
    color: #000000;
    opacity: 0.6;
}

.view-toggle-btn.toggle-button.active {
    min-height: 32px;
    background: #5bb0bd;
    border-radius: 25px;
    padding: 8px 12px;
}

.view-toggle-btn.toggle-button.active .toggle-button-text {
    color: #ffffff;
    opacity: 1;
}

.view-toggle-btn.toggle-button:hover:not(.active) {
    background: rgba(230, 230, 230, 0.5);
}

.toggle-divider {
    width: 12px;
    height: 0;
    opacity: 0.1;
    border: 1px solid #000000;
    transform: rotate(90deg);
    flex-shrink: 0;
}

/* Responsive styles for custom header */
@media (max-width: 768px) {
    .custom-calendar-header {
        padding: 16px 20px;
    }

    .calendar-header-content {
        flex-direction: column;
        align-items: stretch;
    }

    .calendar-date-nav-group,
    .date-navigation-container {
        justify-content: center;
        width: auto;
    }

    .plannerContainer:not(.month-view-active):not(.year-view-active) .calendar-main-date {
        min-width: 140px;
    }

    .calendar-toolbar-views {
        justify-content: center;
        align-self: center;
        width: auto;
    }

    .calendar-view-toggles {
        justify-content: center;
        align-self: center;
        width: auto;
        min-width: 200px;
    }

    .view-toggle-btn.toggle-button .toggle-button-text {
        font-size: 12px;
    }

    .calendar-main-date {
        font-size: 14px;
    }

    .calendar-week-indicator {
        font-size: 11px;
    }

    .calendar-nav-btn {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 480px) {
    .calendar-main-date {
        font-size: 13px;
    }

    .calendar-toolbar-views {
        justify-content: center;
        align-self: center;
        width: auto;
    }

    .calendar-view-toggles {
        width: auto;
        min-width: 180px;
    }

    .view-toggle-btn.toggle-button .toggle-button-text {
        font-size: 11px;
    }

    .calendar-nav-btn {
        width: 24px;
        height: 24px;
    }

    .calendar-nav-btn svg {
        width: 14px;
        height: 14px;
    }
}

/* Week Navigation Styles - Hide old navigation since we have custom header */
.week-navigation {
    display: none !important;
}

.date-text {
    font-family: Arial, sans-serif;
    font-weight: 600;
    font-size: 18px;
    color: #333;
}

/* Subtle indicator during background revalidation (stale-while-revalidate) */
.planner-revalidating .fc-timegrid-body,
.planner-revalidating .fc-daygrid-body {
    opacity: 0.6;
    transition: opacity 0.15s ease;
}

/* Make calendar headers look clickable */
.fc-col-header-cell {
    transition: all 0.2s;
}

.fc-col-header-cell:not(.current-day):hover {
    background-color: #5bb0bd !important;
    color: white !important;
    cursor: pointer;
    opacity: 0.7;
}

.fc-col-header-cell:not(.current-day):hover .fc-day-header-content,
.fc-col-header-cell:not(.current-day):hover .fc-day-header-content * {
    color: white !important;
}

/* Keep current-day styling even on hover */
.fc-col-header-cell.current-day {
    cursor: pointer;
}

.fc-col-header-cell.current-day:hover {
    opacity: 0.9;
}

#calendar {
    max-width: 1100px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    padding: 0 20px 20px;
}

/* Thinner, modern scrollbar for calendar and its scrollable areas */
#calendar,
#calendar * {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

#calendar *::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

#calendar *::-webkit-scrollbar-track {
    background: transparent;
}

#calendar *::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

#calendar *::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.35);
}

#calendar *::-webkit-scrollbar-corner {
    background: transparent;
}

/* Hide header toolbar completely */
.fc-header-toolbar {
    display: none !important;
}

/* Hide all-day slot area only in day/week (timeGrid) view - do NOT hide in month view */
.fc-timegrid .fc-daygrid-body {
    display: none !important;
}
 
.fc-timegrid .fc-scrollgrid-section-header .fc-daygrid {
    display: none !important;
}
 
/* Hide the week day headers (thead) in day view only - show them in week view */
.fc-timeGridDay-view .fc-col-header {
    display: none !important;
}
 
.fc-timeGridDay-view .fc-scrollgrid-section.fc-scrollgrid-section-header {
    display: none !important;
}

/* Hide the timegrid divider row */
.fc-scrollgrid-section:has(.fc-timegrid-divider) {
    display: none !important;
}

/* Day header styling - cleaner look */
.fc-col-header-cell {
    background-color: transparent;
    border: none !important;
    padding: 12px 8px;
    text-align: center;
    font-weight: 500;
    color: #6b7280;
    margin: 0;
}

.fc-col-header {
    border: none !important;
}

.fc-timegrid-axis {
    border: none !important;
}

.fc-scrollgrid-sync-inner {
    padding: 6px 0;
}

.fc-col-header-cell:first-child {
    border-radius: 0;
}

.fc-col-header-cell:last-child {
    border-radius: 0;
}

.fc-col-header-cell.fc-day-header {
    font-size: 0.9em;
    font-weight: 600;
}

/* Time grid styling - cleaner lines */
.fc-timegrid-slot {
    border-bottom: none !important;
    height: 125px !important;
}

.fc-timegrid-slot.fc-slot-major {
    border-bottom: none !important;
}

.fc-timegrid-slot-label {
    font-size: 14px;
    color: #6b7280;
    padding: 4px 12px;
    font-weight: 500;
    vertical-align: top;
    padding-top: 0;
}

.fc .fc-timegrid-slot-label {
    vertical-align: top;
}

.fc-direction-ltr .fc-timegrid-slot-label-frame {
    margin-top: -10px;
    text-align: left;
}

.fc-timegrid-slots {
    margin-top: 0px;
    margin-bottom: 8px;
    padding-top: 4px;
}

#calendar .fc-timegrid-slots table {
    margin-top: 6px;
}

/* Event styling - Modern card design */
.fc-event {
    border-radius: 12px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    margin: 2px 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    /* Scoped to specific visual properties only.
       The previous `transition: all 0.2s ease` animated every property change,
       so whenever the overlap-reposition logic in planner.js wrote a new height,
       transform, or display style the browser tried to animate the change. With
       many overlapping events the result read as flicker/jitter on hover. */
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.fc-event:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

/* Suppress the :hover lift everywhere in week view.
   ──────────────────────────────────────────────────────────────────────────
   Confirmed via debug logs (`STACK pill mouseenter / mouseleave` toggling
   ~50x/sec at fixed cursor position): when two events overlap the same
   pixel column (e.g. a `fc-week-tall` `Strom Nordic Spa` long card and a
   `fc-week-tall` `Corps complet` long card on the same day, or any two
   harnesses sharing a vertical range), the 1-px translateY lift on the
   hovered element moves it OUT from under the cursor. The browser then
   resolves :hover on the other element below, which lifts itself and
   re-exposes the first — an infinite mouseenter/mouseleave flicker loop.
   Scoping the override to `.fc-overlap-group` alone (previous fix) wasn't
   enough because non-stack overlaps (two `fc-week-tall` cards sharing a
   column) hit the same loop.
   The box-shadow change on hover already gives the user a clear visual
   "I'm hovering" cue, so removing the transform costs us nothing. */
.fc-timeGridWeek-view .fc-event:hover {
    transform: none;
}

.fc-event-title {
    font-weight: 600;
    font-size: 15px;
}

/* Category label styling for calendar events */
.fc-event-category-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    opacity: 0.9;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Main title styling when category label is present */
.fc-event-title-container {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
    gap: 4px;
}

.fc-event-category-label + .fc-event-title {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Custom event colors using the specified color scheme */
.fc-event.consultation-event {
    background: #B7DCFF;
    color: #10152C;
    border: none;
    border-radius: 10px;
    /* Drop the inherited .fc-event box-shadow — at overlapping time slots the shadow
       from a sibling event would otherwise bleed across the consultation card as a
       faint horizontal line. */
    box-shadow: none;
    position: relative;
    z-index: 2;
}

/* Consultation card — vertical layout to match the 300px × 124px footprint of the
   recipe/workout cards. Top: eyebrow + title. Bottom: duration + JOIN button row.
   Carries its own background so the 124px content is fully blue even when the harness
   slot is shorter (e.g. a 30-min event in a 30px-tall slot). */
.fc-event.consultation-event .fc-consultation-event-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    gap: 8px;
    padding: 12px;
    height: 100%;
    min-height: 124px;
    box-sizing: border-box;
    background: #B7DCFF;
    border-radius: 10px;
    width: 300px;
    min-width: 300px;
    max-width: 300px;
}

.fc-consultation-event-card .fc-cons-text-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 0;
    flex: 1 1 auto;
}

.fc-consultation-event-card .fc-cons-eyebrow {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 10px;
    line-height: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #000000;
}

.fc-consultation-event-card .fc-cons-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 17px;
    text-transform: capitalize;
    color: #10152C;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
    max-width: 100%;
}

.fc-consultation-event-card .fc-cons-right-group {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
    width: 100%;
}

.fc-consultation-event-card .fc-cons-duration {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    font-size: 10px;
    line-height: 12px;
    color: #000000;
}

.fc-consultation-event-card .fc-cons-duration svg {
    width: 12px;
    height: 12px;
    stroke: #000000;
    flex: 0 0 auto;
}

.fc-consultation-event-card .fc-cons-join-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    background: #1A8FFF;
    color: #FFFFFF;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 12px;
    line-height: 15px;
    text-transform: uppercase;
    border: none;
    border-radius: 35px;
    cursor: pointer;
    white-space: nowrap;
}

.fc-consultation-event-card .fc-cons-join-btn:hover {
    background: #1380e6;
}

.fc-event.note-event {
    background-color: #5bb0bd;
    border-color: #5bb0bd;
    color: white;
}

.fc-event.workout-event {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #374151 !important;
    border: none !important;
}

/* Variants of workout-event: keep shared layout/title rules above, override background only.
   Listed AFTER .workout-event so they win on equal-specificity selectors. */
.fc-event.workout-event.nutrition-video-event {
    background: #F0F1F5 !important;
    color: #5C6470 !important;
}

.fc-event.workout-event.challenge-event {
    background: #EEE3ED !important;
    color: #6B5374 !important;
}

.fc-event.workout-event.wellness-rebate-event {
    background: #FFF2DF !important;
    color: #B07A2C !important;
}

.fc-event.recipe-event {
    background: rgba(245, 243, 240, 1);
    color: #000000 !important;
    border: none !important;
}

/* A newly added recipe is visible immediately while its POST is in flight. */
.fc-event.planner-event-pending {
    cursor: progress !important;
    opacity: 0.68;
    pointer-events: none;
}

.fc-event.recipe-event.fc-event-selected,
.fc-event.recipe-event:active,
.fc-event.recipe-event:focus,
.fc-event.recipe-event.clicked {
    border: none !important;
}

/* Notes event styling */
.fc-event.notes-event {
    background-color: #FCEBAD;
    border: none !important;
    border-radius: 8px;
    overflow: hidden;
}

.fc-event.notes-event.fc-event-selected,
.fc-event.notes-event:active,
.fc-event.notes-event:focus,
.fc-event.notes-event.clicked {
border: none !important;
}

/* Note card - large (>30 min) */
.fc-note-event-card {
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
    font-family: Montserrat, -apple-system, Roboto, Helvetica, sans-serif;
}

.fc-note-header {
    color: rgba(162, 116, 0, 1);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 0;
    line-height: 1.4;
}

.fc-note-content {
    color: rgba(16, 21, 44, 1);
    font-size: 14px;
    font-weight: 400;
    margin: 0;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

/* Note card - medium (15-30 min) */
.fc-note-card-medium {
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
    gap: 2px;
    font-family: Montserrat, -apple-system, Roboto, Helvetica, sans-serif;
}

.fc-note-medium-label {
    color: rgba(162, 116, 0, 1);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.fc-note-medium-title {
    color: rgba(16, 21, 44, 1);
    font-size: 12px;
    font-weight: 400;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Note card - compact (<=15 min) */
.fc-note-compact-card {
    padding: 8px 12px;
    display: flex;
    align-items: start;
    height: 100%;
    box-sizing: border-box;
    gap: 2px;
    font-family: Montserrat, -apple-system, Roboto, Helvetica, sans-serif;
}

.fc-note-compact-title {
    color: rgba(0, 0, 0, 1);
    font-size: 10px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Hide time text in workout, recipe, and notes events */
.fc-event.workout-event .fc-event-time,
.fc-event.recipe-event .fc-event-time,
.fc-event.notes-event .fc-event-time {
    display: none !important;
}

/* Allow events to appear side by side in the same time slot */
.fc-timegrid-event-harness {
    margin-right: 2px !important;
}

.fc-timegrid-event-harness:has(.recipe-event),
.fc-timegrid-event-harness:has(.workout-event),
.fc-timegrid-event-harness:has(.notes-event) {
    width: 300px !important;
}

/* Consultation card uses the same harness width as recipe/workout/notes so it sits as
   a single 300px column rather than stretching across the full day. */
.fc-timegrid-event-harness:has(.consultation-event) {
    width: 300px !important;
}

/* Ensure workout, recipe, and notes events have proper title styling */
.fc-event.workout-event .fc-event-title,
.fc-event.recipe-event .fc-event-title,
.fc-event.notes-event .fc-event-title {
    font-weight: 300;
    padding: 4px;
    text-align: center;
    display: flex;
    align-items: center;
    font-size: 14px;
    height: 100%;
}

/* Day calendar event title styling - not centered */
#dayCalendar .fc-event.workout-event .fc-event-title,
#dayCalendar .fc-event.recipe-event .fc-event-title,
#dayCalendar .fc-event.notes-event .fc-event-title {
    text-align: left;
    justify-content: flex-start;
    height: auto;
}

/* Day view specific styling for workout and recipe events */
#dayCalendar .fc-event.workout-event {
    background-color: #eceee3 !important;
    color: #667558 !important;
    border: none !important;
}

#dayCalendar .fc-event.workout-event.nutrition-video-event {
    background-color: #F0F1F5 !important;
    color: #5C6470 !important;
}

#dayCalendar .fc-event.workout-event.challenge-event {
    background-color: #EEE3ED !important;
    color: #6B5374 !important;
}

#dayCalendar .fc-event.workout-event.wellness-rebate-event {
    background-color: #FFF2DF !important;
    color: #B07A2C !important;
}

/* Inner card backgrounds — the JS sets the OUTER fc-event color, but the workout layout
   wraps the content in .fc-workout-content / .fc-workout-card-medium / .fc-workout-compact-card,
   each of which has its own #EDEEE3 background hardcoded above. Override them per variant. */
#calendar .fc-event.workout-event.nutrition-video-event .fc-workout-content,
#calendar .fc-event.workout-event.nutrition-video-event .fc-workout-card-medium,
#calendar .fc-event.workout-event.nutrition-video-event .fc-workout-compact-card,
#dayCalendar .fc-event.workout-event.nutrition-video-event .fc-workout-content,
#dayCalendar .fc-event.workout-event.nutrition-video-event .fc-workout-card-medium,
#dayCalendar .fc-event.workout-event.nutrition-video-event .fc-workout-compact-card {
    background: #F0F1F5 !important;
}

#calendar .fc-event.workout-event.challenge-event .fc-workout-content,
#calendar .fc-event.workout-event.challenge-event .fc-workout-card-medium,
#calendar .fc-event.workout-event.challenge-event .fc-workout-compact-card,
#dayCalendar .fc-event.workout-event.challenge-event .fc-workout-content,
#dayCalendar .fc-event.workout-event.challenge-event .fc-workout-card-medium,
#dayCalendar .fc-event.workout-event.challenge-event .fc-workout-compact-card {
    background: #EEE3ED !important;
}

#calendar .fc-event.workout-event.wellness-rebate-event .fc-workout-content,
#calendar .fc-event.workout-event.wellness-rebate-event .fc-workout-card-medium,
#calendar .fc-event.workout-event.wellness-rebate-event .fc-workout-compact-card,
#dayCalendar .fc-event.workout-event.wellness-rebate-event .fc-workout-content,
#dayCalendar .fc-event.workout-event.wellness-rebate-event .fc-workout-card-medium,
#dayCalendar .fc-event.workout-event.wellness-rebate-event .fc-workout-compact-card {
    background: #FFF2DF !important;
}

#dayCalendar .fc-event.recipe-event {
    background-color: rgba(245, 243, 240, 1) !important;
    color: #000000 !important;
    border: none !important;
}

#dayCalendar .fc-event.recipe-event.fc-event-selected,
#dayCalendar .fc-event.recipe-event:active,
#dayCalendar .fc-event.recipe-event:focus,
#dayCalendar .fc-event.recipe-event.clicked {
    border: none !important;
}

#dayCalendar .fc-event.notes-event {
    background-color: #FCEBAD !important;
    border: none !important;
    border-radius: 8px;
}

#dayCalendar .fc-event.notes-event.fc-event-selected,
#dayCalendar .fc-event.notes-event:active,
#dayCalendar .fc-event.notes-event:focus,
#dayCalendar .fc-event.notes-event.clicked {
    border: none !important;
}

#dayCalendar .fc-event.workout-event .fc-event-time,
#dayCalendar .fc-event.recipe-event .fc-event-time,
#dayCalendar .fc-event.notes-event .fc-event-time {
    display: none !important;
}

/* Recipe card layout inside calendar events (main calendar + day calendar) */
#calendar .fc-event.recipe-event .fc-recipe-event-card,
#dayCalendar .fc-event.recipe-event .fc-recipe-event-card {
    display: flex;
    width: 300px;
    min-width: 300px;
    height: 100%;
    min-height: 0;
    position: relative;
}

#calendar .fc-event.recipe-event .fc-recipe-content,
#dayCalendar .fc-event.recipe-event .fc-recipe-content {
    border-radius: 8px;
    background-color: #f5f3f0;
    display: flex;
    width: 300px;
    min-width: 300px;
    min-height: 124px;
    padding-right: 9px;
    align-items: stretch;
    gap: 10px;
    overflow: hidden;
    height: 100%;
    flex: 1;
}

#calendar .fc-event.recipe-event .fc-recipe-portion-badge,
#dayCalendar .fc-event.recipe-event .fc-recipe-portion-badge,
.fc-week-event-ghost .fc-recipe-portion-badge {
    position: absolute;
    top: 5px;
    right: 7px;
    z-index: 2;
    color: #667558;
    font-family: Montserrat, -apple-system, sans-serif;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
    pointer-events: none;
}

#calendar .fc-event.recipe-event .fc-recipe-image,
#dayCalendar .fc-event.recipe-event .fc-recipe-image {
    width: 121px;
    min-width: 121px;
    height: 124px;
    object-fit: cover;
    object-position: center;
    border-radius: 8px 0 0 8px;
    flex-shrink: 0;
    display: block;
}

#calendar .fc-event.recipe-event .fc-recipe-details,
#dayCalendar .fc-event.recipe-event .fc-recipe-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    flex: 1 1 0;
    height: 124px;
    min-width: 0;
    max-width: calc(300px - 121px - 10px - 9px);
    padding: 12px 12px 12px 0;
    gap: 2px;
}

#calendar .fc-event.recipe-event .fc-recipe-info,
#dayCalendar .fc-event.recipe-event .fc-recipe-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#calendar .fc-event.recipe-event .fc-recipe-label,
#dayCalendar .fc-event.recipe-event .fc-recipe-label {
    font-family:
        Montserrat,
        -apple-system,
        sans-serif;
    font-weight: 500;
    font-size: 10px;
    line-height: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #667558;
    display: block;
    margin: 0;
}

#calendar .fc-event.recipe-event .fc-recipe-title,
#dayCalendar .fc-event.recipe-event .fc-recipe-title {
    font-family:
        Montserrat,
        -apple-system,
        sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 17px;
    text-transform: capitalize;
    color: #10152c;
    margin: 0;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    word-break: break-word;
}

#calendar .fc-event.recipe-event .fc-portion-info,
#dayCalendar .fc-event.recipe-event .fc-portion-info {
    display: flex;
    align-items: center;
    gap: 4px;
}

#calendar .fc-event.recipe-event .fc-portion-text,
#dayCalendar .fc-event.recipe-event .fc-portion-text {
    font-family:
        Montserrat,
        -apple-system,
        sans-serif;
    font-weight: 400;
    font-size: 10px;
    line-height: 12px;
    text-transform: capitalize;
    color: #000000;
    margin: 0;
}

#calendar .fc-event.recipe-event .fc-portion-icon,
#dayCalendar .fc-event.recipe-event .fc-portion-icon {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    color: #000000;
}

#calendar .fc-event.recipe-event .fc-event-main,
#calendar .fc-event.recipe-event .fc-event-main-frame,
#dayCalendar .fc-event.recipe-event .fc-event-main,
#dayCalendar .fc-event.recipe-event .fc-event-main-frame {
    overflow: hidden;
    height: 100%;
    border-radius: 8px;
}

/* ===== RECIPE DURATION TIERS ===== */

/* Compact recipe card (≤15min) - small thumbnail + title */
#calendar .fc-event.recipe-event .fc-recipe-compact-card,
#dayCalendar .fc-event.recipe-event .fc-recipe-compact-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 4px 12px 4px 4px;
    gap: 8px;
    background: #F5F3F0;
    border-radius: 8px;
    overflow: hidden;
    height: 100%;
    position: relative;
}

#calendar .fc-event.recipe-event .fc-recipe-compact-title,
#dayCalendar .fc-event.recipe-event .fc-recipe-compact-title {
    font-family: 'Montserrat', -apple-system, sans-serif;
    font-style: normal;
    font-weight: 500;
    font-size: 10px;
    line-height: 12px;
    color: #000000;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 42px;
}

/* Medium recipe card (30min) - small thumbnail + label + title */
#calendar .fc-event.recipe-event .fc-recipe-card-medium,
#dayCalendar .fc-event.recipe-event .fc-recipe-card-medium {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 8px 12px 8px 8px;
    gap: 10px;
    background: #F5F3F0;
    border-radius: 8px;
    overflow: hidden;
    height: 100%;
    position: relative;
}

#calendar .fc-event.recipe-event .fc-recipe-card-medium .fc-recipe-medium-text,
#dayCalendar .fc-event.recipe-event .fc-recipe-card-medium .fc-recipe-medium-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    flex: 1;
    min-width: 0;
    padding-right: 42px;
}

/* Small rounded thumbnail used in the ≤30min recipe tiers.
   Spec: 35×36, border-radius 30. The image (and its no-image fallback)
   shrinks to fit very short slots so 15-min events can still render. */
#calendar .fc-event.recipe-event .fc-recipe-thumb,
#dayCalendar .fc-event.recipe-event .fc-recipe-thumb {
    width: 35px;
    height: 36px;
    max-height: 100%;
    border-radius: 30px;
    object-fit: cover;
    object-position: center;
    flex-shrink: 0;
    display: block;
    opacity: 1;
}

#calendar .fc-event.recipe-event .fc-recipe-thumb.fc-event-no-image,
#dayCalendar .fc-event.recipe-event .fc-recipe-thumb.fc-event-no-image {
    background: #d9d9d9 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    object-fit: unset !important;
    border-radius: 30px;
    padding: 4px !important;
    box-sizing: border-box !important;
}

/* Compact (≤15min) slots are only ~31px tall — shrink the thumb so it fits
   without being clipped, while keeping the rounded shape. */
#calendar .fc-event.recipe-event .fc-recipe-compact-card .fc-recipe-thumb,
#dayCalendar .fc-event.recipe-event .fc-recipe-compact-card .fc-recipe-thumb {
    width: 20px;
    height: 20px;
}

#calendar .fc-event.recipe-event .fc-recipe-medium-label,
#dayCalendar .fc-event.recipe-event .fc-recipe-medium-label {
    font-family: 'Montserrat', -apple-system, sans-serif;
    font-weight: 500;
    font-size: 10px;
    line-height: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #667558;
    margin: 0;
}

#calendar .fc-event.recipe-event .fc-recipe-medium-title,
#dayCalendar .fc-event.recipe-event .fc-recipe-medium-title {
    font-family: 'Montserrat', -apple-system, sans-serif;
    font-weight: 500;
    font-size: 12px;
    line-height: 15px;
    text-transform: capitalize;
    color: #10152c;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Large recipe card (45min) - image + label + title, no portion */
#calendar .fc-event.recipe-event .fc-recipe-card-large .fc-recipe-content,
#dayCalendar .fc-event.recipe-event .fc-recipe-card-large .fc-recipe-content {
    min-height: auto;
}

#calendar .fc-event.recipe-event .fc-recipe-card-large .fc-recipe-image,
#dayCalendar .fc-event.recipe-event .fc-recipe-card-large .fc-recipe-image {
    height: 100%;
    max-height: 90px;
}

#calendar .fc-event.recipe-event .fc-recipe-main-card .fc-recipe-content,
#dayCalendar .fc-event.recipe-event .fc-recipe-main-card .fc-recipe-content {
    width: 100%;
    min-width: 0;
    padding-right: 0;
    gap: 0;
    flex-direction: column;
}

#calendar .fc-event.recipe-event .fc-recipe-main-card .fc-recipe-image,
#dayCalendar .fc-event.recipe-event .fc-recipe-main-card .fc-recipe-image,
#calendar .fc-event.recipe-event .fc-recipe-card-large.fc-recipe-main-card .fc-recipe-image,
#dayCalendar .fc-event.recipe-event .fc-recipe-card-large.fc-recipe-main-card .fc-recipe-image {
    width: 100%;
    min-width: 0;
    height: 72px;
    max-height: 72px;
    border-radius: 8px 8px 0 0;
}

#calendar .fc-event.recipe-event .fc-recipe-main-card .fc-recipe-details,
#dayCalendar .fc-event.recipe-event .fc-recipe-main-card .fc-recipe-details {
    width: 100%;
    max-width: none;
    height: auto;
    min-height: 0;
    padding: 6px 10px 8px;
    justify-content: flex-start;
}

#calendar .fc-event.recipe-event .fc-recipe-main-card .fc-recipe-info,
#dayCalendar .fc-event.recipe-event .fc-recipe-main-card .fc-recipe-info {
    width: 100%;
    flex: 0 1 auto;
}

#calendar .fc-event.recipe-event .fc-recipe-main-card .fc-recipe-title,
#dayCalendar .fc-event.recipe-event .fc-recipe-main-card .fc-recipe-title {
    -webkit-line-clamp: 2;
}

#calendar .fc-event.recipe-event .fc-recipe-card-medium.fc-recipe-main-card,
#dayCalendar .fc-event.recipe-event .fc-recipe-card-medium.fc-recipe-main-card {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
}

#calendar .fc-event.recipe-event .fc-recipe-card-medium.fc-recipe-main-card .fc-recipe-thumb,
#dayCalendar .fc-event.recipe-event .fc-recipe-card-medium.fc-recipe-main-card .fc-recipe-thumb {
    width: 100%;
    height: 36px;
    max-height: 36px;
    border-radius: 8px 8px 0 0;
}

#calendar .fc-event.recipe-event .fc-recipe-card-medium.fc-recipe-main-card .fc-recipe-medium-text,
#dayCalendar .fc-event.recipe-event .fc-recipe-card-medium.fc-recipe-main-card .fc-recipe-medium-text {
    padding: 4px 8px 6px;
}

#calendar .fc-event.recipe-event .fc-recipe-card-medium.fc-recipe-main-card .fc-recipe-medium-title,
#dayCalendar .fc-event.recipe-event .fc-recipe-card-medium.fc-recipe-main-card .fc-recipe-medium-title {
    -webkit-line-clamp: 1;
}

/* ===== WORKOUT DURATION TIERS ===== */

/* Compact workout card (≤15min) - small thumbnail + title */
#calendar .fc-event.workout-event .fc-workout-compact-card,
#dayCalendar .fc-event.workout-event .fc-workout-compact-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 4px 12px 4px 4px;
    gap: 8px;
    background: #EDEEE3;
    border-radius: 8px;
    overflow: hidden;
    height: 100%;
}

#calendar .fc-event.workout-event .fc-workout-compact-title,
#dayCalendar .fc-event.workout-event .fc-workout-compact-title {
    font-family: 'Montserrat', -apple-system, sans-serif;
    font-style: normal;
    font-weight: 500;
    font-size: 10px;
    line-height: 12px;
    color: #000000;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Medium workout card (30min) - small thumbnail + label + title */
#calendar .fc-event.workout-event .fc-workout-card-medium,
#dayCalendar .fc-event.workout-event .fc-workout-card-medium {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 8px 12px 8px 8px;
    gap: 10px;
    background: #EDEEE3;
    border-radius: 8px;
    overflow: hidden;
    height: 100%;
}

#calendar .fc-event.workout-event .fc-workout-card-medium .fc-workout-medium-text,
#dayCalendar .fc-event.workout-event .fc-workout-card-medium .fc-workout-medium-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

/* Small rounded thumbnail used in the ≤30min workout tiers (also covers
   nutrition videos, challenges, and wellness rebates which share these cards).
   Spec: 35×36, border-radius 30. Shrinks to fit very short slots so 15-min
   events can still render. */
#calendar .fc-event.workout-event .fc-workout-thumb,
#dayCalendar .fc-event.workout-event .fc-workout-thumb {
    width: 35px;
    height: 36px;
    max-height: 100%;
    border-radius: 30px;
    object-fit: cover;
    object-position: center;
    flex-shrink: 0;
    display: block;
    opacity: 1;
}

#calendar .fc-event.workout-event .fc-workout-thumb.fc-event-no-image,
#dayCalendar .fc-event.workout-event .fc-workout-thumb.fc-event-no-image {
    background: #d9d9d9 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    object-fit: unset !important;
    border-radius: 30px;
    padding: 4px !important;
    box-sizing: border-box !important;
}

/* Compact (≤15min) slots are only ~31px tall — shrink the thumb so it fits
   without being clipped, while keeping the rounded shape. */
#calendar .fc-event.workout-event .fc-workout-compact-card .fc-workout-thumb,
#dayCalendar .fc-event.workout-event .fc-workout-compact-card .fc-workout-thumb {
    width: 20px;
    height: 20px;
}

#calendar .fc-event.workout-event .fc-workout-medium-label,
#dayCalendar .fc-event.workout-event .fc-workout-medium-label {
    font-family: 'Montserrat', -apple-system, sans-serif;
    font-weight: 500;
    font-size: 10px;
    line-height: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #667558;
    margin: 0;
}

#calendar .fc-event.workout-event .fc-workout-medium-title,
#dayCalendar .fc-event.workout-event .fc-workout-medium-title {
    font-family: 'Montserrat', -apple-system, sans-serif;
    font-weight: 500;
    font-size: 12px;
    line-height: 15px;
    text-transform: capitalize;
    color: #10152c;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Large workout card (45min) - image + label + title, no duration */
#calendar .fc-event.workout-event .fc-workout-card-large .fc-workout-content,
#dayCalendar .fc-event.workout-event .fc-workout-card-large .fc-workout-content {
    min-height: auto;
}

#calendar .fc-event.workout-event .fc-workout-card-large .fc-workout-image,
#dayCalendar .fc-event.workout-event .fc-workout-card-large .fc-workout-image {
    height: 100%;
    max-height: 90px;
}

/* Workout card layout inside calendar events (same pattern as recipe card) */
#calendar .fc-event.workout-event .fc-workout-event-card,
#dayCalendar .fc-event.workout-event .fc-workout-event-card {
    display: flex;
    width: 300px;
    min-width: 300px;
    max-width: 300px;
    height: 100%;
    min-height: 0;
}

#calendar .fc-event.workout-event .fc-workout-content,
#dayCalendar .fc-event.workout-event .fc-workout-content {
    border-radius: 8px;
    background-color: rgba(236, 238, 227, 1);
    display: flex;
    width: 300px;
    min-width: 300px;
    max-width: 300px;
    min-height: 124px;
    padding-right: 9px;
    align-items: stretch;
    gap: 10px;
    overflow: hidden;
    height: 100%;
    flex: 1;
}

#calendar .fc-event.workout-event .fc-workout-image,
#dayCalendar .fc-event.workout-event .fc-workout-image {
    width: 124px;
    min-width: 124px;
    height: 124px;
    object-fit: cover;
    object-position: center;
    border-radius: 8px 0 0 8px;
    flex-shrink: 0;
    display: block;
}

#calendar .fc-event.workout-event .fc-workout-details,
#dayCalendar .fc-event.workout-event .fc-workout-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    flex: 1;
    min-width: 0;
    padding: 12px 12px 12px 0;
    gap: 8px;
}

/* Long workout / nutrition-video / challenge / wellness-rebate tier (>45min):
   cap the details column to the thumbnail height so the footer (duration
   text or offer pill) sits flush with the bottom of the thumbnail instead
   of floating at the bottom of the full card. The `.fc-workout-info`'s
   `flex: 1` then takes the remaining space, pushing the footer down to
   the 124-px row. Mirrors the recipe card pattern.
   Scoped with `:not(.fc-workout-card-large)` so the 30-45min "large"
   variant — which has no footer — keeps its natural height. */
#calendar .fc-event.workout-event .fc-workout-event-card:not(.fc-workout-card-large) .fc-workout-details,
#dayCalendar .fc-event.workout-event .fc-workout-event-card:not(.fc-workout-card-large) .fc-workout-details {
    height: 124px;
}

#calendar .fc-event.workout-event .fc-workout-info,
#dayCalendar .fc-event.workout-event .fc-workout-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#calendar .fc-event.workout-event .fc-workout-label,
#dayCalendar .fc-event.workout-event .fc-workout-label {
    font-family:
        Montserrat,
        -apple-system,
        sans-serif;
    font-weight: 500;
    font-size: 10px;
    line-height: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #667558;
    display: block;
    margin: 0;
}

#calendar .fc-event.workout-event .fc-workout-title,
#dayCalendar .fc-event.workout-event .fc-workout-title {
    font-family:
        Montserrat,
        -apple-system,
        sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 17px;
    text-transform: capitalize;
    color: #10152c;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    word-break: break-word;
}

#calendar .fc-event.workout-event .fc-workout-duration-section,
#dayCalendar .fc-event.workout-event .fc-workout-duration-section {
    display: flex;
    align-items: center;
    gap: 4px;
}

#calendar .fc-event.workout-event .fc-workout-clock-icon,
#dayCalendar .fc-event.workout-event .fc-workout-clock-icon {
    flex-shrink: 0;
    width: 12px;
    height: 12px;
    color: #000000;
}

#calendar .fc-event.workout-event .fc-workout-duration,
#dayCalendar .fc-event.workout-event .fc-workout-duration {
    font-family:
        Montserrat,
        -apple-system,
        sans-serif;
    font-weight: 400;
    font-size: 10px;
    line-height: 12px;
    color: #000000;
    margin: 0;
}

/* Offer pill that replaces the duration footer on WELLNESS_REBATE cards. Per Figma. */
#calendar .fc-event.workout-event .fc-workout-offer-pill,
#dayCalendar .fc-event.workout-event .fc-workout-offer-pill {
    box-sizing: border-box;
    display: inline-flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 5px 8px;
    background: #F3C000;
    border-radius: 45px;
    font-family: Montserrat, -apple-system, sans-serif;
    font-weight: 600;
    font-size: 12px;
    line-height: 15px;
    color: #10152C;
    align-self: flex-start;
    width: fit-content;
}

#calendar .fc-event.workout-event .fc-event-main,
#calendar .fc-event.workout-event .fc-event-main-frame,
#dayCalendar .fc-event.workout-event .fc-event-main,
#dayCalendar .fc-event.workout-event .fc-event-main-frame {
    overflow: hidden;
    height: 100%;
    border-radius: 8px;
}

/* Grid styling - Cleaner look */
/* Week view event pills. Content is pinned to the top so tall solo pills
   (e.g. a 1-hour workout) read like cards instead of vertically-centered
   labels. For the compact 33-px pill the 6-px top padding gives the same
   visual feel as centering a 22-px thumb. */
.fc-timeGridWeek-view .fc-week-pill {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 10px 6px 6px;
    border-radius: 8px;
    width: 100%;
    height: 33px;
    box-sizing: border-box;
    overflow: hidden;
    pointer-events: none;
    position: relative;
}

.fc-timeGridWeek-view .fc-week-pill.fc-week-pill--with-portion {
    padding-right: 46px;
}

.fc-timeGridWeek-view .fc-week-pill.fc-week-pill--with-portion .fc-week-pill-thumb {
    width: 22px;
    height: 22px;
}

.fc-timeGridWeek-view .fc-week-pill.fc-week-pill--with-portion .fc-week-pill-title {
    padding-right: 0;
}

.fc-timeGridWeek-view .fc-timegrid-event-harness.fc-week-solo:not(.fc-overlap-group) .fc-week-pill.fc-week-pill--with-portion {
    padding-right: 46px;
}

.fc-timeGridWeek-view .fc-timegrid-event-harness.fc-week-solo:not(.fc-overlap-group) .fc-week-pill.fc-week-pill--with-portion .fc-week-pill-thumb {
    width: 22px;
    height: 22px;
}

.fc-timeGridWeek-view .fc-timegrid-event-harness.fc-week-solo:not(.fc-overlap-group) .fc-week-pill.fc-week-pill--with-portion .fc-week-pill-title {
    padding-right: 0;
}

.fc-timeGridWeek-view .fc-week-pill-title {
    font-family: 'Montserrat', sans-serif;
    font-style: normal;
    font-weight: 500;
    font-size: 10px;
    line-height: 12px;
    color: #000000;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* When a pill lives inside a TALL solo harness (stretcher / >15-min event),
   the pill grows to fill the harness height via the `.fc-week-solo:not(
   .fc-overlap-group) .fc-week-pill { height: calc(100% - 2px) }` rule above.
   In that case there's vertical room to wrap the title onto multiple lines
   instead of clipping it with a single-line ellipsis. The pill's own
   `overflow: hidden` still clips any lines that don't fit, so the layout
   stays bounded by the harness height.
   The 33-px compact pills (.fc-overlap-group children, tied stacks, +N
   container compacts) keep the single-line ellipsis behavior from the
   base rule above. */
.fc-timeGridWeek-view .fc-timegrid-event-harness.fc-week-solo:not(.fc-overlap-group) .fc-week-pill-title {
    white-space: normal;
    text-overflow: clip;
    word-break: break-word;
}

/* Reserve breathing room at the bottom of tall pills so a wrapped title's
   last line doesn't get jammed against the bottom edge (e.g. a 4-line
   "Welcome to KoalaPro Premium:" used to clip the final line flush with
   the pill border). Padding shrinks the title's content area, so any
   overflowing line clips cleanly above the reserved space rather than
   bleeding into the bottom edge.
   Scoped to TALL solo pills only — the 33-px compact pills already keep
   their text on a single line and don't need the extra padding. */
.fc-timeGridWeek-view .fc-timegrid-event-harness.fc-week-solo:not(.fc-overlap-group) .fc-week-pill {
    padding-bottom: 12px;
}

/* Small rounded thumbnail used inside week-view pills for recipe / workout
   events (workout includes nutrition videos, challenges, wellness rebates).
   Sized to fit inside the 33-px pill while staying close to the day-view
   thumb language. */
.fc-timeGridWeek-view .fc-week-pill-thumb {
    width: 22px;
    height: 22px;
    border-radius: 30px;
    object-fit: cover;
    object-position: center;
    flex-shrink: 0;
    display: block;
    opacity: 1;
}

.fc-timeGridWeek-view .fc-week-pill-thumb.fc-event-no-image {
    background: #d9d9d9 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    object-fit: unset !important;
    border-radius: 30px;
    padding: 3px !important;
    box-sizing: border-box !important;
}

/* AI recipe cards stack the thumbnail above the name. Approval stays at the
   menu level, so the only event overlay is the provenance badge. */
.fc-timeGridWeek-view .fc-event.ai-generated-event .fc-week-pill {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 6px 6px 6px 4px;
}

.fc-timeGridWeek-view .fc-event.ai-generated-event .fc-week-pill-thumb,
.fc-timeGridWeek-view .fc-event.ai-generated-event .fc-week-pill.fc-week-pill--with-portion .fc-week-pill-thumb {
    width: 28px;
    height: 28px;
}

.fc-timeGridWeek-view .fc-event.ai-generated-event .fc-week-pill-title {
    width: 100%;
    flex: 0 1 auto;
    padding: 0;
    white-space: normal;
    overflow: hidden;
    text-overflow: clip;
    word-break: normal;
    overflow-wrap: anywhere;
}

.fc-event.ai-generated-event .plan-week-ai-badge {
    position: absolute;
    top: auto;
    right: 4px;
    bottom: 4px;
    left: auto;
    margin: 0;
    pointer-events: none;
}

.fc-week-event-ghost.ai-generated-event .plan-week-ai-badge {
    top: auto;
    right: 4px;
    bottom: 4px;
    left: auto;
    width: 20px;
    padding: 5px;
}

.fc-week-event-ghost.ai-generated-event .plan-week-ai-badge > span {
    display: none;
}

/* Recipe restriction feedback is shown only on the expanded hover card. */
.planner-recipe-restriction-badge {
    position: absolute;
    right: 4px;
    bottom: 4px;
    z-index: 11;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    box-sizing: border-box;
    border: 2px solid #ffffff;
    border-radius: 50%;
    background: #cf3f35;
    color: #ffffff;
    font: 700 10px/1 Montserrat, Arial, sans-serif;
    box-shadow: 0 1px 4px rgba(91, 23, 18, 0.3);
    pointer-events: none;
}

#weekEventHoverTooltip .week-hover-card--recipe {
    position: relative;
}

#weekEventHoverTooltip .planner-recipe-restriction-badge--info {
    top: 7px;
    right: 35px;
    bottom: auto;
    cursor: default;
    pointer-events: auto;
}

.planner-recipe-restriction-details {
    box-sizing: border-box;
    width: 100%;
    margin: 8px 0 0;
    padding: 10px 11px;
    border: 1px solid #efaca6;
    border-radius: 8px;
    background: #fff4f2;
    color: #74251f;
    font-family: Montserrat, -apple-system, sans-serif;
}

.planner-recipe-restriction-heading {
    display: flex;
    align-items: center;
    gap: 7px;
}

.planner-recipe-restriction-heading-icon {
    display: inline-flex;
    flex: 0 0 18px;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #cf3f35;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.planner-recipe-restriction-heading strong {
    font-size: 11px;
    line-height: 15px;
}

.planner-recipe-restriction-details p {
    margin: 5px 0 0;
    color: inherit;
    font-size: 10px;
    line-height: 15px;
}

.planner-recipe-restriction-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 7px;
}

.planner-recipe-restriction-chip {
    display: inline-flex;
    padding: 3px 7px;
    border-radius: 999px;
    background: #f8d3cf;
    color: #812820;
    font-size: 9px;
    font-weight: 600;
    line-height: 13px;
}

.planner-recipe-restriction-chip--intolerance {
    background: #fee0bd;
    color: #7c4605;
}

.planner-recipe-restriction-details small {
    display: block;
    margin-top: 6px;
    color: inherit;
    font-size: 9px;
    line-height: 13px;
}

.recipe-details-section > .planner-recipe-restriction-details {
    margin: 12px 0;
}

#weekEventHoverTooltip .planner-recipe-restriction-details {
    position: absolute;
    top: 32px;
    right: 7px;
    z-index: 20;
    display: none;
    width: 215px;
    margin: 0;
    padding: 8px 9px;
    box-shadow: 0 5px 14px rgba(65, 24, 20, 0.16);
    pointer-events: none;
}

#weekEventHoverTooltip .week-hover-card--show-restriction > .planner-recipe-restriction-details {
    display: block;
}

#weekEventHoverTooltip .planner-recipe-restriction-details p,
#weekEventHoverTooltip .planner-recipe-restriction-details small {
    display: none;
}

#weekEventHoverTooltip .planner-recipe-restriction-chip-list {
    margin-top: 6px;
}

/* Delete is available from the expanded hover card, keeping the compact
   calendar tile clear. It remains an overlay and does not shift card content. */
#weekEventHoverTooltip .plan-week-event-action--delete {
    position: absolute;
    top: 7px;
    right: 7px;
    bottom: auto;
    z-index: 2;
    width: 20px;
    height: 20px;
    padding: 4px;
    background: #ffffff;
    color: #061936;
    pointer-events: auto;
}

#weekEventHoverTooltip .plan-week-event-action--delete img {
    width: 12px;
    height: 12px;
}

#weekEventHoverTooltip .week-hover-card--recipe .fc-recipe-info {
    box-sizing: border-box;
    padding-right: 24px;
}

/* "+N More" overflow pill — outlined card style (Figma "Frame 1618874037").
   Renders white with a thin grey border and bold black label so it reads as a
   neutral "more" affordance distinct from the colored event pills above it.
   Scoped to the week view; month view keeps its own .fc-daygrid-more-link rules.
   `background` needs !important to beat the unscoped `.fc-week-pill--more`
   default further down (#E5E5E4 !important, kept for month view). */
.fc-timeGridWeek-view .fc-week-pill--more {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 6px 12px;
    gap: 2px;
    height: 24px;
    background: #ffffff !important;
    border: 1px solid #CACACA;
    cursor: pointer;
}

.fc-timeGridWeek-view .fc-week-pill--more .fc-week-pill-title {
    align-self: stretch;
    font-family: 'Montserrat', sans-serif;
    font-style: normal;
    font-weight: 700;
    font-size: 10px;
    line-height: 12px;
    color: #000000;
}

/* Week view event — override FullCalendar's inline width, fix height to 33px (compact pill).
   Scoped to :not(.fc-week-solo) so a harness with no time-overlapping siblings keeps
   FullCalendar's natural duration-based height. */
.fc-timeGridWeek-view .fc-timegrid-event-harness:not(.fc-week-solo) {
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    height: 33px !important;
    bottom: auto !important;
    overflow: hidden !important;
}

.fc-timeGridWeek-view .fc-event {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* The unscoped variant rules (.fc-event.workout-event.nutrition-video-event,
   .challenge-event, .wellness-rebate-event, .recipe-event, .notes-event) set
   a tinted background on the .fc-event itself with !important — that's the
   day-view card color. In week view the .fc-event is the parent of the
   stacked .fc-week-pill rows, so any tint bleeds through the 6-px flex gap
   between pills and makes the stack read as one continuous tinted card.
   These selectors match the variant rules' 0,3,0 specificity (so !important
   ties on specificity and ordering wins) and force the parent background
   transparent so the actual column background shows through the gap. */
.fc-timeGridWeek-view .fc-event.workout-event.nutrition-video-event,
.fc-timeGridWeek-view .fc-event.workout-event.challenge-event,
.fc-timeGridWeek-view .fc-event.workout-event.wellness-rebate-event,
.fc-timeGridWeek-view .fc-event.workout-event,
.fc-timeGridWeek-view .fc-event.recipe-event,
.fc-timeGridWeek-view .fc-event.notes-event,
.fc-timeGridWeek-view .fc-event.consultation-event,
.fc-timeGridWeek-view .fc-event.meeting-event {
    background: transparent !important;
    background-color: transparent !important;
}

.fc-timeGridWeek-view .fc-timegrid-event-harness:not(.fc-week-solo) .fc-event {
    height: 33px !important;
}

/* Solo harness in week view: render at natural duration; pill fills available height.
   min-height keeps very short events readable. */
.fc-timeGridWeek-view .fc-timegrid-event-harness.fc-week-solo {
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    min-height: 33px;
    overflow: hidden;
}

.fc-timeGridWeek-view .fc-timegrid-event-harness.fc-week-solo .fc-event {
    height: 100% !important;
}

/* 1-px breathing room on the top and bottom of every TRUE solo pill (a single
   event card filling its natural duration) so stacked and overlay events read
   as separate cards instead of one continuous block. Combined with the
   harness-level 4-px gap from JS this gives a clear visible seam between
   adjacent events without needing an explicit border.
   The `:not(.fc-overlap-group)` scope is essential: tied-stack first harnesses
   carry both fc-week-solo AND fc-overlap-group, and their inner pills have
   their OWN fixed heights (33px compact pill, 24px "+N More" outline pill).
   Without the :not(), this rule's 0,4,0 specificity wins and stretches the
   "+more" pill to fill the container, pushing its top border outside the
   harness's overflow:hidden boundary. */
.fc-timeGridWeek-view .fc-timegrid-event-harness.fc-week-solo:not(.fc-overlap-group) .fc-week-pill {
    height: calc(100% - 2px);
    margin: 1px 0;
}

/* Long solo event with later-starting overlaps stacked on top: the card
   renders at full natural duration as a continuous background, so vertical
   centering would hide the title behind the overlap pill in the middle.
   Pin the title to the top instead. */
.fc-timeGridWeek-view .fc-timegrid-event-harness.fc-week-tall .fc-week-pill {
    align-items: flex-start;
    padding-top: 10px;
}

/* Overlap group: pin the first harness's fc-event to the full harness height
   (set inline by JS via computeStackHeight()). Using `height: 100%` instead
   of `height: auto` breaks the circular percent-of-auto chain on
   `.fc-event-main` and `.fc-week-overlap-group`, which otherwise resolves to
   ~1 px short of the harness and force-shrinks the flex children to fractional
   heights (24 → 23.68, 33 → 32.32). The fractional sizing was the root cause
   of the "+N More" pill's top border looking clipped: its rounded corners
   were anti-aliased into a sub-pixel row. */
.fc-timeGridWeek-view .fc-timegrid-event-harness.fc-overlap-group .fc-event {
    height: 100% !important;
    overflow: hidden !important;
}

/* Stack containers always paint above non-stack events in the same overlap region.
   Without this, an event starting LATER than the stack (e.g. 5x 9:00-10:00 with
   a 9:15-11:00 long event) wins the DOM-order stacking and covers the stack —
   the user sees only the first pill before the long event paints over the rest.
   Lifting the stack ensures all pills (including "+N More") stay visible; the
   long event remains visible in the region after the stack ends. */
.fc-timeGridWeek-view .fc-timegrid-event-harness.fc-overlap-group {
    z-index: 5 !important;
}

/* Hover expand: showEventGhost() floats this element in the column at the
   event's natural start/end pixel range when the user hovers a compressed
   pill. The outer div renders a solid #FEAF3D border (single design-team
   accent color, NOT per-event-type) plus a z-index above the column's
   regular harnesses so the expanded pill visually grows over neighbors.
   The inner .fc-week-pill carries the event's natural pill background +
   thumbnail + title at the natural-duration size, so the user sees the
   event at full duration on hover and collapses back to its compact state
   on mouseleave (Option 1 — expand on hover). pointer-events:none lets the
   original pill keep handling clicks underneath. */
.fc-week-event-ghost {
    position: absolute;
    left: 0;
    right: 0;
    pointer-events: none;
    z-index: 50;
    box-sizing: border-box;
    border: 2px solid #FEAF3D;
    border-radius: 8px;
    overflow: hidden;
    background: transparent;
}

.fc-week-event-ghost .fc-week-pill {
    height: 100%;
    width: 100%;
    border-radius: 0;
    align-items: flex-start;
    margin: 0;
}

.fc-week-event-ghost .fc-week-pill.fc-week-pill--with-portion {
    flex-direction: column;
    gap: 4px;
    padding: 6px 8px 8px;
}

.fc-week-event-ghost .fc-week-pill.fc-week-pill--with-portion .fc-week-pill-thumb {
    width: 24px;
    height: 24px;
}

.fc-week-event-ghost .fc-week-pill-title {
    white-space: normal;
    text-overflow: clip;
    word-break: break-word;
}

.fc-timeGridWeek-view .fc-event-main {
    width: 100%;
    height: 100%;
    padding: 0;
    overflow: hidden;
}

/* Stacked pill container rendered inside an overlap group harness.
   `gap` controls the visible breathing room between adjacent pills (incl. the
   "+N More" overflow pill); kept large enough to read each pill as a distinct
   card without overflowing the harness in tight 3-pill stacks. */
.fc-week-overlap-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 2px 0;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* Re-enable pointer events so per-pill mouseenter/click listeners fire.
   `flex-shrink: 0` is critical: it prevents the flex layout from compressing
   the pills below their declared 24/33-px heights when the container is even
   a fraction of a pixel short, which otherwise produces sub-pixel anti-
   aliasing on the `+N More` pill's top border and rounded corners. */
.fc-week-overlap-group .fc-week-pill {
    pointer-events: auto;
    cursor: pointer;
    flex-shrink: 0;
}

.fc-week-overlap-group .fc-week-pill--more {
    cursor: pointer;
}

/* "+N More" overflow indicator pill */
.fc-week-pill--more {
    background: #E5E5E4 !important;
    cursor: default;
}

.fc-week-pill--more .fc-week-pill-title {
    color: #555555;
}

/* ── Week-view hover tooltip ──────────────────────────────────────────────── */
#weekEventHoverTooltip {
    position: fixed;
    /* Keep planner details above the add-item drawer (z-index: 10000) so a
       recipe next to the split boundary remains fully readable. */
    z-index: 10004;
    pointer-events: none;
    display: none;
    width: 300px;
    min-width: 300px;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.28));
    border-radius: 4px;
    overflow: visible;
}

#weekEventHoverTooltip.visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Invisible bridge between pill and card — keeps tooltip open when cursor crosses the gap */
#weekEventHoverTooltip .week-tooltip-bridge {
    position: absolute;
    background: transparent;
    cursor: default;
}

#weekEventHoverTooltip .week-tooltip-content {
    position: absolute;
    border-radius: 4px;
    overflow: visible;
    cursor: pointer;
}

/* The recipe / workout / note card HTML rendered inside the tooltip reuses the
   same class names as the day calendar — scope them to the tooltip so the
   existing day-calendar selectors don't fight us. */
#weekEventHoverTooltip .fc-recipe-event-card,
#weekEventHoverTooltip .fc-recipe-content {
    width: 300px;
    min-width: 300px;
    min-height: 124px;
    border-radius: 8px;
    background-color: #f5f3f0;
    display: flex;
    align-items: stretch;
    gap: 10px;
    padding-right: 9px;
    overflow: hidden;
    height: 124px;
}

#weekEventHoverTooltip .fc-recipe-image {
    width: 121px;
    min-width: 121px;
    height: 124px;
    object-fit: cover;
    object-position: center;
    border-radius: 8px 0 0 8px;
    flex-shrink: 0;
    display: block;
}

#weekEventHoverTooltip .week-hover-card--recipe {
    width: 300px;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}

#weekEventHoverTooltip .week-hover-planning-rationale {
    box-sizing: border-box;
    width: 100%;
    margin-top: 6px;
    padding: 9px 11px;
    border: 1px solid #cfe9ed;
    border-radius: 7px;
    background: #f2fafb;
    color: #173d47;
    font-family: Montserrat, -apple-system, sans-serif;
}

#weekEventHoverTooltip .week-hover-planning-rationale strong {
    display: block;
    margin-bottom: 3px;
    font-size: 10px;
    line-height: 14px;
}

#weekEventHoverTooltip .week-hover-planning-rationale p {
    margin: 0;
    font-size: 10px;
    line-height: 15px;
}

#weekEventHoverTooltip .week-hover-card--recipe > .fc-recipe-event-card {
    position: relative;
    align-self: stretch;
    border-radius: 4px;
    height: auto;
    min-height: 0;
    background: transparent;
    overflow: visible;
}

#weekEventHoverTooltip .week-hover-event-actions {
    position: absolute;
    inset: 0;
    z-index: 9;
    overflow: hidden;
    border-radius: inherit;
    pointer-events: none;
}

#weekEventHoverTooltip .week-hover-card--recipe .fc-recipe-content {
    position: relative;
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    align-items: stretch;
    gap: 9px;
    padding-right: 9px;
    border-radius: 4px;
    height: auto;
    min-height: 0;
    overflow: hidden;
}

#weekEventHoverTooltip .week-hover-card--recipe .fc-recipe-image {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 96px;
    min-width: 96px;
    height: 100%;
    min-height: 0;
    object-fit: cover;
    border-radius: 4px 0 0 4px;
}

#weekEventHoverTooltip .fc-recipe-nutrition-summary {
    box-sizing: border-box;
    width: 80%;
    display: none;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 12px;
    row-gap: 10px;
    margin-top: 6px;
    padding: 10px 16px 12px;
    background: #fff8eb;
    border-radius: 4px;
}

#weekEventHoverTooltip .week-hover-card--show-nutrition .fc-recipe-nutrition-summary {
    display: grid;
}

#weekEventHoverTooltip .fc-recipe-nutrition-item {
    min-width: 0;
}

#weekEventHoverTooltip .fc-recipe-nutrition-label {
    display: block;
    margin-bottom: 2px;
    font-family: Montserrat, -apple-system, sans-serif;
    font-weight: 400;
    font-size: 9px;
    line-height: 12px;
    color: #8b8173;
}

#weekEventHoverTooltip .fc-recipe-nutrition-value {
    display: block;
    font-family: Montserrat, -apple-system, sans-serif;
    font-weight: 500;
    font-size: 11px;
    line-height: 14px;
    color: #10152c;
    white-space: nowrap;
}

#weekEventHoverTooltip .fc-recipe-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    flex: 1 1 0;
    height: 124px;
    min-width: 0;
    padding: 12px 12px 12px 0;
    gap: 2px;
}

#weekEventHoverTooltip .fc-recipe-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

#weekEventHoverTooltip .week-hover-card--recipe .fc-recipe-details {
    box-sizing: border-box;
    grid-column: 2;
    display: grid;
    grid-template-rows: auto auto;
    align-content: start;
    height: auto;
    min-height: 0;
    justify-content: flex-start;
    gap: 0;
    padding: 10px 0 5px;
}

#weekEventHoverTooltip .week-hover-card--recipe .fc-recipe-info {
    width: 100%;
    flex: 0 0 auto;
}

#weekEventHoverTooltip .fc-recipe-hover-divider {
    width: 100%;
    height: 1px;
    margin: 8px 0 5px;
    background: #c9c2b8;
}

#weekEventHoverTooltip .fc-recipe-hover-bottom {
    width: 100%;
    min-height: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

#weekEventHoverTooltip .fc-recipe-hover-portion-label {
    font-family: Montserrat, -apple-system, sans-serif;
    font-weight: 400;
    font-size: 10px;
    line-height: 12px;
    color: #605a53;
}

#weekEventHoverTooltip .fc-recipe-portion-selector {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

#weekEventHoverTooltip .fc-recipe-portion-btn {
    width: 22px;
    height: 22px;
    border: 1px solid #38a5b4;
    border-radius: 50%;
    padding: 0;
    background: #ffffff;
    color: #38a5b4;
    font-family: Montserrat, -apple-system, sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

#weekEventHoverTooltip .fc-recipe-portion-value {
    width: 42px;
    height: 26px;
    padding: 0 6px;
    border: 1px solid #e2ddd8;
    border-radius: 4px;
    background: #ffffff;
    color: #10152c;
    font-family: Montserrat, -apple-system, sans-serif;
    font-size: 11px;
    font-weight: 600;
    line-height: 26px;
    text-align: center;
    outline: none;
}

#weekEventHoverTooltip .fc-recipe-portion-value:focus {
    border-color: #38a5b4;
    box-shadow: 0 0 0 2px rgba(56, 165, 180, 0.16);
}

#weekEventHoverTooltip .fc-recipe-portion-value::-webkit-outer-spin-button,
#weekEventHoverTooltip .fc-recipe-portion-value::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#weekEventHoverTooltip .fc-recipe-portion-value {
    -moz-appearance: textfield;
}

/* Time-range row injected into the hover popover (recipe + workout cards).
   Scoped to #weekEventHoverTooltip so the day-view cards stay unchanged —
   the renderRecipeCard / renderWorkoutCard helpers only emit the markup
   when `timeRangeHtml` is passed (which only buildWeekTooltipHTML does). */
#weekEventHoverTooltip .fc-event-time-range {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

#weekEventHoverTooltip .fc-event-time-range-icon {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    display: block;
}

#weekEventHoverTooltip .fc-event-time-range-text {
    font-family: 'Montserrat', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 12px;
    line-height: 15px;
    color: #000000;
}

#weekEventHoverTooltip .fc-recipe-label {
    font-family: Montserrat, -apple-system, sans-serif;
    font-weight: 500;
    font-size: 10px;
    line-height: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #667558;
    display: block;
}

#weekEventHoverTooltip .fc-recipe-title {
    font-family: Montserrat, -apple-system, sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 17px;
    text-transform: capitalize;
    color: #10152c;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    word-break: break-word;
}

#weekEventHoverTooltip .fc-portion-info {
    display: flex;
    align-items: center;
    gap: 4px;
}

#weekEventHoverTooltip .fc-portion-text {
    font-family: Montserrat, -apple-system, sans-serif;
    font-weight: 400;
    font-size: 10px;
    line-height: 12px;
    color: #000000;
}

#weekEventHoverTooltip .fc-workout-event-card {
    width: 300px;
    min-width: 300px;
    height: 124px;
    border-radius: 8px;
    overflow: hidden;
}

#weekEventHoverTooltip .fc-workout-content {
    background-color: #eceee3;
    border-radius: 8px;
    display: flex;
    width: 300px;
    min-width: 300px;
    height: 124px;
    align-items: stretch;
    gap: 10px;
    padding-right: 9px;
    overflow: hidden;
}

/* Variant overrides inside the week-view hover tooltip — its DOM also contains the
   variant class on the wrapper, so the inner content background must match. */
#weekEventHoverTooltip .fc-event.workout-event.nutrition-video-event .fc-workout-content {
    background-color: #F0F1F5 !important;
}

#weekEventHoverTooltip .fc-event.workout-event.challenge-event .fc-workout-content {
    background-color: #EEE3ED !important;
}

#weekEventHoverTooltip .fc-event.workout-event.wellness-rebate-event .fc-workout-content {
    background-color: #FFF2DF !important;
}

/* Consultation card inside the hover tooltip — JS reuses note-class names for content, so we
   force the consultation background on the wrapper and override the note text colors here. */
#weekEventHoverTooltip .fc-event.consultation-event {
    background: #B7DCFF !important;
    border-radius: 8px;
}

#weekEventHoverTooltip .fc-event.consultation-event .fc-consultation-event-card {
    padding: 12px;
    background: transparent;
}

#weekEventHoverTooltip .fc-event.consultation-event .fc-note-header {
    color: #000000;
}

#weekEventHoverTooltip .fc-event.consultation-event .fc-note-content,
#weekEventHoverTooltip .fc-event.consultation-event .fc-note-hover-desc {
    color: #10152C;
}

/* Offer pill scoped to the tooltip too. */
#weekEventHoverTooltip .fc-workout-offer-pill {
    box-sizing: border-box;
    display: inline-flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 5px 8px;
    background: #F3C000;
    border-radius: 45px;
    font-family: Montserrat, -apple-system, sans-serif;
    font-weight: 600;
    font-size: 12px;
    line-height: 15px;
    color: #10152C;
    align-self: flex-start;
    width: fit-content;
}

#weekEventHoverTooltip .fc-workout-image {
    width: 121px;
    min-width: 121px;
    height: 124px;
    object-fit: cover;
    object-position: center;
    border-radius: 8px 0 0 8px;
    flex-shrink: 0;
    display: block;
}

#weekEventHoverTooltip .fc-workout-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    flex: 1 1 0;
    height: 124px;
    min-width: 0;
    padding: 12px 12px 12px 0;
    gap: 2px;
}

#weekEventHoverTooltip .fc-workout-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

#weekEventHoverTooltip .fc-workout-label {
    font-family: Montserrat, -apple-system, sans-serif;
    font-weight: 500;
    font-size: 10px;
    line-height: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #667558;
    display: block;
}

#weekEventHoverTooltip .fc-workout-title {
    font-family: Montserrat, -apple-system, sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 17px;
    color: #10152c;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    word-break: break-word;
}

#weekEventHoverTooltip .fc-workout-duration-section {
    display: flex;
    align-items: center;
    gap: 4px;
}

#weekEventHoverTooltip .fc-workout-clock-icon {
    flex-shrink: 0;
    color: #667558;
}

#weekEventHoverTooltip .fc-workout-duration {
    font-family: Montserrat, -apple-system, sans-serif;
    font-weight: 400;
    font-size: 10px;
    line-height: 12px;
    color: #667558;
}

#weekEventHoverTooltip .fc-note-event-card {
    background: #FCEBAD;
    border-radius: 8px;
    padding: 14px 16px;
    width: 300px;
    min-width: 300px;
    min-height: 80px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#weekEventHoverTooltip .fc-note-header {
    font-family: Montserrat, -apple-system, sans-serif;
    font-weight: 600;
    font-size: 10px;
    line-height: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #8B6914;
}

#weekEventHoverTooltip .fc-note-content {
    font-family: Montserrat, -apple-system, sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 17px;
    color: #10152c;
    margin: 0;
    word-break: break-word;
}

#weekEventHoverTooltip .fc-note-hover-desc {
    font-family: Montserrat, -apple-system, sans-serif;
    font-weight: 400;
    font-size: 11px;
    line-height: 15px;
    color: #5a4a1e;
    margin: 0;
    opacity: 0.8;
    word-break: break-word;
}

/* "+N More" hover — full cards stacked vertically, scroll when more than 3 */
#weekEventHoverTooltip .week-hover-more-stack {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.25) transparent;
}

#weekEventHoverTooltip .week-hover-more-stack::-webkit-scrollbar {
    width: 6px;
}

#weekEventHoverTooltip .week-hover-more-stack::-webkit-scrollbar-track {
    background: transparent;
}

#weekEventHoverTooltip .week-hover-more-stack::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 3px;
}

#weekEventHoverTooltip .week-hover-more-stack::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.4);
}

#weekEventHoverTooltip .week-tooltip-more-card {
    cursor: pointer;
}

/* Column borders — week view only */
.fc-timeGridWeek-view .fc-timegrid-col {
    border-right: 1px solid #f3f4f6 !important;
}

.fc-timeGridWeek-view .fc-timegrid-col:first-child {
    border-left: 1px solid #f3f4f6 !important;
}

.fc-timeGridWeek-view .fc-timegrid-col:last-child {
    border-right: none !important;
}

.fc-timegrid-slot {
    border-right: 1px solid #f3f4f6 !important;
    height: 125px !important;
    border-bottom: none !important;
}

.fc-timegrid-slot:last-child {
    border-right: none !important;
}

#calendar .fc-timegrid-body {
    border-top: none !important;
    border-bottom: 1px solid #e0e0e0 !important;
}

/* Day view: horizontal scroll when many items in a slot overflow */
#calendar .fc-timeGridDay-view .fc-timegrid-body {
    overflow-x: auto;
}

/* Give the first slot its own top border (same as every other slot) so 12:00 AM lines up correctly */
.fc-timegrid-slots tbody tr:first-child td.fc-timegrid-slot-lane {
    border-top: 1px solid #e0e0e0 !important;
}

/* Remove duplicate top border from event column (FullCalendar default) – firstLane already provides it */
.fc-timegrid-cols .fc-timegrid-col:not(.fc-timegrid-axis) {
    border-top: none !important;
}

/* 12:00 AM only: align line next to time */
.fc-timegrid-slots tbody tr:first-child .fc-timegrid-slot-label-frame {
    margin-top: -10px !important;
}
.fc-timegrid-slots tbody tr:first-child .fc-timegrid-slot-label-cushion {
    margin-top: -25px;
}

/* Remove default today highlighting */
.fc-day-today {
    background-color: transparent !important;
}

.fc-col-header-cell.fc-day-today {
    background-color: transparent !important;
}

/* Current day highlight — bottom border only; circle handled by .fc-day-today */
.fc-col-header-cell.current-day {
    background-color: transparent !important;
    border-bottom: 3px solid #5bb0bd !important;
    color: inherit !important;
}

/* Custom day header content — Figma: row, center, gap 5px */
.fc-col-header-cell .fc-day-header-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 6px;
    height: 42px;
    box-sizing: border-box;
}

/* Weekday abbreviation */
.fc-day-header-weekday {
    font-family: 'Manrope', sans-serif;
    font-style: normal;
    font-weight: 500;
    font-size: 12px;
    line-height: 16px;
    text-align: right;
    letter-spacing: -0.02em;
    color: #000000;
    width: 30px;
    height: 16px;
    flex: none;
    order: 0;
    flex-grow: 0;
}

/* Day number circle */
.fc-day-header-number {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    flex: none;
    order: 1;
    flex-grow: 0;
}

/* Day number text */
.fc-day-header-number span {
    font-family: 'Poppins', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 12px;
    line-height: 13px;
    display: flex;
    align-items: center;
    text-align: center;
    color: #868686;
}

/* Today — black circle, white number */
.fc-day-today .fc-day-header-number {

}

.fc-day-today .fc-day-header-number span {

}

/* Grid lines - Cleaner borders (single source of truth to avoid vertical seam) */
/* Override FullCalendar theme so we control all borders – prevents cascade chaos */
.fc-theme-standard .fc-scrollgrid {
    border: none !important;
}

.fc table {
    border-collapse: separate;
    border-spacing: 0px;
}

.fc .fc-scrollgrid {
    border: 1px solid #e6e6e6;
    border-radius: 20px;
    overflow: hidden;
}

/* Kill internal seam between time column and lanes – day view only (main calendar has .fc-timeGridDay-view when Day is selected) */
.fc-timeGridDay-view .fc-theme-standard .fc-scrollgrid-section > td {
    border: none !important;
}

.fc-timeGridDay-view .fc-scrollgrid td {
    border-right: none !important;
    border-left: none !important;
}

.fc-scrollgrid-section > * {
    border-color: #f3f4f6;
}

/* Now indicator - Red line with rounded label */
.fc-timegrid-now-indicator-line {
    border-color: #ef4444;
    border-width: 2px;
    position: relative;
}

/* Day view: allow the now indicator line to overflow its column container when
   the calendar expands horizontally to accommodate overlapping events */
.fc-timeGridDay-view .fc-timegrid-now-indicator-container {
    overflow: visible !important;
}

/* Week view: stretch the now indicator line across all day columns (Mon–Sun) */
.fc-timeGridWeek-view .fc-timegrid-now-indicator-container {
    overflow: visible !important;
}

.fc-timeGridWeek-view .fc-timegrid-now-indicator-line {
    width: calc(700% + 6px) !important;
}

/* Shift the line based on which day column it's in (1st col = time axis, 2nd = Mon, etc.) */
.fc-timeGridWeek-view .fc-timegrid-col:nth-child(2) .fc-timegrid-now-indicator-line {
    --fc-now-indicator-shift: 0%;
}

.fc-timeGridWeek-view .fc-timegrid-col:nth-child(3) .fc-timegrid-now-indicator-line {
    --fc-now-indicator-shift: 14.29%;
}

.fc-timeGridWeek-view .fc-timegrid-col:nth-child(4) .fc-timegrid-now-indicator-line {
    --fc-now-indicator-shift: 28.57%;
}

.fc-timeGridWeek-view .fc-timegrid-col:nth-child(5) .fc-timegrid-now-indicator-line {
    --fc-now-indicator-shift: 42.86%;
}

.fc-timeGridWeek-view .fc-timegrid-col:nth-child(6) .fc-timegrid-now-indicator-line {
    --fc-now-indicator-shift: 57.14%;
}

.fc-timeGridWeek-view .fc-timegrid-col:nth-child(7) .fc-timegrid-now-indicator-line {
    --fc-now-indicator-shift: 71.43%;
}

.fc-timeGridWeek-view .fc-timegrid-col:nth-child(8) .fc-timegrid-now-indicator-line {
    --fc-now-indicator-shift: 85.71%;
}

.fc-timeGridWeek-view .fc-timegrid-col .fc-timegrid-now-indicator-line {
    transform: translateX(calc(-1 * var(--fc-now-indicator-shift, 0%)));
}

/* Now indicator arrow - styled as a time badge pill in the time axis area */
.fc .fc-timegrid-now-indicator-arrow {
    border: none !important;
    background: #ef4444;
    color: #FFF;
    padding: 4px 8px;
    border-radius: 20px;
    font-family: Arial;
    font-size: 10px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
    text-align: right;
    white-space: nowrap;
    z-index: 10;
    margin-top: 0px;
    transform: translateY(-50%);
    width: auto;
    left: 4px !important;
    right: auto !important;
    margin-left: -2px;
}

.fc-timegrid-now-indicator-arrow::before {
    content: attr(data-time);
}

/* Selection styling for main calendar */
#calendar .fc-highlight {
    background-color: white !important;
    border: 2px dashed #5bb0bd !important;
    border-radius: 12px !important;
    margin: 2px 8px !important;
}

/* Selection mirror styling for main calendar */
#calendar .fc-timegrid-slot.fc-highlight {
    background-color: transparent !important;
    border: 2px dashed #5bb0bd !important;
    border-radius: 12px !important;
    margin: 2px 8px !important;
}

/* Selection background area in main calendar */
#calendar .fc-timegrid-bg .fc-highlight {
    background-color: white !important;
    border: 2px dashed #5bb0bd !important;
    border-radius: 12px !important;
    margin: 2px 8px !important;
}

/* Active selection (drag) styling for main calendar */
#calendar .fc-timegrid-col .fc-highlight {
    background-color: white !important;
    border: 2px dashed #5bb0bd !important;
    border-radius: 12px !important;
    margin: 2px 8px !important;
}

/* Selection mirror during drag for main calendar */
#calendar .fc-timegrid-slot.fc-select-mirror {
    background-color: white !important;
    border: 2px dashed #5bb0bd !important;
    border-radius: 12px !important;
    margin: 2px 8px !important;
}

/* Wrapper constrains mirror to actual card size during drag */
.fc-event-mirror-wrapper {
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.fc-event-mirror-wrapper .fc-event-mirror {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    display: flex !important;
}

.fc-event-mirror-wrapper .fc-event-mirror .fc-event-main,
.fc-event-mirror-wrapper .fc-event-mirror .fc-event-main-frame {
    overflow: hidden !important;
    min-height: 0 !important;
}

/* Event mirror (appears while dragging/selecting) - match card size 300px */
.fc-event-mirror {
    display: block !important;
    width: 300px !important;
    max-width: 300px !important;
    min-width: 300px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    transform: none !important;
    font-size: 14px !important;
}

.fc-event-mirror .fc-recipe-event-card,
.fc-event-mirror .fc-workout-event-card,
.fc-event-mirror .fc-event-main-frame {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

/* Mirror inner content - type-specific to match recipe/workout/note cards */

/* Recipe mirror - image 121px, content constrained */
.fc-event-mirror-wrapper.mirror-recipe .fc-event-mirror .fc-recipe-event-card {
    display: flex !important;
}

.fc-event-mirror-wrapper.mirror-recipe .fc-event-mirror .fc-recipe-content {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    flex: 1 1 0 !important;
    border-radius: 8px !important;
    background-color: #f5f3f0 !important;
    gap: 10px !important;
    padding-right: 9px !important;
}

.fc-event-mirror-wrapper.mirror-recipe .fc-event-mirror .fc-recipe-image {
    width: 121px !important;
    min-width: 121px !important;
    max-width: 121px !important;
    height: 100% !important;
    max-height: 124px !important;
    object-fit: cover !important;
    object-position: center !important;
    flex-shrink: 0 !important;
}

.fc-event-mirror-wrapper.mirror-recipe .fc-event-mirror .fc-recipe-details {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    padding: 12px 12px 12px 0 !important;
}

.fc-event-mirror-wrapper.mirror-recipe .fc-event-mirror .fc-recipe-title {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    font-size: 14px !important;
    line-height: 17px !important;
}

.fc-event-mirror-wrapper.mirror-recipe .fc-event-mirror .fc-recipe-label {
    font-size: 10px !important;
    line-height: 12px !important;
}

.fc-event-mirror-wrapper.mirror-recipe .fc-event-mirror .fc-portion-text {
    font-size: 10px !important;
    line-height: 12px !important;
}

.fc-event-mirror-wrapper.mirror-recipe .fc-event-mirror .fc-recipe-compact-card,
.fc-event-mirror-wrapper.mirror-recipe .fc-event-mirror .fc-recipe-card-medium {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    overflow: hidden !important;
}

.fc-event-mirror-wrapper.mirror-recipe .fc-event-mirror .fc-recipe-compact-title,
.fc-event-mirror-wrapper.mirror-recipe .fc-event-mirror .fc-recipe-medium-title {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.fc-event-mirror-wrapper.mirror-recipe .fc-event-mirror .fc-recipe-thumb {
    width: 35px !important;
    height: 36px !important;
    max-height: 100% !important;
    border-radius: 30px !important;
    object-fit: cover !important;
    flex-shrink: 0 !important;
}

.fc-event-mirror-wrapper.mirror-recipe .fc-event-mirror .fc-recipe-compact-card .fc-recipe-thumb {
    width: 20px !important;
    height: 20px !important;
}

/* Workout mirror - image 124px, content constrained */
.fc-event-mirror-wrapper.mirror-workout .fc-event-mirror .fc-workout-event-card {
    display: flex !important;
}

.fc-event-mirror-wrapper.mirror-workout .fc-event-mirror .fc-workout-content {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    flex: 1 1 0 !important;
    border-radius: 8px !important;
    background-color: rgba(236, 238, 227, 1) !important;
    gap: 10px !important;
    padding-right: 9px !important;
}

.fc-event-mirror-wrapper.mirror-workout .fc-event-mirror .fc-workout-image {
    width: 124px !important;
    min-width: 124px !important;
    max-width: 124px !important;
    height: 100% !important;
    max-height: 124px !important;
    object-fit: cover !important;
    object-position: center !important;
    flex-shrink: 0 !important;
}

.fc-event-mirror-wrapper.mirror-workout .fc-event-mirror .fc-workout-details {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 12px 12px 12px 0 !important;
    gap: 8px !important;
}

.fc-event-mirror-wrapper.mirror-workout .fc-event-mirror .fc-workout-title {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    font-size: 14px !important;
    line-height: 17px !important;
}

.fc-event-mirror-wrapper.mirror-workout .fc-event-mirror .fc-workout-label {
    font-size: 10px !important;
    line-height: 12px !important;
}

.fc-event-mirror-wrapper.mirror-workout .fc-event-mirror .fc-workout-duration {
    font-size: 10px !important;
    line-height: 12px !important;
}

.fc-event-mirror-wrapper.mirror-workout .fc-event-mirror .fc-workout-compact-card,
.fc-event-mirror-wrapper.mirror-workout .fc-event-mirror .fc-workout-card-medium {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    overflow: hidden !important;
}

.fc-event-mirror-wrapper.mirror-workout .fc-event-mirror .fc-workout-compact-title,
.fc-event-mirror-wrapper.mirror-workout .fc-event-mirror .fc-workout-medium-title {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.fc-event-mirror-wrapper.mirror-workout .fc-event-mirror .fc-workout-thumb {
    width: 35px !important;
    height: 36px !important;
    max-height: 100% !important;
    border-radius: 30px !important;
    object-fit: cover !important;
    flex-shrink: 0 !important;
}

.fc-event-mirror-wrapper.mirror-workout .fc-event-mirror .fc-workout-compact-card .fc-workout-thumb {
    width: 20px !important;
    height: 20px !important;
}

/* Note mirror - no image, header + content */
.fc-event-mirror-wrapper.mirror-note .fc-event-mirror .fc-note-event-card,
.fc-event-mirror-wrapper.mirror-note .fc-event-mirror .fc-note-card-medium,
.fc-event-mirror-wrapper.mirror-note .fc-event-mirror .fc-note-compact-card {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    padding: 8px 12px !important;
    gap: 2px !important;
}

.fc-event-mirror-wrapper.mirror-note .fc-event-mirror .fc-note-content {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 4 !important;
    -webkit-box-orient: vertical !important;
}

.fc-event-mirror-wrapper.mirror-note .fc-event-mirror .fc-note-medium-title,
.fc-event-mirror-wrapper.mirror-note .fc-event-mirror .fc-note-compact-title {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

/* Responsive design */
@media (max-width: 768px) {
    #calendar {
        max-width: 100%;
        font-size: 0.85em;
    }

    .fc-col-header-cell {
        padding: 3px 2px;
        font-size: 0.75em;
    }

    .fc-col-header-cell .fc-day-header-weekday {
        font-size: 10px;
    }

    .fc-col-header-cell .fc-day-header-number {
        width: 24px;
        height: 24px;
    }

    .fc-col-header-cell .fc-day-header-number span {
        font-size: 10px;
    }

    .fc-event {
        font-size: 0.7em;
        padding: 1px 3px;
    }

    .fc-event-category-label {
        font-size: 8px;
    }

    .fc-event-category-label + .fc-event-title {
        font-size: 10px;
    }

    .fc-event.workout-event .fc-event-title,
    .fc-event.recipe-event .fc-event-title,
    .fc-event.notes-event .fc-event-title {
        font-size: 11px;
        padding: 2px;
    }

    .week-navigation {
        padding: 0 5px;
        margin-bottom: 10px;
    }

    .week-navigation .nav-arrow {
        width: 35px;
        height: 35px;
        font-size: 18px;
        padding: 4px 8px;
    }

    .week-range {
        font-size: 13px;
        margin: 0 8px;
    }

    .date-text {
        font-size: 13px;
    }

    .fc-timegrid-slot-label-cushion {
        font-size: 10px !important;
    }

    .plannerContainer {
        margin-top: 10px;
        margin-bottom: 10px;
    }
}

/* Responsive for smaller mobile screens */
@media (max-width: 480px) {
    #calendar {
        font-size: 0.75em;
    }

    .fc-col-header-cell {
        padding: 2px 1px;
    }

    .fc-col-header-cell .fc-day-header-weekday {
        font-size: 9px;
    }

    .fc-col-header-cell .fc-day-header-number {
        width: 20px;
        height: 20px;
    }

    .fc-col-header-cell .fc-day-header-number span {
        font-size: 9px;
    }

    .fc-event {
        font-size: 0.65em;
        padding: 1px 2px;
    }

    .fc-event-category-label {
        font-size: 7px;
    }

    .fc-event-category-label + .fc-event-title {
        font-size: 9px;
    }

    .fc-event.workout-event .fc-event-title,
    .fc-event.recipe-event .fc-event-title,
    .fc-event.notes-event .fc-event-title {
        font-size: 10px;
        padding: 1px;
    }

    .week-navigation .nav-arrow {
        width: 30px;
        height: 30px;
        font-size: 16px;
        padding: 4px;
    }

    .week-range {
        font-size: 12px;
        margin: 0 5px;
    }

    .date-text {
        font-size: 12px;
    }

    .fc-timegrid-slot {
        height: 125px;
    }

    .fc-timegrid-slot-label-cushion {
        font-size: 9px !important;
    }

    .plannerContainer {
        margin-top: 5px;
        margin-bottom: 5px;
    }
}

#calendar > div.fc-view-harness.fc-view-harness-passive > div > table {
    border-radius: 10px;
}

#calendar > div.fc-view-harness.fc-view-harness-passive > div > table > tbody > tr:nth-child(2) > td {
    display: none;
}

#calendar > div.fc-view-harness.fc-view-harness-passive > div > table > tbody > tr:nth-child(1) {
    display: none;
}

#calendar > div.fc-view-harness.fc-view-harness-passive > div > table > thead > tr > th {
    border-top-right-radius: 10px;
    border-top-left-radius: 10px;
}

.fc .fc-timegrid-slot-minor {
    border-top: none;
    background-image: none;
    background-size: 0;
    background-repeat: no-repeat;
    background-position: 0 0;
    height: 0;
    margin-top: 0;
    display: none;
}

.fc-timeGridDay-view .fc-scrollgrid tbody tr td:first-child,
.fc-timeGridDay-view .fc-scrollgrid thead tr th:first-child {
    border: none !important;
}

/* Apply ONLY in Week view */
.fc-timeGridWeek-view .fc-scrollgrid tbody tr td:first-child,
.fc-timeGridWeek-view .fc-scrollgrid thead tr th:first-child {
    border: none !important;
}

.fc-scrollgrid tbody tr td:first-child.fc-timegrid-slot-minor {
    background: none !important;
    background-image: none !important;
}

.fc-timegrid-slot-label-cushion.fc-scrollgrid-shrink-cushion {
    font-weight: 500 !important;
    font-style: normal !important;
    font-size: 12px !important;
    line-height: 100% !important;
    letter-spacing: 0% !important;
    text-align: right !important;
}

/* Multiple selectors to target time labels */
.fc-timegrid-slot-label-cushion.fc-scrollgrid-shrink-cushion,
.fc-timegrid-slot-label-cushion,
.fc-scrollgrid-shrink-cushion {
    font-weight: 500 !important;
    font-style: normal !important;
    font-size: 12px !important;
    line-height: 100% !important;
    letter-spacing: 0% !important;
    text-align: right !important;
    color: #000;
}


thead tr th:nth-child(2) {
    border-radius: 10px 0px 0px 0px;
}

/* Day View Inline Styles */
.day-view-inline {
    width: 100%;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 600px;
}

.day-view-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 500px;
}

.day-view-left {
    flex: 3;
    padding: 20px;
    overflow-y: auto;
    border-radius: 12px;
    margin: 10px;
    border: 2px solid #e0e0e0;
    height: 780px;
}

.day-view-right {
    flex: 2;
    padding-left: 20px;
    padding-right: 20px;
    padding-top: 20px;
    overflow-y: auto;
    background: white;
    border-radius: 12px;
    margin: 10px;
    border: 2px solid #e0e0e0;
    height: 780px;
}

/* When recipe-edit-screen or workout-edit-screen is present, prevent day-view-right from scrolling */
.day-view-right:has(.recipe-edit-screen),
.day-view-right.has-recipe-edit,
.day-view-right:has(.workout-edit-screen),
.day-view-right.has-workout-edit {
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Day Calendar Styles */
.day-calendar-container {
    height: calc(100% - 120px);
    margin-top: 20px;
    display: flex;
    gap: 10px;
    overflow-y: auto;
}

#dayCalendar {
    flex: 1;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Hide the weekday header row in day view */
#dayCalendar .fc-col-header-cell {
    display: none !important;
}

#dayCalendar .fc-timegrid-body {
    margin-top: 0 !important;
}

/* Hide FullCalendar's built-in time labels - using external labels instead */
#dayCalendar .fc-timegrid-slot-label-cushion {
    display: none !important;
}

#dayCalendar .fc-timegrid-slot-label {
    width: 0 !important;
    min-width: 0 !important;
    padding: 0 !important;
}

#dayCalendar .fc-timegrid-axis {
    width: 0 !important;
    min-width: 0 !important;
}

/* Set slot height and spacing */
#dayCalendar .fc-timegrid-slot {
    height: 40px !important;
    margin-bottom: 0px !important;
    border-bottom: 1px dashed #e0e0e0 !important;
}

/* Alternative approach: Target every 4th row in the table structure */
#dayCalendar .fc-timegrid-slots table tbody tr:nth-child(4n) .fc-timegrid-slot {
    border-bottom: 1px solid #e0e0e0 !important;
}

/* Selected time slot styling */
#dayCalendar .fc-timegrid-slot.fc-highlight {
    background-color: transparent !important;
    border: 2px dashed #5bb0bd !important;
    border-radius: 12px !important;
    margin: 2px 8px !important;
}

/* Selection mirror styling */
#dayCalendar .fc-timegrid-slot.fc-select-mirror {
    background-color: transparent !important;
    border: 2px dashed #5bb0bd !important;
    border-radius: 12px !important;
    margin: 2px 8px !important;
}

/* Highlighted selection area */
#dayCalendar .fc-highlight {
    background-color: transparent !important;
    border: 2px dashed #5bb0bd !important;
    border-radius: 12px !important;
    margin: 2px 8px !important;
}

/* Make event background transparent */
#dayCalendar .fc-v-event {
    background-color: transparent !important;
    border: none !important;
    display: block;
}

#dayCalendar.fc-theme-standard td,
#dayCalendar.fc-theme-standard th {
    border: none;
}

/* Empty calendar slot hover effect - "Add to Calendar" overlay */
#dayCalendar .fc-timegrid-slot,
#calendar .fc-timegrid-slot {
    position: relative;
    cursor: pointer;
    transition: opacity 0.3s ease-in-out;
}

#dayCalendar .fc-timegrid-slot.fc-timegrid-slot-label,
#calendar .fc-timegrid-slot.fc-timegrid-slot-label {
    cursor: default;
}

/* Slot needs positioning context so overlay is placed relative to it (week view: one slot per row spans all columns) */
.fc-timegrid-slot-lane.has-quarter-overlay {
    position: relative;
    overflow: visible;
    z-index: 10; /* stack above fc-timegrid-col-events so overlay is visible over recipe/workout cards in day view */
}

/* When overlay is active, raise fc-timegrid-slots above fc-timegrid-cols (events layer) so overlay is visible over recipe/workout cards */
.fc-timegrid-slots.has-quarter-overlay-active {
    position: relative;
    z-index: 20;
}

/* Quarter-hour overlay block - "Click to Add New Item" snaps to 15-min segments */
.slot-quarter-overlay {
    position: absolute;
    left: 8px;
    right: 8px;
    background: rgba(183, 220, 255, 0.4);
    border-radius: 10px;
    pointer-events: none;
    z-index: 5;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Centered text label inside overlay — vertically and horizontally centered in the blue block */
.slot-quarter-overlay-text {
    font-family: Montserrat, sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 12px;
    line-height: 100%;
    letter-spacing: 0;
    color: rgba(0, 0, 0, 1);
    pointer-events: none;
    z-index: 2;
}

/* When text is placed in slot (split overlay case), position at percentage and center with transform */
.slot-quarter-overlay-text.slot-quarter-overlay-text--in-slot {
    position: absolute;
    left: 8px;
    right: 8px;
    min-height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
}

/* Temporary quarter-time label shown on the left time axis during hover */
.fc-quarter-time-label {
    position: absolute;
    left: 0;
    right: 0;
    text-align: left;
    padding: 0px 4px;
    width: max-content;
    font-family: Montserrat, sans-serif;
    font-size: 12px;
    font-weight: 500;
    font-style: normal;
    line-height: 100%;
    letter-spacing: 0;
    color: rgba(0, 0, 0, 1);
    pointer-events: none;
    z-index: 2;
    transform: translateY(-50%);
}

/* Highlight the corresponding 15-min label on the left side */
.day-calendar-label.quarter-highlight {
    color: #5BB0BD !important;
    font-weight: 600 !important;
    transition: color 0.15s ease, font-weight 0.15s ease;
}

/* Ensure overlay doesn't block events */
#dayCalendar .fc-timegrid-event-harness,
#calendar .fc-timegrid-event-harness {
    pointer-events: auto;
}

/* Add Item Panel Styles */
.add-item-panel {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    margin-bottom: 20px;
}

.add-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
}

.add-item-header h3 {
    margin: 0;
    font-family: Arial;
    font-weight: 600;
    font-style: Bold;
    font-size: 16px;
    line-height: 100%;
    letter-spacing: 0px;
    vertical-align: middle;
    color: #333;
}

.add-item-buttons {
    display: flex;
    gap: 10px;
}

.btn-add,
.btn-discard {
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add {
    height: 44px;
    background-color: #5bb0bd;
    color: white;
    border-radius: 8px;
    padding: 0 12px;
    opacity: 0.3;
    gap: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-add:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.btn-add:not(:disabled) {
    opacity: 1;
}

.btn-add:not(:disabled):hover {
    opacity: 0.9;
}

.btn-discard {
    font-family: Arial;
    font-weight: 700;
    font-style: Bold;
    font-size: 15px;
    line-height: 100%;
    letter-spacing: -1%;
    background: white;
    color: #ff555d;
    border: 1px solid #ff555d;
    border-radius: 6px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-discard:hover {
    background-color: #ff555d;
    color: white;
}

/* Goals Planner V2 - Close Button */
.btn-close-goals {
    font-family: Arial;
    font-weight: 700;
    font-style: Bold;
    font-size: 15px;
    line-height: 100%;
    letter-spacing: -1%;
    background: white;
    color: rgba(255, 85, 93, 1);
    border: 2px solid rgba(255, 85, 93, 1);
    border-radius: 8px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-close-goals:hover {
    background-color: rgba(255, 85, 93, 1);
    color: white;
}

/* Goals Panel - Unique class names to avoid conflicts with main planner */
.goals-tab-btn {
    padding: 12px 20px 20px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 500;
    color: #b3b3b3;
    position: relative;
    transition: all 0.2s;
}

.goals-tab-btn.active {
    color: #000000;
    font-weight: 600;
}

.goals-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% + 16px);
    height: 5px;
    background-color: #10152c;
    border-radius: 30px;
    opacity: 1;
    border-radius: 30px 30px 0px 0px;
}

.goals-tab-btn:hover {
    color: #000000;
}

.goals-recipe-tab {
    padding: 8px 16px;
    border: 1px solid #deeff3;
    background: white;
    cursor: pointer;
    font-weight: 500;
    color: #10152c;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 15px;
    flex-shrink: 0;
    white-space: nowrap;
}

.goals-recipe-tab.active {
    background: #10152c;
    color: white;
}

.goals-recipe-tab:hover {
    background: #deeff3;
    color: #000000;
}

/* Date Time Picker Styles */
.datetime-picker {
    margin-bottom: 20px;
}

.datetime-row {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: space-between;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.datetime-row::-webkit-scrollbar {
    display: none;
}

.time-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.time-display {
    background-color: #f0f5ff;
    color: #000000;
    border-radius: 8px;
    padding: 8px 12px;
    font-weight: 500;
    text-align: center;
    min-width: 80px;
    font-size: 14px;
    flex-shrink: 0;
}

.time-separator {
    color: #000000;
    font-weight: 500;
    font-size: 16px;
    flex-shrink: 0;
}

.selected-date-display {
    background-color: #f0f5ff;
    color: #000000;
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 500;
    text-align: center;
    font-size: 14px;
    flex-shrink: 0;
}

/* Horizontal Date Picker Styles */
.horizontal-date-picker {
    padding: 15px 50px;
    margin-bottom: 15px;
    position: relative;
}

/* Scroll indicator gradient for mobile */
@media (max-width: 768px) {
    .horizontal-date-picker::after {
        content: '';
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 40px;
        height: 80%;
        background: linear-gradient(to left, rgba(255, 255, 255, 0.9), transparent);
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.3s;
    }

    .horizontal-date-picker.has-scroll::after {
        opacity: 1;
    }
}

.date-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.nav-arrow {
    background: none;
    border: none;
    font-size: 24px;
    color: #4b5d3a;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.nav-arrow:hover {
    background-color: #f0f0f0;
    color: #2d3a2a;
}

.date-display {
    text-align: center;
    font-weight: 500;
    font-size: 16px;
}

.today-text {
    color: #a6c099;
    font-weight: 500;
}

.date-text {
    color: #000000;
    font-weight: 500;
}

.day-strip {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.day-strip::-webkit-scrollbar {
    display: none;
}

.day-cell {
    flex: 1;
    text-align: center;
    padding: 8px 6px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 42px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

/* Ensure adequate touch target on mobile */
@media (max-width: 768px) {
    .day-cell {
        min-width: 40px;
        min-height: 40px;
        padding: 6px 4px;
    }
}

@media (max-width: 480px) {
    .day-cell {
        min-width: 36px;
        min-height: 36px;
        padding: 5px 3px;
    }
}

@media (max-width: 375px) {
    .day-cell {
        min-width: 32px;
        min-height: 32px;
        padding: 4px 2px;
    }
}

.day-cell:hover {
    background-color: #f8f9ff;
}

.day-cell.selected {
    background-color: #5bb0bd;
    color: white;
    border-radius: 9999px;
}

.day-cell.past-date {
    pointer-events: none;
    opacity: 0.4;
    cursor: not-allowed;
}

/* Ensure selected state is visible even on past dates (if applicable) */
.day-cell.selected.past-date {
    opacity: 0.7;
}

.day-cell.today {
    position: relative;
}

.day-name {
    font-size: 10px;
    font-weight: 500;
    margin-bottom: 2px;
    color: #a0a0a0;
}

.day-cell.selected .day-name {
    color: rgba(255, 255, 255, 0.9);
}

.day-number {
    font-size: 14px;
    font-weight: 500;
    color: #a0a0a0;
}

.day-cell.selected .day-number {
    color: white;
    font-weight: 600;
}

.time-picker-row {
    display: flex;
    gap: 10px;
}

.time-picker-btn {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.time-picker-btn:hover {
    border-color: #5bb0bd;
    background-color: #f8f9ff;
}

/* Category Tabs Styles */
.category-tabs {
    display: flex;
    align-items: center;
    gap: 5px;
    padding-bottom: 15px;
}

.tab-btn {
    padding: 12px 20px 20px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 500;
    color: #b3b3b3;
    position: relative;
    transition: all 0.2s;
}

.tab-btn.active {
    color: #000000;
    font-weight: 600;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% + 16px);
    height: 5px;
    background-color: #10152c;
    border-radius: 30px;
    opacity: 1;
    border-radius: 30px 30px 0px 0px;
}

.tab-btn:hover {
    color: #000000;
}

.add-note-btn {
    margin-left: auto;
    padding: 8px;
    border-radius: 10px;
    background: #fff3ca;
    cursor: pointer;
    font-size: 1.2em;
    transition: all 0.2s;
    width: 70px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
}

.add-note-btn:hover {
    background-color: #ffe894;
}

.add-note-btn.active {
    background-color: #ffda4f;
}

/* Search Section Styles */
.search-section {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: flex-end;
    z-index: 1;
}

/* Day view search - search box and filter on same row (matches add-new-item design) */
.day-view-search {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

.day-view-search .search-form {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    width: 100%;
    flex-wrap: nowrap;
}

.day-view-search .search-input-container,
.day-view-search .search-bar {
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 8px 12px;
    gap: 7px;
    height: 42px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    flex: 1;
    min-width: 0;
}

.day-view-search .search-icon {
    position: static;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    transform: none;
}

.day-view-search .star-icon {
    position: static;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transform: none;
}

.day-view-search .search-input {
    flex: 1;
    min-width: 0;
    border: none;
    padding: 0 !important;
    background: none;
}

.day-view-search .search-button,
.day-view-search .filter-btn {
    flex: none;
    height: 42px;
    min-width: 42px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.5);
    background: none;
}

.day-view-search .filter-icon {
    width: 16px;
    height: 16px;
}

.search-bar {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    padding: 12px 40px 12px 40px !important;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #5bb0bd;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    pointer-events: none;
    z-index: 2;
}

.star-icon {
    position: absolute;
    left: 8px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    z-index: 3;
}

.filter-btn {
    padding: 12px;
    border: 1px solid #5bb0bd;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 1.2em;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.filter-icon {
    width: 16px;
    height: 16px;
}

.filter-btn:hover {
    background-color: #f0f5ff;
    color: white;
}

/* Expanded Search Screen Styles */
.search-screen {
    display: flex;
    flex-direction: column;
    gap: 24px;
    flex: 1;
}

.search-screen-input-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.search-screen-divider {
    width: 100%;
    height: 1px;
    background: #e5e5e5;
    margin: 8px 0;
}

.search-screen-bar {
    position: relative;
    min-height: 64px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 16px 20px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(221, 228, 250, 0.8);
    box-shadow: 0 16px 48px rgba(16, 21, 44, 0.05);
}

.search-screen-input-wrapper {
    display: flex;
    align-items: flex-start;
    width: 100%;
    min-height: 40px;
    gap: 10px;
}

.search-screen-bar .search-input {
    min-height: 40px;
    height: 40px;
    padding: 0 !important;
    font-size: 15px !important;
    background: transparent;
    color: #10152c;
    border: none;
    box-shadow: none;
    flex: 1;
    resize: none;
    overflow-y: auto;
    line-height: 1.5;
    word-wrap: break-word;
    white-space: pre-wrap;
    vertical-align: top;
}

.search-screen .search-input,
.search-screen .search-input:focus,
.search-screen .search-input:active {
    border: none !important;
    box-shadow: none !important;
    outline: none;
    background: transparent;
}

.search-screen-bar .star-icon {
    position: static;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.search-screen-quick-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
}

.search-prompt-display {
    display: none;
    padding: 0 16px;
    font-size: 15px !important;
    line-height: 1.5;
    color: #10152c;
    font-weight: normal;
    white-space: pre-wrap;
    cursor: text;
    flex: 1;
    min-height: 52px;
    align-items: center;
}

.search-ai-status {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 40px 0;
    width: 100%;
    position: relative;
}

.search-ai-status-stars {
    position: relative;
    width: 88px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-ai-status-star {
    position: absolute;
}

.search-ai-status-star-1 {
    top: 0;
    right: 12px;
    width: 44px;
    height: 44px;
    color: #9d50bb;
    animation:
        star1Scale 1s ease-in-out infinite alternate,
        star1Color 1.2s ease-in-out infinite alternate;
}

.search-ai-status-star-2 {
    top: -10px;
    left: 20px;
    width: 33px;
    height: 33px;
    color: #ff5f6d;
    animation:
        star2Scale 2s ease-in-out infinite alternate,
        star2Color 1.2s ease-in-out infinite alternate;
}

@keyframes star1Scale {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.5);
    }
}

@keyframes star2Scale {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(0.3);
    }
}

@keyframes star1Color {
    0% {
        color: #9d50bb;
    }
    100% {
        color: #ff5f6d;
    }
}

@keyframes star2Color {
    0% {
        color: #ff5f6d;
    }
    100% {
        color: #9d50bb;
    }
}

.search-ai-status-icon {
    width: 72px;
    height: 72px;
}

.search-ai-status-text {
    font-weight: 600;
    text-align: center;
}

.search-ai-status-text.primary {
    font-size: 18px;
}

.search-ai-status-text.secondary {
    font-size: 14px;
    font-weight: 500;
}

.gradient-text {
    background: linear-gradient(90deg, #ff4c4c 0%, #ff9500 27.88%, #a400c1 65.38%, #0015fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-animated {
    background: linear-gradient(90deg, #ff5f6d 0%, #9d50bb 50%, #ff5f6d 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 2s ease-in-out infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.add-health-data-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: none;
    border-radius: 20px;
    padding: 10px 16px;
    background: #f0f5ff;
    color: #000000;
    font-weight: 500;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    height: 40px;
    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.add-health-data-btn:hover {
    background: #e4ecff;
}

.add-health-data-btn:active {
    transform: scale(0.98);
}

.info-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 2px;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.info-pill:hover {
    background: rgba(0, 0, 0, 0.05);
}

.info-pill img {
    width: 18px;
    height: 18px;
}

.add-health-data-label {
    font-size: 13px;
    color: #000000;
    font-weight: 500;
    transition: color 0.2s ease;
    cursor: pointer;
}

/* Health Info Modal Styles */
.health-info-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10001;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.health-info-dialog {
    background: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 500px;
    width: 90%;
    margin: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    animation: slideUp 0.3s ease;
    max-height: 80vh;
    overflow-y: auto;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.health-info-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.health-info-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
}

@media (max-width: 768px) {
    .health-info-dialog {
        width: 95%;
        padding: 20px;
        max-height: 85vh;
    }

    .add-health-data-btn {
        padding: 8px 12px;
        font-size: 12px;
        height: 36px;
    }

    .add-health-data-label {
        font-size: 12px;
    }
}

.search-screen-icon-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-image-upload {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.search-image-input {
    display: none;
}

.search-image-upload .image-upload-btn {
    display: inline-flex;
}

.search-image-preview {
    position: relative;
    width: 52px;
    height: 52px;
    border-radius: 80px;
    overflow: visible;
    display: none;
    align-items: center;
    justify-content: center;
    background: #f0f5ff;
}

.search-image-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 80px;
}

.remove-image-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    z-index: 1;
    padding: 2px;
    background-color: #f3d5df;
    border-radius: 500px;
    border: 2px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    width: auto;
    height: auto;
    min-width: 20px;
    min-height: 20px;
    border: 2px solid #000;
}

.remove-image-btn img {
    width: 8px;
    height: 8px;
    display: block;
}

.search-icon-button {
    width: 52px;
    height: 52px;
    border: 1px solid rgba(91, 176, 189, 0.35);
    border-radius: 80px;
    background: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: box-shadow 0.2s ease;
}

.search-icon-button:hover {
    box-shadow: 0 10px 20px rgba(16, 21, 44, 0.08);
}

.search-screen-body {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.search-tip-card {
    background: #dde4fa;
    border-radius: 12px;
    padding: 10px 10px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    align-self: stretch;
    min-width: 0;
    container-type: inline-size;
}

.search-tip-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.search-ai-results {
    display: none;
    flex-direction: column;
    gap: 24px;
    align-self: stretch;
    width: 100%;
}

.search-ai-results.is-visible {
    display: flex;
}

.search-ai-results-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.ai-results-block {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ai-result-item {
    padding-bottom: 15px;
}

.ai-recipe-tabs {
    justify-content: flex-start;
}

.ai-recipe-card.recipe-card {
    padding: 8px;
    background: rgba(240, 245, 255, 1);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    position: relative;
    z-index: 2;
    overflow: visible;
}

.ai-recipe-card .recipe-image-container {
    border-radius: 8px;
    overflow: hidden;
}

.ai-recipe-card .recipe-info {
    gap: 12px;
    padding-top: 4px;
}

.ai-recipe-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.ai-recipe-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 221, 115, 1) 0%, rgba(250, 170, 49, 1) 100%);
    font-size: 12px;
    font-weight: 600;
    color: rgba(0, 0, 0, 1);
}

.ai-recipe-item-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: transparent;
    border: 1px solid #cee8e1;
    color: rgba(61, 171, 94, 1);
    font-family: Montserrat, sans-serif;
    font-weight: 600;
    font-style: normal;
    font-size: 11px;
    line-height: 1;
    white-space: nowrap;
}

.ai-item-icon {
    width: 16px;
    height: 16px;
}

.ai-recipe-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.ai-recipe-actions .action-btn {
    border-color: #cee7eb;
}

.ai-recipe-actions .ai-recipe-item-count {
    margin-right: 8px;
}

.ai-reason-card {
    background: rgba(221, 228, 250, 1);
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.ai-reason-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.ai-reason-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: Montserrat, sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: 16px;
    line-height: 1.6;
    letter-spacing: 0;
    color: #10152c;
}

.ai-reason-icon {
    width: 20px;
    height: 20px;
}

.ai-reason-toggle {
    border: none;
    background: #ffffff;
    color: #10152c;
    font-weight: 600;
    font-size: 14px;
    padding: 10px 18px;
    border-radius: 999px;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

.ai-reason-toggle:hover {
    background: #f0f3ff;
}

.ai-reason-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ai-added-pill {
    align-self: flex-start;
    padding: 3px 12px 3px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 1);
    background: linear-gradient(90deg, #ff4c4c 0%, #ff9500 27.88%, #a400c1 65.38%, #0015fc 100%);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ai-added-icon {
    width: 14px;
    height: 14px;
}

.ai-reason-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(16, 21, 44, 0.8);
}

.ai-reason-card.collapsed .ai-reason-body {
    display: none;
}

.ai-reason-card.collapsed .ai-reason-toggle {
    color: #5bb0bd;
}

/* Top 10 Badge */
.ai-top-ten-badge {
    align-self: flex-start;
    margin-left: 20px;
    margin-top: 5px;
    margin-bottom: 8px;
    padding: 8px 15px;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffd700 0%, #ffa500 100%);
    font-family: Montserrat, sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #000000;
    line-height: 1;
    z-index: 9;
    display: inline-block;
}

/* AI Load More Button */
.ai-load-more {
    text-align: center;
    padding: 20px;
}

.ai-load-more-btn {
    background-color: #5bb0bd;
    color: #ffffff;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
    font-family: Montserrat, sans-serif;
}

.ai-load-more-btn:hover {
    background-color: #4a9fa8;
}

.ai-load-more-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Matched Ingredients Row */
.recipe-matched-ingredients-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 8px;
    width: 100%;
}

/* Matched Ingredients Button */
.ai-matched-ingredients-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border: 1px solid #c9e9d3;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease;
    font-family: Montserrat, sans-serif;
}

.ai-matched-ingredients-btn:hover {
    background-color: rgba(201, 233, 211, 0.1);
    border-color: #a8d5b8;
}

.ai-matched-icon {
    width: 11px;
    height: 9px;
    display: block;
}

.ai-matched-count {
    font-size: 10px;
    font-weight: 600;
    color: #5bb0bd;
    line-height: 1;
}

/* Matched Ingredients Modal */
.matched-ingredients-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.matched-ingredients-modal[aria-hidden='true'] {
    display: none;
}

.matched-ingredients-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.matched-ingredients-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1;
}

.matched-ingredients-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.matched-ingredients-modal-title {
    font-family: Montserrat, sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #10152c;
    margin: 0;
    flex: 1;
}

.matched-ingredients-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #10152c;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: color 0.2s ease;
}

.matched-ingredients-modal-close:hover {
    color: #5bb0bd;
}

.matched-ingredients-modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
}

.matched-ingredients-modal-subtitle {
    font-family: Montserrat, sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: rgba(16, 21, 44, 0.6);
    margin-bottom: 15px;
}

.matched-ingredients-list {
    max-height: 200px;
    overflow-y: auto;
}

.matched-ingredient-item {
    font-family: Montserrat, sans-serif;
    font-size: 12px;
    color: #10152c;
    margin-bottom: 8px;
    padding-left: 10px;
    line-height: 1.6;
}

.matched-ingredients-modal-footer {
    padding: 20px 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: flex-end;
}

.matched-ingredients-modal-done {
    background: #5bb0bd;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 10px 24px;
    font-family: Montserrat, sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.matched-ingredients-modal-done:hover {
    background: #4a9ba8;
}

.search-tip-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.search-tip-label {
    font-weight: 700;
    color: #10152c;
    font-size: 14px;
}

.search-tip-text {
    margin: 0;
    color: #10152c;
    line-height: 1.5;
    font-size: 14px;
    overflow-wrap: anywhere;
    word-break: normal;
}

.ai-summary-card .search-tip-text {
    font-size: clamp(12px, 2.2cqw, 14px);
}

@container (max-width: 360px) {
    .ai-summary-card {
        gap: 8px;
        padding: 8px;
    }

    .ai-summary-card .search-tip-content {
        gap: 6px;
    }
}

.search-tip-dismiss {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 4px;
}

.search-tip-dismiss img {
    width: 11px;
    height: 11px;
}

.search-screen-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.day-view-right .search-screen-footer {
    padding: 0;
    margin: 0 -20px -20px;
    background: #ffffff;
    box-shadow: 0 -8px 24px rgba(16, 21, 44, 0.08);
    padding: 15px;
}

.search-footer-text {
    flex: 1;
    font-size: 14px;
    color: rgba(16, 21, 44, 0.7);
}

.search-footer-filter-btn {
    min-width: 120px;
    gap: 8px;
    font-weight: 600;
    padding: 14px 20px;
    height: auto;
    color: #5bb0bd !important;
}

/* Recipe Tabs Styles */
.recipe-tabs {
    display: flex;
    gap: 5px;
    min-height: 40px !important;
}

/* Recipe tabs container */
.recipe-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: #dde4fa transparent;
}

.recipe-tabs::-webkit-scrollbar {
    height: 6px;
}

.recipe-tabs::-webkit-scrollbar-track {
    background: transparent;
}

.recipe-tabs::-webkit-scrollbar-thumb {
    background: #dde4fa;
    border-radius: 3px;
}

.recipe-tabs::-webkit-scrollbar-thumb:hover {
    background: #5bb0bd;
}

.recipe-tab {
    padding: 8px 16px;
    border: 1px solid #deeff3;
    background: white;
    cursor: pointer;
    font-weight: 500;
    color: #10152c;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 15px;
    flex-shrink: 0;
    white-space: nowrap;
}

.recipe-tab.active {
    background: #10152c;
    color: white;
}

.recipe-tab:hover {
    background: #deeff3;
    color: #000000;
}

/* Recipe List Styles */
.recipe-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    padding-right: 8px;
    max-height: 200rem;
    margin-top: 10px !important;
}

.recipe-list::-webkit-scrollbar {
    width: 6px;
}

.recipe-list::-webkit-scrollbar-track {
    background: transparent;
}

.recipe-list::-webkit-scrollbar-thumb {
    background: #dde4fa;
    border-radius: 3px;
}

.recipe-list::-webkit-scrollbar-thumb:hover {
    background: #5bb0bd;
}

/* Recipe Image Container */
.recipe-image-container {
    width: 160px;
    height: 160px;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.recipe-list .recipe-image-container {
    min-width: 140px;
    max-width: 240px;
}

.recipe-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recipe-card {
    display: flex;
    gap: 15px;
    padding: 5px;
    border-radius: 10px;
    background: #f0f5ff;
    transition: all 0.2s;
    cursor: pointer;
    min-height: 160px;
    min-width: 325px;
    align-items: flex-start;
}

.recipe-card:hover {
    box-shadow: 0 4px 12px rgba(91, 176, 189, 0.15);
    border-color: #5bb0bd;
}

.recipe-card .recipe-title,
.modal-recipe-card .recipe-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recipe-card.selected {
    border-color: #5bb0bd;
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f4f8 100%);
    box-shadow: 0 4px 12px rgba(91, 176, 189, 0.25);
}

.recipe-image {
    position: relative;
    border-radius: 8px;
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f4f8 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.recipe-emoji {
    font-size: 2em;
}

.recipe-rating,
.recipe-time {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 500;
}

.recipe-rating {
    top: 8px;
    left: 8px;
    background: white;
    padding: 4px 8px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 600;
    color: #10152c;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.recipe-rating img {
    width: 12px;
    height: 12px;
}

.recipe-time {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: #00b5ad;
    padding: 4px 8px;
    border-radius: 45px;
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.recipe-time img {
    width: 12px;
    height: 12px;
}

.recipe-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.recipe-title {
    margin: 0 0 10px 0;
    font-size: 1em;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.recipe-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
    align-self: flex-end;
}

.action-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #cee7eb;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    transform: scale(1.05);
}

.action-btn img {
    width: 16px;
    height: 16px;
}

/* Favorite Icon Container Styles */
.favorite-icon-container {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.favorite-icon-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #cee7eb;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 100%;
    line-height: 1.15;
    margin: 0;
    overflow: visible;
    text-transform: none;
    -webkit-appearance: button;
}

.favorite-icon-btn:hover {
    transform: scale(1.05);
}

.favorite-icon-btn img {
    width: 16px;
    height: 16px;
    filter: brightness(0) saturate(100%) invert(56%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%)
        contrast(100%);
    opacity: 0.6;
}

.favorite-icon-container.favorited .favorite-icon-btn {
    background-color: #e2676c;
    border-color: #e2676c;
}

.favorite-icon-container.favorited .favorite-icon-btn img {
    filter: brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%)
        contrast(100%);
    opacity: 1;
}

/* Workout loading state */
.workout-details-loading {
    text-align: center;
    padding: 20px;
}

/* Workout Card Styles */
.workout-card {
    margin-bottom: 12px;
}

.workout-image-container {
    position: relative;
    width: 100%;
    height: 200px;
    border-radius: 15px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f4f8 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.workout-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.workout-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    gap: 5px;
    z-index: 9;
}

.workout-rating {
    background: white;
    padding: 4px 8px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 600;
    color: #10152c;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.workout-rating img {
    width: 12px;
    height: 12px;
}

.workout-duration {
    background: #5bb0bd;
    padding: 4px 8px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.workout-duration img {
    width: 12px;
    height: 12px;
}

.workout-title-overlay {
    position: absolute;
    bottom: 12px;
    left: 12px;
    color: white;
    font-size: 18px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.workout-actions {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
}

.play-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.play-btn:hover {
    transform: scale(1.05);
}

.play-btn img {
    width: 30px;
    height: 30px;
}

.add-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border: 1px solid #5bb0bd;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 1;
}

.add-btn:hover {
    background: #f0f5ff;
    transform: scale(1.05);
}

.add-btn img {
    width: 20px;
    height: 20px;
}

.note-form,
.drawer-note-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.note-char-counter {
    align-self: flex-end;
    font-size: 11px;
    color: #999;
    line-height: 1;
}

.note-char-counter--limit {
    color: #e53935;
    font-weight: 600;
}

.form-label {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.form-input,
.form-textarea {
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: border-color 0.2s;
}

/* Note form title and description - Frame 1618875374 design specs */
.title-input,
.description-textarea {
    box-sizing: border-box;
    padding: 20px;
    width: 100%;
    min-height: 60px;
    border: 1px solid rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    font-family: Montserrat, -apple-system, Roboto, Helvetica, sans-serif;
    font-style: normal;
    font-weight: 500;
    font-size: 14px;
    line-height: 17px;
    color: #000;
    background: white;
    transition: border-color 0.2s;
}

/* Modal note inputs - match Frame 1618875374 design specs */
.form-input.modal-note-title-input,
.form-textarea.modal-note-description-textarea {
    box-sizing: border-box;
    padding: 20px;
    width: 100%;
    min-height: 60px;
    border: 1px solid rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    font-family: 'Montserrat', -apple-system, Roboto, Helvetica, sans-serif;
    font-style: normal;
    font-weight: 500;
    font-size: 14px;
    line-height: 17px;
    color: #000000;
    background-color: #FFFFFF;
    transition: all 0.2s ease;
}

.form-textarea.modal-note-description-textarea {
    min-height: 203px;
    resize: vertical;
}

.description-textarea {
    min-height: 203px;
    resize: vertical;
}

.title-input:focus,
.description-textarea:focus {
    outline: none;
    border-color: #5bb0bd;
}

.form-input.modal-note-title-input:focus,
.form-textarea.modal-note-description-textarea:focus {
    outline: none;
    border-color: rgba(91, 176, 189, 1);
    box-shadow: 0 0 0 1px rgba(91, 176, 189, 1);
}

.title-input::placeholder,
.description-textarea::placeholder {
    font-family: Montserrat, -apple-system, Roboto, Helvetica, sans-serif;
    font-style: normal;
    font-weight: 500;
    font-size: 14px;
    line-height: 17px;
    color: rgba(0, 0, 0, 0.5);
}

.form-input.modal-note-title-input::placeholder,
.form-textarea.modal-note-description-textarea::placeholder {
    font-family: 'Montserrat', -apple-system, Roboto, Helvetica, sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 17px;
    color: rgba(0, 0, 0, 0.5);
}

.title-input::-webkit-input-placeholder,
.description-textarea::-webkit-input-placeholder {
    font-family: Montserrat, -apple-system, Roboto, Helvetica, sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: rgba(0, 0, 0, 0.5);
}

.form-input.modal-note-title-input::-webkit-input-placeholder,
.form-textarea.modal-note-description-textarea::-webkit-input-placeholder {
    font-family: 'Montserrat', -apple-system, Roboto, Helvetica, sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: rgba(0, 0, 0, 0.5);
}

.title-input::-moz-placeholder,
.description-textarea::-moz-placeholder {
    font-family: Montserrat, -apple-system, Roboto, Helvetica, sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: rgba(0, 0, 0, 0.5);
}

.form-input.modal-note-title-input::-moz-placeholder,
.form-textarea.modal-note-description-textarea::-moz-placeholder {
    font-family: 'Montserrat', -apple-system, Roboto, Helvetica, sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: rgba(0, 0, 0, 0.5);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #5bb0bd;
}

.form-textarea {
    min-height: 80px;
    resize: vertical;
}

.repeat-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.repeat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.repeat-left {
    display: flex;
    align-items: center;
    gap: 5px;
}

.repeat-icon,
.expand-icon {
    width: 16px;
    height: 16px;
}

.repeat-duration {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.repeat-duration-label {
    font-family: Arial, sans-serif;
    font-weight: 400;
    font-style: Regular;
    font-size: 16px;
    line-height: 100%;
    letter-spacing: 0%;
    text-transform: capitalize;
    color: #333;
}

.done-button-container {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 15px;
}

/* Custom Selector Styles */
.custom-select-wrapper {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.custom-select {
    background: #f0f5ff;
    cursor: pointer;
    border: none;
    width: 100%;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s;
}

.custom-select:hover {
    background: #e8f0ff;
}

.dropdown-arrow {
    transition: transform 0.2s;
}

.custom-select.open .dropdown-arrow {
    transform: rotate(180deg);
}

.custom-select-options {
    display: none;
    padding: 8px !important;
    position: absolute;
    width: 100%;
    max-height: 350px;
    overflow-y: auto;
    z-index: 1000;
    background-color: #fff;
    border-radius: 17px;
    box-sizing: border-box;
    box-shadow: 0 5px 10px 0 rgba(0, 0, 0, 0.1);
    bottom: 100%;
    margin-bottom: 8px;
}

.custom-select-options.open {
    display: block;
}

.custom-select-option {
    padding: 10px 12px;
    cursor: pointer;
    border-radius: 10px;
    display: flex;
    gap: 10px;
    margin-bottom: 6px;
    transition: all 0.2s;
}

.custom-select-option:hover {
    background-color: #e8f0ff;
}

.custom-select-option .text {
    font-family: Montserrat, Arial, sans-serif;
    font-size: 15px;
    font-weight: 500;
    line-height: 24px;
    text-align: left;
    color: #10152c;
}

.dropdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 999;
    display: none;
}

.dropdown-overlay.show {
    display: block;
}

/* Custom Repeat Section */
.custom-repeat-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.custom-repeat-label {
    font-family: Arial, sans-serif;
    font-weight: 400;
    font-style: Regular;
    font-size: 16px;
    line-height: 100%;
    letter-spacing: 0%;
    text-transform: capitalize;
    color: #333;
}

.custom-repeat-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.custom-number-select,
.custom-unit-select {
    flex: 1;
    min-width: 120px;
}

/* Repeat End Section */
.repeat-end-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.repeat-end-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.repeat-end-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background-color: #f0f5ff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.repeat-end-option:hover {
    background-color: #e8f0ff;
}

.repeat-end-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.repeat-end-text {
    flex: 1;
    font-family: Montserrat, sans-serif;
    font-weight: 500;
    font-style: Medium;
    font-size: 16px;
    line-height: 100%;
    letter-spacing: 0%;
    color: #333;
}

.radio-button {
    position: relative;
    flex-shrink: 0;
}

.radio-button input[type='radio'] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-button label {
    display: block;
    width: 20px;
    height: 20px;
    border: 2px solid #a6c099;
    border-radius: 50%;
    background-color: white;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.radio-button input[type='radio']:checked + label {
    border-color: #667558;
    background-color: white;
}

.radio-button input[type='radio']:checked + label::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #667558;
}

/* Calendar Container */
.calendar-container {
    margin-top: -12px !important;
    padding: 3px 16px 16px 16px !important;
    background-color: #f0f5ff !important;
    border-radius: 0px 0px 10px 10px !important;
    position: relative !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.calendar-container[style*='display: none'] {
    display: none !important;
}

.calendar-container[style*='display: flex'] {
    display: flex !important;
}

/* Occurrences Input Container */
.occurrences-input-container {
    margin-top: -13px;
    padding: 10px 16px;
    background: #f0f5ff;
    border-radius: 0px 0px 10px 10px;
}

.occurrences-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0 !important;
    border-radius: 12px !important;
    background-color: #ffffff;
    font-family: Montserrat, sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: #333;
    transition: border-color 0.2s;
    height: 40px !important;
    -moz-appearance: textfield !important;
    appearance: textfield !important;
}

.occurrences-input::-webkit-outer-spin-button,
.occurrences-input::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

.occurrences-input:focus {
    outline: none;
    border-color: #5bb0bd;
}

.occurrences-input::placeholder {
    color: #999;
}

/* Select Days Section */
.select-days-section {
    margin-top: 12px;
    padding: 10px 16px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
}

.select-days-label {
    font-family: Arial, sans-serif;
    font-weight: 400;
    font-style: Regular;
    font-size: 16px;
    line-height: 100%;
    letter-spacing: 0%;
    text-transform: capitalize;
    color: #333;
    margin-bottom: 12px;
    display: block;
}

.days-container {
    display: flex !important;
    gap: 8px !important;
    justify-content: flex-start !important;
    align-items: center !important;
    margin-top: 8px !important;
    flex-wrap: nowrap !important;
}

.day-button {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    border: none !important;
    background-color: #f0f5ff !important;
    color: #666 !important;
    font-family: Montserrat, sans-serif !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

.day-button:hover {
    background-color: #e0e0e0 !important;
    color: #333 !important;
}

.day-button.selected {
    background-color: #667558 !important;
    color: #ffffff !important;
}

.day-button.selected:hover {
    background-color: #5a6b4a !important;
    color: #ffffff !important;
}

/* Monthly Options Section */
.monthly-options-section {
    margin-top: 12px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
}

.monthly-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.monthly-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background-color: #f0f5ff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.monthly-option:hover {
    background-color: #e8f0ff;
}

.monthly-option-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.monthly-option-text {
    flex: 1;
    font-family: Montserrat, sans-serif;
    font-weight: 500;
    font-style: Medium;
    font-size: 16px;
    line-height: 100%;
    letter-spacing: 0%;
    color: #333;
}

.monthly-option .radio-button {
    position: relative;
    flex-shrink: 0;
}

.monthly-option .radio-button input[type='radio'] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.monthly-option .radio-button label {
    display: block;
    width: 20px;
    height: 20px;
    border: 2px solid #a6c099;
    border-radius: 50%;
    background-color: white;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.monthly-option .radio-button input[type='radio']:checked + label {
    border-color: #667558;
    background-color: white;
}

.monthly-option .radio-button input[type='radio']:checked + label::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #667558;
}

#end-date-picker {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: white;
    font-family: Montserrat, sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: border-color 0.2s;
    margin-bottom: 16px;
}

#end-date-picker:focus {
    outline: none;
    border-color: #5bb0bd;
}

/* Inline Calendar Styling */
.calendar-container .flatpickr-calendar {
    position: static !important;
    box-shadow: none !important;
    border: none !important;
    margin: 0 auto !important;
    width: auto !important;
    max-width: none !important;
    display: block !important;
}

/* Flatpickr Custom Styling */
.flatpickr-calendar {
    background: #f0f5ff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    font-family: Montserrat, sans-serif !important;
    z-index: 99999 !important;
    position: absolute !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    margin: 0 auto !important;
    width: auto !important;
}

.flatpickr-months {
    background: #f0f5ff !important;
}

.flatpickr-current-month {
    font-family: Montserrat, sans-serif !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    line-height: 100% !important;
    letter-spacing: 0px !important;
    text-align: center !important;
    vertical-align: middle !important;
    color: #000000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
    display: none !important;
}

.flatpickr-current-month .numInputWrapper {
    display: none !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month .numInputWrapper {
    display: none !important;
}

/* Custom month/year display */
.flatpickr-current-month::after {
    content: attr(data-month-year);
    font-family: Montserrat, sans-serif !important;
    font-weight: 600 !important;
    font-style: SemiBold !important;
    font-size: 14px !important;
    line-height: 100% !important;
    letter-spacing: 0px !important;
    text-align: center !important;
    vertical-align: middle !important;
    color: #000000 !important;
}

.flatpickr-weekdays {
    background: #f0f5ff !important;
}

.flatpickr-weekday {
    color: #000000 !important;
    font-weight: 500 !important;
    font-size: 12px !important;
}

.flatpickr-weekday:nth-child(1),
.flatpickr-weekday:nth-child(7) {
    color: #fb3748 !important;
}

.flatpickr-days {
    background: #f0f5ff !important;
}

.dayContainer {
    background: #f0f5ff !important;
}

.flatpickr-day {
    color: #000000 !important;
    border: none !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    border-radius: 50% !important;
    transition: all 0.2s !important;
}

.flatpickr-day:nth-child(7n),
.flatpickr-day:nth-child(7n-6) {
    color: #fb3748 !important;
}

.flatpickr-day:hover {
    background: #e8f0ff !important;
    color: #333 !important;
}

.flatpickr-day.selected {
    background: rgba(91, 176, 189, 1) !important;
    color: white !important;
    border-color: rgba(91, 176, 189, 1) !important;
}

.flatpickr-day.selected:hover {
    background: rgba(91, 176, 189, 1) !important;
    color: white !important;
}

.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
    color: #ccc !important;
}

.flatpickr-day.prevMonthDay:hover,
.flatpickr-day.nextMonthDay:hover {
    background: #f0f0f0 !important;
    color: #999 !important;
}

.flatpickr-prev-month,
.flatpickr-next-month {
    color: #000000 !important;
}

.flatpickr-prev-month:hover,
.flatpickr-next-month:hover {
    color: #5bb0bd !important;
}

.done-btn {
    padding: 12px 24px;
    border: 1px solid #5bb0bd;
    background: white;
    color: #5bb0bd;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.done-btn:hover:not(:disabled) {
    background: #5bb0bd;
    color: white;
}

.done-btn:disabled {
    background: white;
    color: #5bb0bd;
    border-color: #5bb0bd;
    cursor: not-allowed;
    opacity: 0.4;
}

.notify-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notification-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.notification-btn {
    padding: 8px 16px;
    border: none !important;
    background: #f0f5ff;
    color: #333;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.notification-btn:hover,
.notification-btn.active {
    background: #5bb0bd;
    color: white;
    border-color: #5bb0bd;
}

/* Responsive Design for Day View */
@media (max-width: 1024px) {
    .day-view-inline {
        min-height: 500px;
    }

    .day-view-content {
        flex-direction: column;
        min-height: 400px;
    }

    .day-view-left,
    .day-view-right {
        flex: none;
        min-height: 200px;
        padding: 15px;
        height: auto;
    }

    .day-view-left {
        border-right: none;
        border-bottom: 2px solid #e0e0e0;
        margin: 5px;
    }

    .day-view-right {
        margin: 5px;
    }

    .day-calendar-container {
        height: calc(100% - 100px);
        margin-top: 15px;
    }

    .horizontal-date-picker {
        margin-bottom: 15px;
        padding: 12px 40px;
    }

    .add-item-header h3 {
        font-size: 16px;
    }

    .recipe-tabs {
        gap: 6px;
    }

    .recipe-tab {
        font-size: 13px;
        padding: 6px 12px;
    }
}

@media (max-width: 768px) {
    .day-view-left,
    .day-view-right {
        padding: 12px;
        margin: 5px;
    }

    .datetime-picker {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 15px;
    }

    .horizontal-date-picker {
        padding: 12px 30px;
        margin-bottom: 12px;
    }

    .date-picker-header {
        margin-bottom: 8px;
    }

    .date-picker-header {
        margin-bottom: 10px;
    }

    .nav-arrow {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }

    .date-display {
        font-size: 13px;
    }

    .day-strip {
        gap: 4px;
        justify-content: flex-start;
    }

    .day-cell {
        padding: 6px 4px;
        min-width: 40px;
        flex-shrink: 0;
    }

    .day-cell.past-date {
        min-width: 40px;
    }

    .day-name {
        font-size: 9px;
    }

    .day-number {
        font-size: 12px;
    }

    .day-calendar-container {
        height: calc(100% - 70px);
        margin-top: 8px;
    }

    .horizontal-date-picker {
        margin-bottom: 8px;
        padding: 8px 20px;
    }

    .category-tabs {
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 15px;
    }

    .tab-btn {
        padding: 10px 16px 16px 16px;
        font-size: 13px;
    }

    .add-note-btn {
        width: 60px;
        height: 40px;
    }

    .recipe-card {
        flex-direction: column;
        text-align: center;
        min-height: auto;
        padding: 8px;
    }

    .recipe-image {
        width: 100%;
        height: 120px;
    }

    .recipe-image-container {
        width: 100% !important;
        height: 140px !important;
    }

    .recipe-title {
        font-size: 0.9em;
    }

    .recipe-info {
        padding-top: 8px;
        padding-right: 0;
    }

    .btn-add {
        width: 48px;
        height: 38px;
        font-size: 13px;
    }

    .btn-discard {
        font-size: 12px;
        padding: 6px 10px;
    }

    .add-item-header h3 {
        font-size: 15px;
    }

    .search-section {
        flex-direction: column;
        gap: 8px;
    }

    .search-input {
        font-size: 13px;
        padding: 10px 36px 10px 36px !important;
    }

    .day-calendar-label {
        font-size: 10px;
    }

    .day-calendar-label:nth-child(4n + 1) {
        font-size: 11px;
    }

    .datetime-row {
        gap: 3px;
    }

    .time-group {
        gap: 3px;
    }

    .time-display {
        font-size: 13px;
        padding: 6px 10px;
        min-width: 70px;
        flex-shrink: 0;
    }

    .selected-date-display {
        font-size: 13px;
        padding: 6px 12px;
        flex-shrink: 0;
    }

    .time-separator {
        font-size: 14px;
        flex-shrink: 0;
    }

    .form-label {
        font-size: 13px;
    }

    .title-input,
    .description-textarea {
        font-size: 13px !important;
    }

    .repeat-duration-label {
        font-size: 14px;
    }

    .custom-select {
        font-size: 13px;
        padding: 10px 12px;
    }

    .workout-card .workout-image-container {
        height: 160px;
    }

    .workout-badges {
        gap: 4px;
    }

    .workout-rating,
    .workout-duration {
        font-size: 11px;
        padding: 3px 6px;
    }
}

/* day-calendar-labels styles */
.day-calendar-labels {
    display: flex;
    flex-direction: column;
    min-width: 65px;
    margin-top: 0;
    padding-right: 8px;
}

.day-calendar-label {
    font-size: 11px;
    font-weight: 400;
    color: #cccccc;
    text-align: right;
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    transform: translateY(-8px);
    flex-shrink: 0;
    box-sizing: border-box;
    padding-top: 3px !important;
}

/* First item and every 4th item (1st, 5th, 9th, 13th, etc.) */
.day-calendar-label:nth-child(4n + 1) {
    color: #000000;
    font-size: 13px;
}

.gradient-wrapper {
    background: linear-gradient(90deg, #ff4c4c 0%, #ff9500 28%, #a400c1 65%, #0015fc 100%);
    padding: 1px; /* Changed from 3px for thinner border */
    border-radius: 9px; /* Adjusted accordingly */
}

.gradient-input {
    width: 100%;
    padding: 12px 16px;
    background: #2a2a2a;
    color: white;
    border: none;
    border-radius: 8px !important;
}

/* Recipe Add Screen Styles */
.recipe-add-screen,
.workout-add-screen {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.recipe-add-content,
.workout-add-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
    overflow-y: auto;
}

.recipe-add-header,
.workout-add-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
}

.recipe-add-header h3,
.workout-add-header h3 {
    margin: 0;
    font-family: Arial;
    font-weight: 700;
    font-style: Bold;
    font-size: 18px;
    line-height: 100%;
    letter-spacing: 0px;
    vertical-align: middle;
    color: #333;
}

.recipe-add-buttons,
.workout-add-buttons {
    display: flex;
    gap: 10px;
}

/* Recipe Selected Card Styles */
.recipe-selected-card {
    display: flex;
    gap: 15px;
    padding: 5px;
    border-radius: 10px;
    background: #f0f5ff;
    transition: all 0.2s;
    cursor: pointer;
    min-height: 160px;
    align-items: flex-start;
}

/* Workout Selected Card Styles */
.workout-selected-card {
    margin-bottom: 12px;
}

.recipe-selected-card .recipe-image {
    flex-shrink: 0;
}

.recipe-selected-card .recipe-image-container {
    width: 160px;
    height: 160px;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.recipe-selected-card .recipe-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recipe-selected-card .recipe-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding-top: 10px;
    padding-right: 5px;
}

.recipe-selected-card .recipe-title {
    margin: 0 0 10px 0;
    font-size: 1em;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

/* Portions Section Styles */
.portions-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.portions-label {
    font-family: Arial, sans-serif;
    font-weight: 400;
    font-style: Regular;
    font-size: 16px;
    line-height: 100%;
    letter-spacing: 0%;
    text-transform: capitalize;
    color: #333;
}

.portions-selector {
    display: flex;
    align-items: center;
    gap: 0;
    border-radius: 8px;
    border: 1px solid #69adb7;
    width: fit-content;
}

.portions-btn {
    width: 38px;
    height: 38px;
    border: none;
    background: #69adb7;
    color: white;
    border-radius: 8px;
    font-size: 24px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portions-btn:hover {
    background: #4a9ba8;
    transform: scale(1.05);
}

.portions-btn:active {
    transform: scale(0.95);
}

.portions-btn.minus {
    border-radius: 7px 0px 0px 7px;
}

.portions-btn.plus {
    border-radius: 0px 7px 7px 0px;
}

.portions-count {
    width: 48px;
    height: 38px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    padding: 0 8px;
    background: white;
    border: none;
    border-radius: 8px;
    margin: 0 4px;
    outline: none;
}

.portions-count:focus {
    box-shadow: inset 0 0 0 2px rgba(105, 173, 183, 0.32);
}

.portions-count::-webkit-outer-spin-button,
.portions-count::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.portions-count {
    -moz-appearance: textfield;
}

/* Responsive Design for Recipe Add Screen */
@media (max-width: 768px) {
    .recipe-selected-card {
        flex-direction: column;
        text-align: center;
        padding: 8px;
    }

    .recipe-selected-card .recipe-image-container {
        width: 100%;
        height: 140px;
        margin: 0 auto;
    }

    .recipe-selected-card .recipe-title {
        font-size: 0.85em;
    }

    .portions-selector {
        align-self: center;
    }

    .portions-label {
        font-size: 14px;
    }

    .portions-count {
        font-size: 14px;
        height: 34px;
        width: 44px;
    }

    .recipe-add-header,
    .workout-add-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .recipe-add-header h3,
    .workout-add-header h3 {
        font-size: 16px;
    }

    .recipe-add-buttons,
    .workout-add-buttons {
        justify-content: center;
    }
}

/* Additional responsive styles for smaller screens */
@media (max-width: 480px) {
    .day-view-left,
    .day-view-right {
        padding: 10px;
        margin: 3px;
    }

    .datetime-picker {
        margin-bottom: 12px;
    }

    .horizontal-date-picker {
        padding: 10px 20px;
        margin-bottom: 10px;
    }

    .date-picker-header {
        margin-bottom: 6px;
    }

    .nav-arrow {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }

    .date-display {
        font-size: 12px;
    }

    .day-strip {
        gap: 3px;
        justify-content: flex-start;
        padding-bottom: 3px;
    }

    .day-cell {
        padding: 5px 3px;
        min-width: 36px;
        flex-shrink: 0;
    }

    .day-cell.past-date {
        min-width: 36px;
    }

    .day-name {
        font-size: 8px;
    }

    .day-number {
        font-size: 11px;
    }

    .category-tabs {
        gap: 6px;
    }

    .tab-btn {
        padding: 8px 12px 12px 12px;
        font-size: 12px;
    }

    .add-note-btn {
        width: 55px;
        height: 38px;
    }

    .add-item-header h3 {
        font-size: 14px;
    }

    .btn-add {
        width: 45px;
        height: 36px;
    }

    .btn-discard {
        font-size: 11px;
        padding: 5px 8px;
    }

    .search-input {
        font-size: 12px;
        padding: 8px 32px 8px 32px !important;
    }

    .recipe-tabs {
        gap: 4px;
    }

    .recipe-tab {
        font-size: 12px;
        padding: 6px 10px;
    }

    .recipe-card {
        padding: 6px;
    }

    .recipe-title {
        font-size: 0.8em;
    }

    .recipe-rating,
    .recipe-time {
        font-size: 10px;
        padding: 3px 6px;
    }

    .action-btn {
        width: 28px;
        height: 28px;
    }

    .action-btn img {
        width: 14px;
        height: 14px;
    }

    .workout-card .workout-image-container {
        height: 140px;
    }

    .workout-title-overlay {
        font-size: 16px;
    }

    .datetime-row {
        gap: 3px;
    }

    .time-group {
        gap: 2px;
    }

    .time-display {
        font-size: 12px;
        padding: 5px 8px;
        min-width: 65px;
        flex-shrink: 0;
    }

    .selected-date-display {
        font-size: 12px;
        padding: 5px 10px;
        flex-shrink: 0;
    }

    .time-separator {
        font-size: 13px;
        flex-shrink: 0;
    }

    .form-label {
        font-size: 12px;
    }

    .title-input,
    .description-textarea {
        font-size: 12px !important;
        padding: 10px 12px !important;
    }

    .repeat-duration-label {
        font-size: 13px;
    }

    .custom-select {
        font-size: 12px;
        padding: 8px 10px;
    }

    .custom-select-option .text {
        font-size: 13px;
    }

    .day-button {
        width: 36px !important;
        height: 36px !important;
        font-size: 12px !important;
    }

    .notification-btn {
        font-size: 12px;
        padding: 6px 12px;
    }

    .recipe-selected-card .recipe-image-container {
        height: 120px;
    }

    .recipe-selected-card .recipe-title {
        font-size: 0.8em;
    }

    .portions-label {
        font-size: 13px;
    }

    .portions-count {
        font-size: 13px;
        height: 34px;
        width: 42px;
    }

    .portions-btn {
        width: 34px;
        height: 34px;
        font-size: 22px;
    }

    .recipe-details-header,
    .workout-details-header {
        padding: 12px 0px;
    }

    .recipe-details-title,
    .workout-details-title {
        font-size: 16px;
    }

    .btn-back {
        width: 36px;
        height: 36px;
    }

    .filter-modal-title {
        font-size: 16px;
    }

    .filter-section-title {
        font-size: 14px;
    }

    .filter-chip {
        font-size: 12px;
        padding: 6px 12px;
    }

    .search-screen-bar {
        min-height: 56px;
        padding: 12px 16px;
    }

    .search-screen-bar .search-input {
        font-size: 14px;
    }

    .add-health-data-btn {
        font-size: 12px;
        padding: 8px 12px;
        height: 36px;
    }

    .search-icon-button {
        width: 46px;
        height: 46px;
    }

    .ai-recipe-card .recipe-title,
    .drawer-ai-card .recipe-title {
        font-size: 0.85em;
    }

    .ai-reason-title {
        font-size: 14px;
    }

    .ai-reason-text {
        font-size: 13px;
    }
}
/* Only target harnesses within the same parent that overlap */
.fc-timegrid-col-events {
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
}

/* Day view: allow transformed harnesses (repositioned across columns) to extend without clipping */
#dayCalendar .fc-timegrid-cols,
#dayCalendar .fc-timegrid-col-events {
    overflow: visible !important;
}

.fc-timegrid-event-harness {
    position: absolute !important;
}

/* Single event - full width */
.fc-timegrid-col-events:has(.fc-timegrid-event-harness:only-child) .fc-timegrid-event-harness {
    width: 100% !important;
    left: 0 !important;
}

/* Single fixed-width event (recipe/workout/notes) - cap at 300px, never stretch full column.
   Scoped to day view only: week view columns are ~134px so 300px would bleed into the next day. */
.fc-timeGridDay-view .fc-timegrid-col-events:has(.fc-timegrid-event-harness:only-child) .fc-timegrid-event-harness:has(.recipe-event),
.fc-timeGridDay-view .fc-timegrid-col-events:has(.fc-timegrid-event-harness:only-child) .fc-timegrid-event-harness:has(.workout-event),
.fc-timeGridDay-view .fc-timegrid-col-events:has(.fc-timegrid-event-harness:only-child) .fc-timegrid-event-harness:has(.notes-event) {
    width: 300px !important;
}

/* Two events at same time - needs JS for accurate detection */

/* Note Edit Screen Styles */
.note-edit-screen {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.note-edit-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.note-edit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.note-title {
    color: #000000;
    font-family: Arial, sans-serif;
    font-weight: 700;
    font-style: normal;
    font-size: 18px;
    line-height: 100%;
    letter-spacing: 0px;
    vertical-align: middle;
}

.note-edit-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-update {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #cee7eb;
    color: #5bb0bd;
    min-height: 45px;
}

.btn-update:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-update:not(:disabled):hover {
    opacity: 0.8;
}

.btn-delete,
.btn-cancel {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    min-height: 45px;
    min-width: 45px;
}

.btn-delete {
    background-color: #ffdddf;
}

.btn-delete:hover {
    background-color: #ffc6ca;
}

.btn-cancel {
    background-color: #cfd0d6;
}

.btn-delete img,
.btn-cancel img {
    width: 16px;
    height: 16px;
}

/* Note edit screen bottom action buttons */
.note-edit-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: auto;
    padding-top: 24px;
    padding-bottom: 16px;
}

.btn-save-changes {
    padding: 14px 32px;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #b0b0b0;
    color: #ffffff;
    min-height: 48px;
}

.btn-save-changes:not(:disabled) {
    background-color: #5bb0bd;
}

.btn-save-changes:not(:disabled):hover {
    background-color: #4a9daa;
}

.btn-save-changes:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

.note-delete-btn {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    flex: none;
    flex-shrink: 0;
    background: #ffffff;
    border: 1px solid #ff555d;
    border-radius: 40px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.note-delete-btn:hover {
    background-color: rgba(255, 85, 93, 0.08);
}

.note-delete-btn .delete-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

/* Note edit screen datetime display styling */
.note-edit-screen .selected-date-display,
.note-edit-screen .time-display {
    background-color: #deeff3 !important;
}

/* Workout Edit Screen Styles */
.workout-edit-screen {
    width: 100%;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.workout-edit-content {
    width: 100%;
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

.workout-edit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.workout-title {
    color: #000000;
    font-family: Arial, sans-serif;
    font-weight: 700;
    font-style: normal;
    font-size: 18px;
    line-height: 100%;
    letter-spacing: 0px;
    vertical-align: middle;
}

.workout-edit-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Recipe Edit Screen Styles */
.recipe-edit-screen {
    width: 100%;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.recipe-edit-content {
    width: 100%;
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

.recipe-edit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.recipe-title {
    color: #000000;
    font-family: Arial, sans-serif;
    font-weight: 700;
    font-style: normal;
    font-size: 18px;
    line-height: 100%;
    letter-spacing: 0px;
    vertical-align: middle;
}

.recipe-edit-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Workout and Recipe edit screen datetime display styling */
.workout-edit-screen .selected-date-display,
.workout-edit-screen .time-display,
.recipe-edit-screen .selected-date-display,
.recipe-edit-screen .time-display {
    background-color: #deeff3 !important;
}

/* Add borders under sections in edit screens */
.note-edit-screen .datetime-picker,
.workout-edit-screen .datetime-picker,
.recipe-edit-screen .datetime-picker {
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 20px;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.note-edit-screen .repeat-section,
.workout-edit-screen .repeat-section,
.recipe-edit-screen .repeat-section {
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 20px;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.note-edit-screen .notify-section,
.workout-edit-screen .notify-section,
.recipe-edit-screen .notify-section {
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 20px;
    margin-bottom: 20px;
    flex-shrink: 0;
}

/* Position dropdown below in edit screens */
.note-edit-screen .custom-select-options,
.workout-edit-screen .custom-select-options,
.recipe-edit-screen .custom-select-options {
    bottom: auto !important;
}

/* Recipe Details Header Styles */
.recipe-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0px;
    background-color: #ffffff;
    border-radius: 12px 12px 0 0;
}

.btn-back {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e5e5e5;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-back:hover {
    background-color: #d0d0d0;
}

.btn-back img {
    width: 16px;
    height: 16px;
}

.recipe-details-title {
    color: #000000;
    font-family: Arial, sans-serif;
    font-weight: 700;
    font-size: 18px;
    padding: 10px 5px;
    flex: 1;
}

/* Workout Details Header Styles */
.workout-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0px;
    background-color: #ffffff;
    border-radius: 12px 12px 0 0;
    border-bottom: 1px solid #e0e0e0;
}

.workout-details-title {
    color: #000000;
    font-family: Arial, sans-serif;
    font-weight: 700;
    font-size: 18px;
    flex: 1;
    padding: 10px 5px;
}

/* Recipe Details Section Styles */
.recipe-details-section {
    margin-top: 20px;
    background-color: #ffffff;
    border-radius: 12px;
    overflow: visible;
    flex-shrink: 0;
    max-height: none;
    width: 100%;
}

/* Make recipe-details-section scrollable when directly in add-item-panel (not in edit-content) */
.add-item-panel > .recipe-details-section {
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    max-height: calc(100vh - 100px);
    height: 100%;
}

/* Filter Modal Styles */
.filter-modal {
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.filter-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
}

.btn-cancel {
    background: none;
    border: none;
    color: #000000;
    font-family: Arial, sans-serif;
    font-weight: 400;
    font-size: 16px;
    cursor: pointer;
}

.filter-modal-title {
    color: #000000;
    font-family: Arial, sans-serif;
    font-weight: 700;
    font-size: 18px;
    text-align: center;
    flex: 1;
    position: relative;
}

.filter-modal-title::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background-color: #000000;
}

.btn-clear {
    background: none;
    border: none;
    color: #ff555d;
    font-family: Arial, sans-serif;
    font-weight: 400;
    font-size: 16px;
    cursor: pointer;
}

.filter-modal-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.filter-section {
    margin-bottom: 30px;
}

.filter-section-title {
    color: #000000;
    font-family: Arial, sans-serif;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 15px;
}

.search-input-container {
    margin-bottom: 20px;
}

.filter-search-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-family: Arial, sans-serif;
    font-size: 16px;
    background-color: #f8f8f8;
    outline: none;
}

.filter-search-input:focus {
    border-color: var(--bs-primary);
    background-color: #ffffff;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-chip {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 8px 16px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #000000;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.filter-chip:hover {
    border-color: var(--bs-primary);
    background-color: #f0f9f9;
}

.filter-chip.selected {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #ffffff;
}

.filter-apply-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.btn-apply {
    width: 100%;
    background-color: var(--bs-primary);
    border: none;
    border-radius: 8px;
    padding: 16px;
    font-family: Arial, sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-apply:hover {
    background-color: #0eb5a8;
}

.recipe-image-container {
    position: relative;
    width: 100%;
}

.recipe-main-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

.recipe-image-overlay {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-add-to-planner {
    background-color: #fff;
    border: none;
    border-radius: 5px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: background-color 0.2s ease;
    border: 1px solid #5bb0bd;
}

.btn-add-to-planner:hover {
    background-color: #fff;
}

.btn-add-to-planner img {
    width: 18px;
    height: 18px;
}

.btn-favorite {
    background-color: #fff;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border: 1px solid #5bb0bd;
}

.btn-favorite:hover {
    background-color: #fff;
}

.btn-favorite img {
    width: 10px;
    height: 10px;
}

.recipe-description {
    color: #333333;
    font-family: Arial, sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 14px;
    line-height: 1.4;
    letter-spacing: 0px;
    text-align: left;
}

/* Recipe Nutritional Value Section */
.recipe-nutritional-value {
    background-color: #f5f5f5;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.nutritional-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.nutritional-title {
    color: #333333;
    font-family: Arial, sans-serif;
    font-weight: 600;
    font-size: 16px;
}

.chevron-icon {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.nutritional-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 12px;
}

.nutritional-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.nutritional-label {
    color: #666666;
    font-family: Arial, sans-serif;
    font-weight: 400;
    font-size: 14px;
}

.nutritional-value {
    color: #333333;
    font-family: Arial, sans-serif;
    font-weight: 500;
    font-size: 14px;
}

/* Recipe Tags Section */
.recipe-tags {
    margin-top: 15px;
}

.tags-title {
    color: #333333;
    font-family: Arial, sans-serif;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 10px;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background-color: #e0e0e0;
    color: #333333;
    padding: 6px 12px;
    border-radius: 20px;
    font-family: Arial, sans-serif;
    font-weight: 400;
    font-size: 12px;
}

/* Recipe Ingredients Section */
.recipe-ingredients {
    margin-top: 15px;
}

.ingredients-title {
    color: #333333;
    font-family: Arial, sans-serif;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 10px;
}

.ingredients-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ingredient-item {
    color: #333333;
    font-family: Arial, sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.4;
}

/* Recipe Sauce Section */
.recipe-sauce {
    margin-top: 15px;
}

.sauce-title {
    color: #333333;
    font-family: Arial, sans-serif;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 10px;
}

.sauce-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sauce-item {
    color: #333333;
    font-family: Arial, sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.4;
}

/* Recipe Toppings Section */
.recipe-toppings {
    margin-top: 15px;
}

.toppings-title {
    color: #333333;
    font-family: Arial, sans-serif;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 10px;
}

.toppings-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.topping-item {
    color: #333333;
    font-family: Arial, sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.4;
}

/* Recipe Directions Section */
.recipe-directions {
    margin-top: 15px;
}

.directions-title {
    color: #333333;
    font-family: Arial, sans-serif;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 10px;
}

.directions-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.direction-item {
    color: #333333;
    font-family: Arial, sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.4;
}

/* Recipe Notes Section */
.recipe-notes {
    margin-top: 15px;
}

.notes-title {
    color: #333333;
    font-family: Arial, sans-serif;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 10px;
}

.notes-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.note-item {
    color: #333333;
    font-family: Arial, sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.4;
}

/* Workout Details Section Styles */
.workout-details-section {
    margin-top: 20px;
    flex-shrink: 0;
    max-height: none;
    width: 100%;
}

/* Make workout-details-section scrollable when directly in add-item-panel (not in edit-content) */
.add-item-panel > .workout-details-section {
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    max-height: calc(100vh - 100px);
    height: 100%;
}

.workout-details-title {
    color: #000000;
    font-family: Arial, sans-serif;
    font-weight: 700;
    font-style: normal;
    font-size: 18px;
    line-height: 100%;
    letter-spacing: 0px;
}

.workout-video-container {
    position: relative;
    width: 100%;
    margin-bottom: 15px;
}

.workout-video-player-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background-color: #000;
}

.workout-video-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.workout-video-thumbnail {
    position: relative;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
}

.workout-main-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.video-play-overlay {
    position: absolute;
    bottom: 20px;
    left: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.play-button {
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.play-button img {
    width: 20px;
    height: 20px;
    filter: invert(1);
}

.video-duration {
    color: white;
    font-size: 14px;
    font-weight: 500;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 4px 8px;
    border-radius: 4px;
}

.video-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background-color: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
}

.progress-bar {
    flex: 1;
    height: 100%;
    background-color: #000;
}

.progress-arrow {
    width: 20px;
    height: 20px;
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 5px;
}

.progress-arrow img {
    width: 12px;
    height: 12px;
    filter: invert(1);
}

.workout-action-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    margin-top: 10px;
}

.workout-right-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-workout-duration {
    background-color: var(--bs-primary);
    border: none;
    border-radius: 20px;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-size: 12px;
    color: white;
    font-weight: 500;
}

.btn-workout-duration img {
    width: 14px;
    height: 14px;
}

.workout-schedule {
    margin-bottom: 15px;
}

.schedule-info {
    background-color: rgba(16, 202, 191, 0.05);
    border-radius: 20px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    color: #333;
}

.edit-icon {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.workout-description {
    color: #333333;
    font-family: Arial, sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 14px;
    line-height: 1.4;
    letter-spacing: 0px;
    text-align: left;
}

/* Workout Tags Section Styles */
.workout-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
    margin-bottom: 15px;
}

.workout-tag {
    display: inline-block;
    background-color: rgba(16, 202, 191, 0.1);
    color: var(--bs-primary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid rgba(16, 202, 191, 0.3);
}

/* Workout Metadata Section Styles */
.workout-metadata {
    background-color: rgba(16, 202, 191, 0.05);
    border: 1px solid var(--bs-primary);
    border-radius: 15px;
    padding: 15px;
    margin-top: 15px;
}

.metadata-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding: 4px 0;
}

.metadata-item:last-child {
    margin-bottom: 0;
}

.metadata-label {
    color: #10152c;
    font-family: Arial, sans-serif;
    font-weight: 600;
    font-style: normal;
    font-size: 14px;
    line-height: 1.2;
    letter-spacing: 0px;
}

.metadata-value {
    color: #a7a6a7;
    font-family: Arial, sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 14px;
    line-height: 1.2;
    letter-spacing: 0px;
    text-align: right;
}

/* Ingredients List Styles */
.search-ingredients-container {
    border-radius: 12px;
}

.search-ingredients-title {
    font-family: Arial, sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #10152c;
    margin-bottom: 16px;
}

.search-ingredients-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.search-ingredient-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f0f5ff;
    border-radius: 8px;
    transition: all 0.2s;
}

.search-ingredient-item:hover {
    background: #e0e9ff;
}

.search-ingredient-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.search-ingredient-name {
    font-family: Arial, sans-serif;
    font-weight: 400;
    font-size: 16px;
    color: #10152c;
}

.search-ingredient-details {
    font-family: Arial, sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #adb2c0;
    margin-top: 4px;
}

.search-ingredient-edit-container {
    flex: 1;
    display: flex;
    gap: 8px;
    align-items: center;
}

.search-ingredient-name-input,
.search-ingredient-quantity-input,
.search-ingredient-format-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    color: #10152c;
    background: #ffffff;
}

.search-ingredient-name-input {
    flex: 2;
}

.search-ingredient-quantity-input,
.search-ingredient-format-input {
    flex: 1;
    max-width: 80px;
}

.search-ingredient-actions {
    display: flex;
    align-items: center;
    margin-left: 10px;
}

.search-ingredient-edit-btn,
.search-ingredient-delete-btn {
    background: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}

.search-ingredient-save-btn,
.search-ingredient-cancel-btn {
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.search-ingredient-edit-btn:hover {
    background: #f0f0f0;
}

.search-ingredient-delete-btn {
    background: transparent;
}

.search-ingredient-delete-btn:hover {
    background: #ffe0e0;
}

.search-ingredient-save-btn {
    background: #cbd0b8;
    border-radius: 20px;
    padding: 8px;
    margin-right: 10px;
}

.search-ingredient-save-btn:hover {
    background: #b5bc9f;
}

.search-ingredient-cancel-btn {
    background: #f3d5df;
    border-radius: 20px;
    padding: 8px;
}

.search-ingredient-cancel-btn:hover {
    background: #e6c4d0;
}

.search-ingredient-edit-btn img,
.search-ingredient-delete-btn img {
    width: 16px;
    height: 16px;
}

.search-ingredient-save-btn img {
    width: 12px;
    height: 12px;
    /* Check icon should be primary color - the SVG should already have the correct color */
}

.search-ingredient-cancel-btn img {
    width: 12px;
    height: 12px;
    /* Color the cancel icon to red (#FF0000) to match React Native */
    filter: brightness(0) saturate(100%) invert(14%) sepia(94%) saturate(7151%) hue-rotate(353deg) brightness(1);
}

/* Find Recipes Button */
.search-find-recipes-footer {
    padding: 16px 0;
    margin-top: 16px;
}

.find-recipes-btn {
    width: 100%;
    padding: 14px 24px;
    background: #5bb0bd;
    color: white;
    border: none;
    border-radius: 8px;
    font-family: Arial, sans-serif;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.find-recipes-btn:hover {
    background: #4a9ba8;
}

.find-recipes-btn:active {
    transform: scale(0.98);
}

/* Edit Schedule Modal Styles */
.edit-schedule-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.edit-schedule-modal {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.edit-schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.edit-schedule-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #000;
    margin: 0;
}

.edit-schedule-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-delete-schedule,
.btn-close-schedule {
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.btn-delete-schedule:hover {
    background-color: #fee;
}

.btn-close-schedule:hover {
    background-color: #f3f4f6;
}

.btn-delete-schedule img,
.btn-close-schedule img {
    width: 20px;
    height: 20px;
}

.edit-schedule-content {
    padding: 24px;
}

.workout-thumbnail {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
}

.workout-thumbnail .thumbnail-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.workout-thumbnail .workout-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    padding: 16px;
}

.workout-thumbnail .workout-title-overlay {
    color: white;
    font-size: 16px;
    font-weight: 600;
}

.workout-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: #f0f9fb;
    border-radius: 12px;
    margin-bottom: 24px;
}

.workout-preview .duration-icon {
    width: 20px;
    height: 20px;
}

.workout-preview .duration-text {
    font-size: 14px;
    font-weight: 600;
    color: #2c7a89;
}

.schedule-section {
    margin-bottom: 24px;
}

.schedule-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
}

.schedule-date-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: #f9fafb;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.schedule-date-display:hover {
    background: #f3f4f6;
}

.selected-schedule-date {
    font-size: 15px;
    font-weight: 500;
    color: #111827;
}

.edit-date-icon {
    width: 18px;
    height: 18px;
    opacity: 0.6;
}

.date-picker-container {
    margin-top: 12px;
    padding: 16px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

#edit-schedule-calendar {
    width: 100%;
}

.time-slots {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.time-slot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: #f9fafb;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.time-slot:hover {
    background: #f3f4f6;
}

.time-slot-value {
    font-size: 15px;
    font-weight: 500;
    color: #111827;
}

.edit-time-icon {
    width: 16px;
    height: 16px;
    opacity: 0.6;
}

.btn-proceed-update {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #5bb0bd 0%, #4a9aa6 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition:
        transform 0.2s,
        box-shadow 0.2s;
    margin-top: 24px;
}

.btn-proceed-update:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(91, 176, 189, 0.3);
}

.btn-proceed-update:active {
    transform: translateY(0);
}

/* Mobile responsive */
@media (max-width: 640px) {
    .edit-schedule-modal {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .time-slots {
        grid-template-columns: 1fr;
    }
}

/* Time Picker Modal Styles */
.time-picker-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    padding: 20px;
}

.time-picker-modal {
    background: white;
    border-radius: 16px;
    max-width: 400px;
    width: 100%;
    max-height: 600px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.time-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.time-picker-header h4 {
    font-size: 18px;
    font-weight: 700;
    color: #000;
    margin: 0;
}

.btn-close-time-picker {
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.btn-close-time-picker:hover {
    background-color: #f3f4f6;
}

.btn-close-time-picker img {
    width: 20px;
    height: 20px;
}

.time-picker-list {
    overflow-y: auto;
    padding: 8px;
    max-height: 500px;
}

.time-option {
    padding: 16px 20px;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.2s;
    font-size: 15px;
    color: #374151;
    text-align: center;
    margin-bottom: 4px;
}

.time-option:hover {
    background-color: #f3f4f6;
}

.time-option.selected {
    background: linear-gradient(135deg, #5bb0bd 0%, #4a9aa6 100%);
    color: white;
    font-weight: 600;
}

.time-option--disabled {
    color: #c0c0c0;
    cursor: not-allowed;
    text-decoration: line-through;
    pointer-events: none;
}

.time-option--disabled:hover {
    background-color: transparent;
}

/* Mobile responsive for time picker */
@media (max-width: 640px) {
    .time-picker-modal {
        max-width: 100%;
        max-height: 80vh;
        border-radius: 16px 16px 0 0;
        position: fixed;
        bottom: 0;
        top: auto;
    }

    .time-picker-overlay {
        align-items: flex-end;
    }
}

/* Additional responsive styles for modals and forms */
@media (max-width: 768px) {
    .recipe-details-header .recipe-title {
        font-size: 16px;
    }

    .note-edit-screen .note-title,
    .workout-edit-screen .workout-title,
    .recipe-edit-screen .recipe-title {
        font-size: 16px;
    }

    .btn-update {
        font-size: 13px;
        padding: 6px 12px;
        min-height: 40px;
    }

    .btn-delete,
    .btn-cancel {
        min-height: 40px;
        min-width: 40px;
    }

    .btn-save-changes {
        font-size: 14px;
        padding: 12px 24px;
        min-height: 44px;
    }

    .edit-schedule-header h3 {
        font-size: 16px;
    }

    .schedule-label {
        font-size: 13px;
    }

    .selected-schedule-date,
    .time-slot-value {
        font-size: 14px;
    }

    .btn-proceed-update {
        font-size: 14px;
        padding: 14px;
    }

    .time-picker-header h4 {
        font-size: 16px;
    }

    .time-option {
        padding: 14px 16px;
        font-size: 14px;
    }

    .matched-ingredients-modal-title {
        font-size: 16px;
    }

    .matched-ingredients-modal-subtitle {
        font-size: 11px;
    }

    .matched-ingredient-item {
        font-size: 11px;
    }

    .matched-ingredients-modal-done {
        font-size: 13px;
        padding: 8px 20px;
    }

    .search-tip-label,
    .search-tip-text {
        font-size: 13px;
    }

    .search-footer-text {
        font-size: 13px;
    }

    .search-footer-filter-btn {
        font-size: 14px;
        padding: 12px 16px;
    }

    .recipe-description,
    .workout-description {
        font-size: 13px;
    }

    .nutritional-title {
        font-size: 14px;
    }

    .nutritional-label,
    .nutritional-value {
        font-size: 13px;
    }

    .tags-title,
    .ingredients-title,
    .directions-title,
    .notes-title {
        font-size: 14px;
    }

    .tag {
        font-size: 11px;
        padding: 5px 10px;
    }

    .ingredient-item,
    .direction-item,
    .note-item {
        font-size: 13px;
    }

    .workout-tag {
        font-size: 11px;
        padding: 5px 10px;
    }

    .metadata-label,
    .metadata-value {
        font-size: 13px;
    }

    .search-ingredients-title {
        font-size: 14px;
    }

    .search-ingredient-name {
        font-size: 14px;
    }

    .search-ingredient-details {
        font-size: 12px;
    }

    .find-recipes-btn {
        font-size: 14px;
        padding: 12px 20px;
    }
}

@media (max-width: 480px) {
    .recipe-details-header .recipe-title {
        font-size: 14px;
    }

    .note-edit-screen .note-title,
    .workout-edit-screen .workout-title,
    .recipe-edit-screen .recipe-title {
        font-size: 14px;
    }

    .btn-update {
        font-size: 12px;
        padding: 6px 10px;
        min-height: 38px;
    }

    .btn-delete,
    .btn-cancel {
        min-height: 38px;
        min-width: 38px;
    }

    .btn-save-changes {
        font-size: 13px;
        padding: 10px 20px;
        min-height: 40px;
    }

    .btn-delete img,
    .btn-cancel img {
        width: 14px;
        height: 14px;
    }

    .edit-schedule-header h3 {
        font-size: 14px;
    }

    .schedule-label {
        font-size: 12px;
    }

    .selected-schedule-date,
    .time-slot-value {
        font-size: 13px;
    }

    .btn-proceed-update {
        font-size: 13px;
        padding: 12px;
    }

    .time-picker-header h4 {
        font-size: 14px;
    }

    .time-option {
        padding: 12px 14px;
        font-size: 13px;
    }

    .matched-ingredients-modal-title {
        font-size: 14px;
    }

    .matched-ingredients-modal-subtitle {
        font-size: 10px;
    }

    .matched-ingredient-item {
        font-size: 10px;
    }

    .matched-ingredients-modal-done {
        font-size: 12px;
        padding: 8px 16px;
    }

    .search-tip-label,
    .search-tip-text {
        font-size: 12px;
    }

    .search-footer-text {
        font-size: 12px;
    }

    .search-footer-filter-btn {
        font-size: 13px;
        padding: 10px 14px;
    }

    .recipe-description,
    .workout-description {
        font-size: 12px;
    }

    .nutritional-title {
        font-size: 13px;
    }

    .nutritional-label,
    .nutritional-value {
        font-size: 12px;
    }

    .tags-title,
    .ingredients-title,
    .directions-title,
    .notes-title {
        font-size: 13px;
    }

    .tag {
        font-size: 10px;
        padding: 4px 8px;
    }

    .ingredient-item,
    .direction-item,
    .note-item {
        font-size: 12px;
    }

    .workout-tag {
        font-size: 10px;
        padding: 4px 8px;
    }

    .metadata-label,
    .metadata-value {
        font-size: 12px;
    }

    .search-ingredients-title {
        font-size: 13px;
    }

    .search-ingredient-name {
        font-size: 13px;
    }

    .search-ingredient-details {
        font-size: 11px;
    }

    .find-recipes-btn {
        font-size: 13px;
        padding: 10px 16px;
    }

    .filter-modal-header {
        padding: 12px 16px;
    }

    .btn-cancel,
    .btn-clear {
        font-size: 14px;
    }

    .filter-modal-title {
        font-size: 14px;
    }

    .filter-modal-content {
        padding: 16px;
    }

    .filter-section-title {
        font-size: 13px;
        margin-bottom: 12px;
    }

    .filter-search-input {
        font-size: 14px;
        padding: 10px 12px;
    }

    .filter-chip {
        font-size: 11px;
        padding: 6px 10px;
    }

    .btn-apply {
        font-size: 14px;
        padding: 14px;
    }

    .recipe-details-header,
    .workout-details-header {
        padding: 10px 0px;
    }

    .recipe-details-title,
    .workout-details-title {
        font-size: 14px;
    }

    .btn-back {
        width: 32px;
        height: 32px;
    }

    .btn-back img {
        width: 14px;
        height: 14px;
    }

    .btn-add-to-planner {
        font-size: 12px;
        padding: 6px 10px;
    }

    .btn-add-to-planner img {
        width: 16px;
        height: 16px;
    }

    .workout-main-image,
    .recipe-main-image {
        height: 160px;
    }

    .schedule-info {
        font-size: 12px;
        padding: 6px 10px;
    }

    .btn-workout-duration {
        font-size: 11px;
        padding: 5px 8px;
    }

    .video-duration {
        font-size: 12px;
    }

    .play-button {
        width: 40px;
        height: 40px;
    }

    .play-button img {
        width: 16px;
        height: 16px;
    }
}

/* Extra small mobile screens */
@media (max-width: 375px) {
    .week-navigation .nav-arrow {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .week-range {
        font-size: 11px;
        margin: 0 4px;
    }

    .date-text {
        font-size: 11px;
    }

    .fc-col-header-cell {
        padding: 2px 0;
    }

    .fc-col-header-cell .fc-day-header-weekday {
        font-size: 9px;
    }

    .fc-col-header-cell .fc-day-header-number {
        width: 18px;
        height: 18px;
    }

    .fc-col-header-cell .fc-day-header-number span {
        font-size: 8px;
    }

    .fc-event {
        font-size: 0.6em;
    }

    .fc-event-category-label {
        font-size: 6px;
    }

    .fc-event-category-label + .fc-event-title {
        font-size: 8px;
    }

    .fc-timegrid-slot {
        height: 125px;
    }

    .fc-timegrid-slot-label-cushion {
        font-size: 8px !important;
    }

    .day-view-left,
    .day-view-right {
        padding: 8px;
    }

    .horizontal-date-picker {
        padding: 8px 15px;
        margin-bottom: 8px;
    }

    .date-picker-header {
        margin-bottom: 5px;
    }

    .day-strip {
        gap: 2px;
        justify-content: flex-start;
        padding-bottom: 2px;
    }

    .day-cell {
        padding: 4px 2px;
        min-width: 32px;
        flex-shrink: 0;
    }

    .day-cell.past-date {
        min-width: 32px;
    }

    .day-name {
        font-size: 7px;
    }

    .day-number {
        font-size: 10px;
    }

    .datetime-picker {
        margin-bottom: 10px;
    }

    .tab-btn {
        padding: 6px 10px 10px 10px;
        font-size: 11px;
    }

    .add-note-btn {
        width: 50px;
        height: 36px;
    }

    .add-item-header h3 {
        font-size: 13px;
    }

    .btn-add {
        width: 42px;
        height: 34px;
    }

    .btn-discard {
        font-size: 10px;
        padding: 4px 6px;
    }

    .recipe-tab {
        font-size: 11px;
        padding: 5px 8px;
    }

    .recipe-image-container {
        min-width: 100px !important;
        height: 100px !important;
    }

    .recipe-title {
        font-size: 0.75em;
    }

    .recipe-selected-card .recipe-title {
        font-size: 0.75em;
    }

    .recipe-details-header .recipe-title {
        font-size: 13px;
    }

    .recipe-rating,
    .recipe-time {
        font-size: 9px;
        padding: 2px 4px;
    }

    .action-btn {
        width: 26px;
        height: 26px;
    }

    .action-btn img {
        width: 12px;
        height: 12px;
    }

    .search-input {
        font-size: 11px;
        padding: 6px 28px 6px 28px !important;
    }

    .search-icon,
    .filter-icon {
        width: 14px;
        height: 14px;
    }

    .datetime-row {
        gap: 2px;
    }

    .time-group {
        gap: 2px;
    }

    .time-display {
        font-size: 11px;
        padding: 5px 6px;
        min-width: 60px;
        flex-shrink: 0;
    }

    .selected-date-display {
        font-size: 11px;
        padding: 5px 8px;
        flex-shrink: 0;
    }

    .time-separator {
        font-size: 12px;
        flex-shrink: 0;
    }

    .form-label {
        font-size: 11px;
    }

    .title-input,
    .description-textarea {
        font-size: 11px !important;
        padding: 8px 10px !important;
    }

    .custom-select {
        font-size: 11px;
        padding: 7px 8px;
    }

    .day-button {
        width: 32px !important;
        height: 32px !important;
        font-size: 11px !important;
    }

    .notification-btn {
        font-size: 11px;
        padding: 5px 10px;
    }

    .portions-btn {
        width: 32px;
        height: 32px;
        font-size: 20px;
    }

    .portions-count {
        font-size: 12px;
        height: 32px;
        width: 40px;
    }

    .day-calendar-label {
        font-size: 9px;
        min-width: 55px;
    }

    .day-calendar-label:nth-child(4n + 1) {
        font-size: 10px;
    }
}

/* Landscape mode for tablets */
@media (min-width: 769px) and (max-width: 1024px) and (orientation: landscape) {
    .day-view-content {
        flex-direction: row;
    }

    .day-view-left {
        border-right: 2px solid #e0e0e0;
        border-bottom: none;
    }

    .recipe-card,
    .recipe-selected-card {
        flex-direction: row;
        text-align: left;
    }

    .recipe-image-container {
        width: 150px !important;
        height: 150px !important;
    }
}

/* Add Item Drawer (Side Panel) Styles */
/* Overlay top is set dynamically via JS to align with the bottom of .bannerEval */
/* Overlay left matches sidebar width (excludes sidebar from dimming); uses same var as #sideBar */
.add-item-drawer-overlay {
    --add-item-drawer-overlay-left: var(--layout2-sidebar-width, 265px);
    position: fixed;
    top: var(--add-item-drawer-overlay-top, 0px);
    left: var(--add-item-drawer-overlay-left);
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    z-index: 10000;
}

@media (max-width: 991px) {
    .add-item-drawer-overlay {
        --add-item-drawer-overlay-left: 0;
        padding: 0 20px;
    }
}

.recipe-planner-drawer {
    container-name: planner-drawer;
    container-type: inline-size;
    border-radius: 8px 0 0 8px;
    background-color: #fff;
    display: flex;
    flex: 1;
    min-width: 359px;
    width: min(700px, 100%);
    max-width: 100%;
    height: 100%;
    min-height: 0;
    max-height: 100vh;
    padding-top: 16px;
    flex-direction: column;
    overflow: hidden;
    align-items: stretch;
    justify-content: flex-start;
    border: 1px solid rgba(0, 0, 0, 0.15);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
}

.modal-recipe-card {
    cursor: grab;
    user-select: none;
}

.modal-recipe-card:active {
    cursor: grabbing;
}

.modal-recipe-card.recipe-drop-pending {
    cursor: wait;
    opacity: 0.65;
    pointer-events: none;
}

.modal-recipe-card .recipe-add-btn,
.modal-recipe-card .action-icon {
    cursor: pointer;
}

body.planner-split-view .fc-timegrid-slot-lane {
    transition: background-color 120ms ease, box-shadow 120ms ease;
}

body.planner-split-view .fc-timegrid-slot-lane:hover {
    background: rgba(85, 173, 186, 0.08);
    box-shadow: inset 0 1px 0 rgba(85, 173, 186, 0.18), inset 0 -1px 0 rgba(85, 173, 186, 0.18);
}

/* On sufficiently wide note/evaluation workspaces, reserve real page space
   for the drawer so professionals can keep editing while browsing. Narrower
   desktops retain the overlay drawer to avoid compressing the week calendar. */
@media (min-width: 992px) {
    body.layout2-note-page.planner-split-view {
        --planner-split-drawer-width: clamp(520px, 42vw, 900px);
    }

    /* Keep the client-interest selector at the outer edge of the full header,
       independent of the draggable editor/planner split. */
    body.layout2-note-page.planner-split-view .main-content.note-page-layout .bannerEval {
        z-index: 10002;
    }

    body.layout2-note-page.planner-split-view .main-content.note-page-layout .pageTitleEval #preferencesBtn {
        position: fixed;
        top: calc(var(--sb2-topbar-h, 50px) + 8px);
        right: 16px;
        width: auto;
        height: auto;
        background: transparent !important;
        z-index: 10003;
    }

    body.layout2-note-page.planner-split-view .main-content.note-page-layout .dropdown-preferences {
        right: 16px;
        z-index: 10003;
    }

    body.layout2-note-page.planner-split-view #rightContainer {
        margin-right: var(--planner-split-drawer-width);
        min-width: 0;
        container-name: planner-editor;
        container-type: inline-size;
        transition: margin-right 0.25s ease;
    }

    body.layout2-note-page.planner-split-resizing #rightContainer,
    body.layout2-note-page.planner-split-resizing .add-item-drawer-overlay,
    body.layout2-note-page.planner-window-resizing #rightContainer,
    body.layout2-note-page.planner-window-resizing .add-item-drawer-overlay {
        transition: none;
    }

    body.layout2-note-page.planner-split-view .add-item-drawer-overlay {
        top: calc(var(--sb2-topbar-h, 50px) + var(--planner-split-banner-height, 48px));
        left: auto;
        width: var(--planner-split-drawer-width);
        padding: 0;
        background: transparent;
        pointer-events: none;
    }

    body.layout2-note-page.planner-split-view .add-item-drawer-overlay::before {
        content: '';
        position: absolute;
        right: 0;
        bottom: 100%;
        left: 0;
        height: var(--planner-split-banner-height, 48px);
        background: var(--bs-primary);
        border-bottom: 1px solid #2c9ca8;
        pointer-events: none;
    }

    body.layout2-note-page.planner-split-view .add-item-drawer-overlay::after {
        content: '';
        position: absolute;
        right: 0;
        bottom: calc(100% + var(--planner-split-banner-height, 48px));
        left: 0;
        height: var(--sb2-topbar-h, 50px);
        background: #fff;
        pointer-events: none;
    }

    body.layout2-note-page.planner-split-view .recipe-planner-drawer {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        border-radius: 0;
        pointer-events: auto;
    }

    body.layout2-note-page.planner-split-view #secondSuiviColumn,
    body.layout2-note-page.planner-split-view .toggle-eval-menu-btn,
    body.layout2-note-page.planner-split-view .eval-menu-backdrop {
        display: none !important;
    }

    body.layout2-note-page.planner-split-view #firstSuiviColumn {
        width: 100% !important;
        padding-right: 0 !important;
    }

    body.layout2-note-page.planner-split-view #menuBtn {
        display: none !important;
    }

    .planner-split-resizer {
        position: fixed;
        top: calc(var(--sb2-topbar-h, 50px) + var(--planner-split-banner-height, 48px));
        right: calc(var(--planner-split-drawer-width) - 5px);
        bottom: 0;
        width: 10px;
        z-index: 10001;
        cursor: col-resize;
        touch-action: none;
        outline: none;
    }

    .planner-split-resizer::before {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        left: 50%;
        width: 1px;
        background: rgba(45, 50, 62, 0.3);
        transform: translateX(-50%);
        transition: width 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
    }

    .planner-split-resizer:hover::before,
    .planner-split-resizer:focus-visible::before,
    body.planner-split-resizing .planner-split-resizer::before {
        width: 3px;
        background: var(--bs-primary);
        box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), 0.12);
    }

    body.planner-split-resizing {
        cursor: col-resize !important;
        user-select: none !important;
    }
}

/* The editor's usable width changes independently from the viewport while the
   planner drawer is resized. Container queries keep the form responsive to
   that real width instead of waiting for a window breakpoint. */
@container planner-editor (max-width: 760px) {
    body.layout2-note-page.planner-split-view .main-content.note-page-layout .gridwithMargin {
        margin-right: 8px !important;
        margin-left: 8px !important;
    }

    body.layout2-note-page.planner-split-view #suiviForm .ui.raised.segment {
        max-width: 100%;
        padding: 14px 16px;
    }

    body.layout2-note-page.planner-split-view #suiviForm .fields,
    body.layout2-note-page.planner-split-view #suiviForm .ui.grid > .row {
        flex-wrap: wrap;
    }

    body.layout2-note-page.planner-split-view #suiviForm .fields > .field {
        min-width: 180px;
        flex: 1 1 220px;
    }

    body.layout2-note-page.planner-split-view #anthropometric > .inline.fields:first-of-type {
        display: grid;
        grid-template-columns: minmax(190px, 1fr) auto minmax(110px, 0.65fr) auto;
        align-items: center;
        gap: 8px 12px;
        margin-bottom: 14px;
    }

    body.layout2-note-page.planner-split-view #anthropometric > .inline.fields:first-of-type > .field {
        width: auto !important;
        min-width: 0;
        margin: 0;
        padding: 0;
        flex: none;
    }

    body.layout2-note-page.planner-split-view #anthropometric > .inline.fields:first-of-type > .field:first-child {
        display: grid;
        grid-template-columns: auto minmax(100px, 1fr);
        align-items: center;
        gap: 10px;
    }

    body.layout2-note-page.planner-split-view #anthropometric > .inline.fields:first-of-type > .field:first-child > label,
    body.layout2-note-page.planner-split-view #anthropometric > .inline.fields:first-of-type > span {
        margin: 0;
        padding: 0 !important;
        white-space: nowrap;
    }

    body.layout2-note-page.planner-split-view #anthropometric > .inline.fields:first-of-type .ui.input,
    body.layout2-note-page.planner-split-view #anthropometric > .inline.fields:first-of-type input {
        width: 100%;
        min-width: 0;
    }

    body.layout2-note-page.planner-split-view #suiviForm table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
    }

    body.layout2-note-page.planner-split-view .custom-calendar-header > .plan-week-targets-section--planner {
        margin-left: 0;
    }

    body.layout2-note-page.planner-split-view .plan-week-targets-section--planner .plan-week-targets-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    body.layout2-note-page.planner-split-view .plan-week-targets-section--planner .plan-week-macro-plate {
        display: none;
        width: 100%;
        height: auto;
        justify-self: center;
    }

    body.layout2-note-page.planner-split-view .plan-week-targets-section--planner .plan-week-slider-label,
    body.layout2-note-page.planner-split-view .plan-week-targets-section--planner .plan-week-slider-label span,
    body.layout2-note-page.planner-split-view .plan-week-targets-section--planner .plan-week-slider-label output {
        min-width: 0;
        white-space: nowrap;
    }

    body.layout2-note-page.planner-split-view .suivi-meta-labels,
    body.layout2-note-page.planner-split-view .suivi-meta-actions,
    body.layout2-note-page.planner-split-view #firstSuiviColumn .followupPrimaryActions {
        min-width: 0;
        flex-wrap: wrap;
    }
}

@container planner-editor (max-width: 620px) {
    body.layout2-note-page.planner-split-view #suiviForm .ui.grid > .row > [class*='wide'].column,
    body.layout2-note-page.planner-split-view #suiviForm .fields > .field {
        width: 100% !important;
        max-width: 100%;
        min-width: 0;
        flex-basis: 100%;
    }

    body.layout2-note-page.planner-split-view #suiviForm .ui.grid > .row > [class*='wide'].column + [class*='wide'].column {
        margin-top: 10px;
    }

    body.layout2-note-page.planner-split-view #anthropometric > .inline.fields:first-of-type {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    body.layout2-note-page.planner-split-view #anthropometric > .inline.fields:first-of-type > .field {
        width: auto !important;
        max-width: none;
        flex-basis: auto;
    }

    body.layout2-note-page.planner-split-view #firstSuiviColumn .followupPrimaryActions {
        justify-content: flex-start;
    }

    body.layout2-note-page.planner-split-view .plan-week-targets-heading {
        flex-wrap: wrap;
    }

    body.layout2-note-page.planner-split-view .plan-week-targets-section--planner .plan-week-targets-heading > .plan-week-active-calculate-status:not([hidden]) {
        margin-right: 0;
    }

    body.layout2-note-page.planner-split-view .plan-week-targets-section--planner .plan-week-macro-plate {
        display: none;
    }

    body.layout2-note-page.planner-split-view #firstSuiviColumn .followupPrimaryActions .suiviSubmitBtn,
    body.layout2-note-page.planner-split-view #firstSuiviColumn .followupPrimaryActions .finishLaterBtn {
        min-width: 0;
        flex: 1 1 180px;
        border-radius: 8px 8px 0 0;
    }
}

.drawer-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    display: flex;
    width: 100%;
    align-items: flex-start;
    gap: 40px 100px;
    color: #000;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 0 20px 16px;
}

.header-content {
    display: flex;
    min-width: 240px;
    flex-direction: column;
    align-items: stretch;
    width: 252px;
    margin: auto 0;
}

.drawer-title,
.modal-title {
    font-family:
        Montserrat,
        -apple-system,
        Roboto,
        Helvetica,
        sans-serif;
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}

.date-time-info {
    display: flex;
    margin-top: 4px;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 400;
    flex-wrap: wrap;
}

.date-time-text {
    margin: auto 0;
}

.calendar-icon {
    aspect-ratio: 1;
    object-fit: contain;
    width: 16px;
    flex-shrink: 0;
}

.edit-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: auto 0;
}

.edit-icon {
    aspect-ratio: 1;
    object-fit: contain;
    width: 16px;
    flex-shrink: 0;
}

/* Inline datetime selector */
.datetime-selector {
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
    margin-top: 4px;
    font: 500 11px/1.6 Montserrat, -apple-system, Roboto, Helvetica, sans-serif;
}

.dt-sel-date-container,
.dt-sel-time-container {
    border-radius: 21px;
    background-color: rgba(91, 176, 189, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 10px;
    cursor: pointer;
    user-select: none;
}

.dt-sel-date-container {
    min-width: 110px;
}

.dt-sel-time-container {
    min-width: 80px;
}

.dt-sel-date-text,
.dt-sel-time-text {
    flex: 1;
    margin: auto 0;
    white-space: nowrap;
}

.dt-sel-icon {
    aspect-ratio: 1;
    object-fit: contain;
    width: 16px;
    flex-shrink: 0;
    margin-left: 4px;
}

.dt-sel-confirm-btn,
.dt-sel-cancel-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}

/* Hide the explicit ✓ button across every planner flow that uses the
   datetime selector — both add (addItemModalOverlay, editorLinkDrawerOverlay)
   and edit (workout/recipe/consultation/note details). Every flatpickr
   onChange and time-picker callback below now calls autoConfirmDtSelector
   programmatically, so the visible ✓ is redundant. The button stays in the
   DOM because its existing click handler holds the validation + PUT-request
   logic that we now trigger automatically. */
.datetime-selector .dt-sel-confirm-btn {
    display: none;
}

.dt-sel-action-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

/* Drawer time picker overlay */
.dt-sel-time-picker-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dt-sel-time-picker-modal {
    background: #fff;
    border-radius: 12px;
    width: 280px;
    max-height: 400px;
    display: flex;
    flex-direction: column;
    gap: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 200px;
}

.dt-sel-time-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    padding: 10px 16px 8px;
    border-bottom: 1px solid #eee;
}

.dt-sel-time-picker-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
}

.dt-sel-time-picker-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 0 4px;
    color: #666;
}

.dt-sel-time-picker-list {
    overflow-y: auto;
    padding: 0 0 8px;
    margin: 0;
    min-height: 0;
}

.dt-sel-time-option {
    padding: 8px 16px;
    cursor: pointer;
    font-size: 13px;
    transition: background-color 0.15s;
}

.dt-sel-time-option:hover {
    background-color: rgba(91, 176, 189, 0.1);
}

.dt-sel-time-option.selected {
    background-color: rgba(91, 176, 189, 0.2);
    font-weight: 600;
    color: #5bb0bd;
}

.dt-sel-time-option--disabled {
    color: #c0c0c0;
    cursor: not-allowed;
    text-decoration: line-through;
}

.dt-sel-time-option--disabled:hover {
    background-color: transparent;
}

.close-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.close-icon {
    aspect-ratio: 1;
    object-fit: contain;
    width: 24px;
    flex-shrink: 0;
}

/* Drawer category navigation - scoped to avoid conflicts with search section */
.recipe-planner-drawer .add-item-drawer-list-view > .category-navigation,
.recipe-planner-drawer > .category-navigation {
    display: flex;
    margin-top: 12px;
    align-items: flex-start;
    gap: 8px;
    color: #000;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 20px 5px;
    scrollbar-width: thin;
    scrollbar-color: rgba(91, 176, 189, 0.55) transparent;
    -webkit-overflow-scrolling: touch;
    font:
        400 12px Montserrat,
        -apple-system,
        Roboto,
        Helvetica,
        sans-serif;
}

.recipe-planner-drawer .category-navigation .category-tab {
    flex: 0 0 auto;
    border-radius: 35px;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    justify-content: center;
    padding: 8px 15px;
    border: 1px solid rgba(0, 0, 0, 0.3);
    background: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

.recipe-planner-drawer .category-navigation::-webkit-scrollbar {
    height: 4px;
}

.recipe-planner-drawer .category-navigation::-webkit-scrollbar-track {
    background: transparent;
}

.recipe-planner-drawer .category-navigation::-webkit-scrollbar-thumb {
    border-radius: 4px;
    background: rgba(91, 176, 189, 0.55);
}

.recipe-planner-drawer .category-navigation .category-tab.active {
    color: #5bb0bd;
    font-weight: 600;
    border: 2px solid #5bb0bd;
}

/* Upcoming feature tabs - disabled, grayed out */
.recipe-planner-drawer .category-navigation .category-tab.upcoming-feature,
.recipe-planner-drawer .category-navigation .category-tab:disabled {
    opacity: 0.5;
    color: #999;
    border-color: #ccc;
    cursor: not-allowed;
}

/* Add item drawer search - scoped under drawer, separate from category-navigation */
.recipe-planner-drawer .add-item-drawer-list-view > .add-item-drawer-search,
.recipe-planner-drawer > .add-item-drawer-search {
    overflow-x: auto;
    display: flex;
    padding-top: 10px !important;
    margin-top: 12px;
    margin-bottom: 0;
    width: 100%;
    flex-direction: row;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0 20px;
    gap: 8px;
}

/* Search box and filter on same row - full path to avoid affecting category-navigation */
.recipe-planner-drawer .add-item-drawer-search .search-form {
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    width: 100%;
    flex-wrap: nowrap;
}

/* Search input container - Frame 1618874300 design specs */
.recipe-planner-drawer .add-item-drawer-search .search-input-container {
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 8px 12px;
    gap: 7px;
    isolation: isolate;
    height: 42px;
    background:
        linear-gradient(#ffffff, #ffffff) padding-box,
        linear-gradient(90deg, #ff4c4c 0%, #ff9500 28%, #a400c1 65%, #0015fc 100%) border-box;
    border: 1.3px solid transparent;
    border-radius: 8px;
    flex: none;
    flex-grow: 1;
    min-width: 0;
    position: relative;
}

.recipe-planner-drawer .add-item-drawer-search .search-icon {
    width: 24px;
    height: 24px;
    flex: none;
    flex-grow: 0;
    position: absolute;
    object-fit: contain;
    object-position: center;
    z-index: 2;
}

.recipe-planner-drawer .add-item-drawer-search .search-input,
.recipe-planner-drawer .add-item-drawer-search .modal-search-input.search-input {
    font-family:
        Montserrat,
        -apple-system,
        Roboto,
        Helvetica,
        sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 17px;
    color: #10152c;
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: none;
    padding: 0 0 0 36px !important;
    z-index: 1;
}

.recipe-planner-drawer .add-item-drawer-search .search-input::placeholder,
.recipe-planner-drawer .add-item-drawer-search .modal-search-input.search-input::placeholder {
    color: #10152c;
    opacity: 0.3;
}

.recipe-planner-drawer .add-item-drawer-search .search-button,
.drawer-ai-input-row-wrapper .drawer-ai-filter-btn {
    box-sizing: border-box;
    flex: none;
    flex-shrink: 0;
    display: flex;
    height: 42px;
    min-width: 42px;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.5);
    background: none;
    cursor: pointer;
}

.recipe-planner-drawer .add-item-drawer-search .filter-icon,
.drawer-ai-input-row-wrapper .drawer-ai-filter-btn .filter-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    object-position: center;
    flex-shrink: 0;
}

/* Filter tabs - separate from add-item-drawer-search, sibling element */
.recipe-planner-drawer .add-item-drawer-filter-tabs {
    display: flex;
    margin-top: 8px;
    padding: 0 20px 8px;
    align-items: stretch;
    color: #000;
    white-space: nowrap;
    text-align: center;
    justify-content: flex-start;
    font:
        300 12px Montserrat,
        -apple-system,
        Roboto,
        Helvetica,
        sans-serif;
}

.recipe-planner-drawer .add-item-drawer-filter-tabs .filter-tab {
    background: none;
    border: none;
    border-bottom: 1px solid transparent;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    padding: 0 8px 8px;
}

.recipe-planner-drawer .add-item-drawer-filter-tabs .filter-tab.active {
    border-color: #000;
    border-bottom-width: 1px;
    font-weight: 600;
}

/* Recipe Filter Panel (drawer dropdown) — prefixed rcpf- to avoid collisions */
.rcpf-wrap {
    position: relative;
    z-index: 200;
    padding: 0 20px;
    height: 0;
}

.rcpf-panel {
    position: absolute;
    max-height: calc(100vh - 300px);
    top: -65px;
    left: 15px;
    right: 0;
    z-index: 100;
    box-sizing: border-box;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 68px rgba(0, 0, 0, 0.25);
    display: flex;
    max-width: 766px;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px 16px;
    margin-top: 0;
    font-family: Montserrat, -apple-system, Roboto, Helvetica, sans-serif;
    overflow-y: auto;
}

.rcpf-header {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 40px 100px;
    justify-content: space-between;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.rcpf-search-row {
    align-self: stretch;
    display: flex;
    min-width: 240px;
    align-items: center;
    gap: 12px;
    margin: auto 0;
    font-size: 12px;
    line-height: 1.6;
}

.rcpf-search-label {
    color: #000;
    font-weight: 500;
    white-space: nowrap;
}

.rcpf-search-box {
    box-sizing: border-box;
    border-radius: 8px;
    background-color: #fff;
    display: flex;
    min-height: 32px;
    align-items: center;
    gap: 8px;
    color: #000;
    font-weight: 300;
    width: 200px;
    padding: 7px 8px;
    border: 1px solid rgba(0, 0, 0, 0.3);
}

.rcpf-panel .rcpf-search-input {
    width: 100% !important;
    flex: 1;
    border: none !important;
    border-bottom: none !important;
    outline: none !important;
    background: transparent !important;
    box-shadow: none !important;
    font-family: inherit;
    font-size: 12px !important;
    color: inherit;
    margin: 0 !important;
    padding: 0 !important;
    height: auto !important;
}

.rcpf-panel .rcpf-search-input::placeholder {
    color: rgba(0, 0, 0, 0.6);
}

.rcpf-panel .rcpf-search-input:focus {
    border: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
}

.rcpf-close-btn {
    border-radius: 8px;
    display: flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    width: 36px;
    padding: 6px;
    border: 1px solid rgba(0, 0, 0, 0.5);
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
}

.rcpf-close-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.rcpf-close-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.rcpf-divider {
    min-height: 1px;
    margin-top: 12px;
    width: 100%;
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.rcpf-sections {
    display: flex;
    margin-top: 12px;
    align-items: flex-start;
    gap: 10px;
    justify-content: flex-start;
}

.rcpf-col {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 0;
    width: 141px;
    flex: 0 0 auto;
}

.rcpf-col--narrow {
    width: 130px;
}

.rcpf-col-title {
    color: #000;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 500;
    margin: 0;
}

.rcpf-checks {
    margin-top: 12px;
    width: 100%;
}

.rcpf-check-row {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
}

.rcpf-check-row:first-child {
    margin-top: 0;
}

.rcpf-panel .rcpf-checkbox {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    border-radius: 3px !important;
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    max-width: 14px !important;
    border: 1px solid #a8a8a8 !important;
    background-color: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
    cursor: pointer;
    position: relative !important;
    flex-shrink: 0;
    vertical-align: middle !important;
    opacity: 1 !important;
}

.rcpf-panel .rcpf-checkbox:checked {
    background-color: #5bb0bd !important;
    border-color: #5bb0bd !important;
}

.rcpf-panel .rcpf-checkbox:checked::after {
    content: '' !important;
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 1 !important;
}

.rcpf-panel .rcpf-label {
    color: #000 !important;
    font-size: 12px !important;
    font-weight: 500;
    line-height: 1.6;
    cursor: pointer;
    padding-left: 0 !important;
    display: inline !important;
}

.rcpf-footer {
    position: sticky;
    bottom: -15px;
    align-self: stretch;
    display: flex;
    width: 100%;
    margin-top: auto;
    padding: 12px 0 16px;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
    background-color: #fff;
}

.rcpf-apply-btn {
    order: 1;
    border-radius: 8px;
    background-color: #5bb0bd;
    display: flex;
    min-height: 36px;
    align-items: center;
    gap: 20px;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    color: #fff;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    cursor: pointer;
}

.rcpf-apply-btn:hover {
    background-color: #51a6b3;
}

.rcpf-apply-btn:active {
    background-color: #479ca9;
}

.rcpf-auto-btn {
    order: 3;
    margin-left: auto;
    border-radius: 999px;
    background: #eef9fb;
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 16px;
    border: 1px solid #5bb0bd;
    color: #167183;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.rcpf-auto-btn img {
    width: 15px;
    height: 15px;
}

.rcpf-auto-btn:hover {
    background: #def3f6;
}

.rcpf-auto-btn:disabled {
    cursor: wait;
    opacity: 0.65;
}

.rcpf-clear-btn {
    order: 2;
    border-radius: 8px;
    background-color: transparent;
    display: flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: 1px solid rgba(0, 0, 0, 0.5);
    color: #000;
    font-family: Montserrat, -apple-system, Roboto, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.rcpf-clear-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.rcpf-clear-btn:active {
    background-color: rgba(0, 0, 0, 0.1);
}

/* ── Workout drawer filter panel (wkpf-*) ─────────────────────────────────── */

.wkpf-wrap {
    position: relative;
    padding: 0 20px;
    height: 0;
}

.wkpf-panel {
    position: absolute;
    max-height: calc(100vh - 300px);
    top: -60px;
    left: 15px;
    right: 0;
    z-index: 100;
    box-sizing: border-box;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 68px rgba(0, 0, 0, 0.25);
    display: flex;
    max-width: 766px;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px 16px;
    margin-top: 0;
    font-family: Montserrat, -apple-system, Roboto, Helvetica, sans-serif;
    overflow-y: auto;
}

.wkpf-header {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
}

.wkpf-close-btn {
    border-radius: 8px;
    display: flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    width: 36px;
    padding: 6px;
    border: 1px solid rgba(0, 0, 0, 0.5);
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
}

.wkpf-close-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.wkpf-close-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.wkpf-divider {
    min-height: 1px;
    margin-top: 12px;
    width: 100%;
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.wkpf-sections {
    display: flex;
    margin-top: 12px;
    align-items: flex-start;
    gap: 10px;
    justify-content: flex-start;
    overflow-y: visible;
}

.wkpf-col {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 0;
    width: 141px;
    flex: 0 0 auto;
}

.wkpf-col-title {
    color: #000;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 500;
    margin: 0;
}

.wkpf-checks {
    margin-top: 12px;
    width: 100%;
}

.wkpf-check-row {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
}

.wkpf-check-row:first-child {
    margin-top: 0;
}

.wkpf-panel .wkpf-checkbox {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    border-radius: 3px !important;
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    max-width: 14px !important;
    border: 1px solid #a8a8a8 !important;
    background-color: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
    cursor: pointer;
    position: relative !important;
    flex-shrink: 0;
    vertical-align: middle !important;
    opacity: 1 !important;
}

.wkpf-panel .wkpf-checkbox:checked {
    background-color: #5bb0bd !important;
    border-color: #5bb0bd !important;
}

.wkpf-panel .wkpf-checkbox:checked::after {
    content: '' !important;
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 1 !important;
}

.wkpf-panel .wkpf-label {
    color: #000 !important;
    font-size: 12px !important;
    font-weight: 500;
    line-height: 1.6;
    cursor: pointer;
    padding-left: 0 !important;
    display: inline !important;
}

.wkpf-footer {
    position: sticky;
    bottom: -15px;
    display: flex;
    padding: 12px 0 16px;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
    background-color: #fff;

    margin-top: auto;
}

.wkpf-apply-btn {
    border-radius: 8px;
    background-color: #5bb0bd;
    display: flex;
    min-height: 36px;
    align-items: center;
    gap: 20px;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    color: #fff;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    cursor: pointer;
}

.wkpf-apply-btn:hover {
    background-color: #51a6b3;
}

.wkpf-apply-btn:active {
    background-color: #479ca9;
}

.wkpf-clear-btn {
    border-radius: 8px;
    background-color: transparent;
    display: flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: 1px solid rgba(0, 0, 0, 0.5);
    color: #000;
    font-family: Montserrat, -apple-system, Roboto, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.wkpf-clear-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.wkpf-clear-btn:active {
    background-color: rgba(0, 0, 0, 0.1);
}

.add-item-drawer-content.recipes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    margin-top: 12px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    align-items: start;
    gap: 16px;
    padding: 0 16px 24px;
}

.recipes-column .drawer-empty-message {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    min-height: 120px;
}

/* Center empty states in workout drawer (no history, no favorites, no recommended) */
.drawer-workout-column .drawer-empty-message,
#modalWorkoutGrid .drawer-empty-message {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    min-height: 120px;
}

.recipes-column {
    min-width: 240px;
    flex: 1;
    flex-shrink: 1;
    flex-basis: 0%;
}

.recipe-card {
    border-radius: 8px;
    background-color: #f0f5ff;
    display: flex;
    flex-direction: row;
    height: 150px;
    min-height: 150px;
    width: 100%;
    max-width: none;
    align-items: stretch;
    overflow: hidden;
    justify-content: flex-start;
    margin-bottom: 16px;
    padding: 0;
    gap: 0;
}

.recipe-card:first-child {
    margin-top: 0;
}

.recipe-image-container {
    position: relative;
    display: flex;
    align-items: stretch;
    width: 150px;
    height: 150px;
    flex-shrink: 0;
    border-radius: 0;
    overflow: hidden;
}

.recipe-image {
    object-fit: cover;
    width: 150px;
    height: 150px;
    z-index: 0;
    flex-shrink: 0;
    border-radius: 0;
}

/* Recipe card rating - scoped to override global .star-icon (position: absolute for search bar) */
.recipe-card .rating-badge {
    border-radius: 64px;
    background-color: #fff;
    position: absolute;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 3px;
    justify-content: center;
    left: 10px;
    top: 10px;
    padding: 4px 6px;
}

.recipe-card .star-icon {
    position: static;
    display: flex;
    width: 12px;
    flex-shrink: 0;
    height: 12px;
    margin: auto 0;
    background-color: #ffd700;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.recipe-card .rating-value {
    color: #10152c;
    margin: auto 0;
    font-size: 12px;
    font-weight: 400;
}

.recipe-content {
    flex: 1;
    flex-shrink: 1;
    flex-basis: 0%;
    padding: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.recipe-info {
    position: relative;
    box-sizing: border-box;
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    font-family:
        Montserrat,
        -apple-system,
        Roboto,
        Helvetica,
        sans-serif;
}

.recipe-card > .recipe-info {
    padding: 12px 48px 12px 12px;
}

.recipe-card .recipe-content > .recipe-info {
    padding-right: 44px;
}

.recipe-card .recipe-content > .recipe-info .recipe-nutrition-hover {
    top: 0;
    right: 0;
}

.recipe-card:has(.recipe-nutrition-hover),
.drawer-ai-card:has(.recipe-nutrition-hover),
.ai-recipe-card:has(.recipe-nutrition-hover) {
    isolation: isolate;
    overflow: visible;
}

.recipe-info:has(.recipe-nutrition-hover),
.recipe-content:has(.recipe-nutrition-hover) {
    overflow: visible;
}

.drawer-ai-result-item:has(.recipe-nutrition-hover:hover),
.drawer-ai-result-item:has(.recipe-nutrition-hover:focus-within),
.ai-result-item:has(.recipe-nutrition-hover:hover),
.ai-result-item:has(.recipe-nutrition-hover:focus-within),
.recipe-card:has(.recipe-nutrition-hover:hover),
.recipe-card:has(.recipe-nutrition-hover:focus-within) {
    position: relative;
    z-index: 30;
}

.recipe-card:has(.recipe-nutrition-hover:hover) .recipe-info,
.recipe-card:has(.recipe-nutrition-hover:focus-within) .recipe-info,
.recipe-card:has(.recipe-nutrition-hover:hover) .recipe-content,
.recipe-card:has(.recipe-nutrition-hover:focus-within) .recipe-content {
    position: relative;
    z-index: 80;
}

.recipe-nutrition-hover {
    position: absolute;
    top: 10px;
    right: 12px;
    /* Keep the trigger above its own card, but below drawer overlays such as
       filters, date pickers, confirmations, and detail panels. */
    z-index: 10;
}

.recipe-nutrition-hover::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 0;
    width: 30px;
    height: 6px;
}

.recipe-nutrition-hover-trigger {
    width: 30px;
    height: 30px;
    border: 1px solid #cee7eb;
    border-radius: 50%;
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: default;
    box-shadow: 0 1px 2px rgba(16, 21, 44, 0.08);
}

.recipe-nutrition-hover-trigger img {
    width: 14px;
    height: 14px;
    display: block;
}

.recipe-nutrition-hover-panel {
    position: absolute;
    top: 32px;
    right: 0;
    left: auto;
    width: 172px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
    row-gap: 8px;
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 24px rgba(16, 21, 44, 0.18);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition:
        opacity 0.16s ease,
        transform 0.16s ease,
        visibility 0.16s ease;
    pointer-events: none;
}

.recipe-nutrition-hover:hover .recipe-nutrition-hover-panel,
.recipe-nutrition-hover:focus-within .recipe-nutrition-hover-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.recipe-nutrition-hover-title {
    display: none;
    margin-bottom: 7px;
    color: rgba(16, 21, 44, 0.48);
    font-family: Montserrat, -apple-system, sans-serif;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.2;
}

.recipe-nutrition-hover-row {
    display: block;
    min-height: 0;
    font-family: Montserrat, -apple-system, sans-serif;
    line-height: 1.15;
}

.recipe-nutrition-hover-label {
    display: block;
    margin-bottom: 2px;
    color: rgba(16, 21, 44, 0.66);
    font-size: 10px;
    font-weight: 500;
}

.recipe-nutrition-hover-value {
    display: block;
    color: #10152c;
    font-size: 11px;
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
}

.recipe-title {
    color: #10152c;
    font-size: 14px;
    font-weight: 600;
    line-height: 18px;
    margin: 0;
}

.recipe-restriction-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 5px;
}

.recipe-restriction-tag {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    align-items: center;
    gap: 4px;
    padding: 3px 7px;
    border-radius: 999px;
    color: #8b2e27;
    background: #fde2df;
    font-family: Montserrat, -apple-system, sans-serif;
    font-size: 9px;
    font-weight: 650;
    line-height: 12px;
    white-space: nowrap;
}

.recipe-restriction-tag > span {
    display: inline-flex;
    flex: 0 0 12px;
    width: 12px;
    height: 12px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    background: #cf3f35;
    font-size: 8px;
    line-height: 1;
}

.recipe-restriction-tag--intolerance {
    color: #79500d;
    background: #fff0d6;
}

.recipe-restriction-tag--intolerance > span {
    background: #d9861c;
}

.recipe-timing {
    display: flex;
    margin-top: 6px;
    flex-direction: column;
    align-items: stretch;
    font-size: 10px;
    color: #000;
    font-weight: 400;
}

.timing-item {
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: flex-start;
    margin-bottom: 0px;
}

.timing-item:last-child {
    margin-bottom: 0;
}

.timing-label {
    margin: auto 0;
}

.timing-value {
    margin: auto 0;
}

.recipe-actions {
    display: flex;
    margin-top: 0;
    width: 100%;
    align-items: center;
    gap: 8px;
    justify-content: space-between;
    padding-top: 0;
}

.action-icons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-icon {
    box-sizing: border-box;
    width: 26px;
    height: 26px;
    padding: 5px;
    background: #ffffff;
    border: 1px solid #cee7eb;
    border-radius: 17px;
    object-fit: contain;
    object-position: center;
    flex: none;
    flex-grow: 0;
    cursor: pointer;
}

.action-icon[data-action='favorite'].favorited {
    background: #E2676C;
    border-color: #E2676C;
}

.action-icon[data-action='add-to-recommend'].recommended {
    background: #5BB0BD;
    border-color: #5BB0BD;
}

.recipe-card .add-button {
    margin-left: 0;
    border-radius: 17px;
    background-color: #5bb0bd;
    display: flex;
    min-height: 24px;
    align-items: center;
    gap: 4px;
    overflow: hidden;
    color: #fff;
    white-space: nowrap;
    justify-content: flex-start;
    padding: 6px 8px;
    font:
        500 10px Montserrat,
        -apple-system,
        Roboto,
        Helvetica,
        sans-serif;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.recipe-card .add-button:hover {
    background-color: #4a9ba8;
}

.add-icon {
    aspect-ratio: 1;
    object-fit: contain;
    width: 17px;
    flex-shrink: 0;
}

.drawer-load-more-btn,
.modal-load-more-btn {
    padding: 12px 24px;
    border: 2px solid #5bb0bd;
    background: white;
    color: #5bb0bd;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.drawer-load-more-btn:hover,
.modal-load-more-btn:hover {
    background-color: #5bb0bd;
    color: white;
}

/* ============================
   Drawer AI Search Screen
   ============================ */

.drawer-ai-search-screen {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.drawer-ai-search-screen.has-results {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-bottom: 20px;
}

/* Completed search bar — shown after AI search completes in drawer */
.drawer-ai-search-screen .drawer-ai-completed-search {
    display: flex;
    flex-direction: row;
    gap: 8px;
    padding: 10px 20px 0;
    width: 100%;
    box-sizing: border-box;
}

.drawer-ai-completed-search .search-input-container {
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 8px 12px;
    gap: 7px;
    isolation: isolate;
    height: 42px;
    background:
        linear-gradient(#ffffff, #ffffff) padding-box,
        linear-gradient(90deg, #ff4c4c 0%, #ff9500 28%, #a400c1 65%, #0015fc 100%) border-box;
    border: 1.3px solid transparent;
    border-radius: 8px;
    flex: 1;
    min-width: 0;
    position: relative;
    cursor: text;
}

.drawer-ai-completed-search .search-icon {
    width: 24px;
    height: 24px;
    flex: none;
    position: absolute;
    object-fit: contain;
    object-position: center;
    z-index: 2;
}

.drawer-ai-completed-search .search-input {
    font-family: Montserrat, -apple-system, Roboto, Helvetica, sans-serif;
    font-weight: 400;
    font-size: 15px !important;
    line-height: 17px;
    color: #10152c;
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: none;
    padding: 0 0 0 36px !important;
    z-index: 1;
    cursor: default;
}

.drawer-ai-completed-clear-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 2px;
    flex-shrink: 0;
    z-index: 2;
    margin-left: auto;
}

.drawer-ai-completed-clear-btn img {
    width: 18px;
    height: 18px;
}

.drawer-ai-completed-search .search-button {
    box-sizing: border-box;
    flex: none;
    flex-shrink: 0;
    display: flex;
    height: 42px;
    min-width: 42px;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.5);
    background: none;
    cursor: pointer;
}

.drawer-ai-completed-search .filter-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    object-position: center;
    flex-shrink: 0;
}

/* AI input box + filter button in the same row */
.drawer-ai-input-row-wrapper {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 20px 0;
    width: 100%;
    box-sizing: border-box;
}

.drawer-ai-input-row-wrapper .drawer-ai-input-box {
    flex: 1;
    min-width: 0;
    padding: 0;
}

.drawer-ai-input-row-wrapper .drawer-ai-filter-btn {
    flex-shrink: 0;
    margin-top: 3px;
}

/* AI Input Box — sits in place of the original search bar */
.drawer-ai-input-box {
    position: relative;
    width: 100%;
    padding: 0;
    margin-bottom: 0;
}

.drawer-ai-input-box .ai-glow-layer {
    position: absolute;
    top: 9px;
    left: 0;
    right: 0;
    height: 94px;
    pointer-events: none;
    z-index: 0;
}

.drawer-ai-input-box .ai-glow-blob {
    position: absolute;
    top: 0;
    height: 100%;
    opacity: 0.4;
    filter: blur(17px);
    border-radius: 8px;
}

.drawer-ai-input-box .ai-glow-blob.red {
    left: 0;
    width: 38.8%;
    background: #ff4c4c;
}

.drawer-ai-input-box .ai-glow-blob.orange {
    left: 19.9%;
    width: 39.4%;
    background: #ff9500;
}

.drawer-ai-input-box .ai-glow-blob.purple {
    left: 40.7%;
    width: 38.8%;
    background: #a400c1;
}

.drawer-ai-input-box .ai-glow-blob.blue {
    left: 60.9%;
    width: 39.1%;
    background: #0015fc;
}

.drawer-ai-input-box .ai-input-card {
    position: relative;
    z-index: 1;
    background: #ffffff;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.drawer-ai-input-row {
    display: flex;
    gap: 4px;
    width: 100%;
}

.drawer-ai-input-row .ai-search-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    object-fit: contain;
}

.drawer-ai-input-row .ai-search-textarea,
.drawer-ai-input-row .ai-search-textarea:focus {
    flex: 1;
    min-height: 28px;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent;
    font-family: Arial, sans-serif;
    font-size: 15px !important;
    line-height: 1.5;
    color: #10152c;
    resize: none;
    padding: 0;
    overflow-y: hidden;
    word-wrap: break-word;
    white-space: pre-wrap;
    -webkit-appearance: none;
    appearance: none;
}

.drawer-ai-input-row .ai-search-textarea::placeholder {
    color: #10152c;
    opacity: 0.2;
    font-style: normal;
}

.drawer-ai-input-row .ai-prompt-display {
    display: none;
    flex: 1;
    font-family: Arial, sans-serif;
    font-size: 15px !important;
    line-height: 1.5;
    color: #10152c;
    padding: 4px 0;
    cursor: text;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.drawer-ai-input-row .ai-clear-btn {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    display: none;
}

.drawer-ai-input-row .ai-clear-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.drawer-ai-input-divider {
    width: 100%;
    height: 1px;
    background: rgba(0, 0, 0, 0.08);
}

.drawer-ai-input-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.drawer-ai-context-actions {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.drawer-ai-health-pill {
    display: flex;
    align-items: center;
    gap: 7px;
    height: 28px;
    padding: 4px 8px;
    background: #f0f5ff;
    border-radius: 42px;
    border: none;
    cursor: pointer;
    font-family: Montserrat, sans-serif;
    font-weight: 500;
    font-size: 12px;
    color: #000;
    white-space: nowrap;
}

.drawer-ai-health-pill .health-info-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.drawer-ai-plan-pill {
    border: 1px solid rgba(91, 176, 189, 0.35);
    background: #f5fbfc;
    color: #176c78;
}

.drawer-ai-plan-pill img {
    width: 15px;
    height: 15px;
    object-fit: contain;
}

.drawer-ai-plan-pill.is-active {
    border-color: #5bb0bd;
    background: #dff3f5;
    color: #0a5964;
}

.drawer-ai-plan-pill:disabled {
    cursor: wait;
    opacity: 0.65;
}

.drawer-ai-icon-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.drawer-ai-image-upload {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.drawer-ai-photo-btn {
    display: flex;
    align-items: center;
    height: 28px;
    padding: 0 9px 0 1px;
    border-radius: 28px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: none;
    cursor: pointer;
    gap: 0;
    white-space: nowrap;
}

.drawer-ai-photo-btn .photo-icon-wrap {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.drawer-ai-photo-btn .photo-icon-wrap img {
    width: 14px;
    height: 14px;
    object-fit: contain;
}

.drawer-ai-photo-btn .photo-label {
    font-family: Montserrat, sans-serif;
    font-weight: 500;
    font-size: 12px;
    color: #000;
}

.drawer-ai-photo-btn .photo-file-input,
.drawer-ai-image-upload .photo-file-input {
    display: none;
}

.drawer-ai-photo-btn-icon-only {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 40px;
    border-color: #deeff2;
}

.drawer-ai-photo-btn-icon-only .photo-icon-wrap {
    width: 36px;
    height: 36px;
}

.drawer-ai-photo-btn-icon-only .photo-icon-wrap img {
    width: 30px;
    height: 30px;
}

.drawer-ai-mic-btn {
    width: 36px;
    height: 36px;
    border-radius: 40px;
    border: 1px solid #deeff2;
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    overflow: hidden;
}

.drawer-ai-mic-btn img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

/* Drawer AI Status (Analysing Prompt) */
.drawer-ai-status {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 80px 0 40px;
    width: 100%;
}

.drawer-ai-status.is-visible {
    display: flex;
}

.drawer-ai-status-stars {
    position: relative;
    width: 88px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drawer-ai-status-star {
    position: absolute;
}

.drawer-ai-status-star-1 {
    top: 0;
    right: 12px;
    width: 44px;
    height: 44px;
    color: #0015fc;
    animation:
        drawerStar1Scale 1s ease-in-out infinite alternate,
        drawerStar1Color 1.2s ease-in-out infinite alternate;
}

.drawer-ai-status-star-2 {
    top: -10px;
    left: 20px;
    width: 33px;
    height: 33px;
    color: #0015fc;
    animation:
        drawerStar2Scale 2s ease-in-out infinite alternate,
        drawerStar2Color 1.2s ease-in-out infinite alternate;
}

@keyframes drawerStar1Scale {
    0% { transform: scale(1); }
    100% { transform: scale(1.5); }
}

@keyframes drawerStar2Scale {
    0% { transform: scale(1); }
    100% { transform: scale(0.3); }
}

@keyframes drawerStar1Color {
    0% { color: #0015fc; }
    100% { color: #a400c1; }
}

@keyframes drawerStar2Color {
    0% { color: #a400c1; }
    100% { color: #0015fc; }
}

.drawer-ai-status-text {
    font-family: Montserrat, sans-serif;
    font-weight: 500;
    font-size: 14px;
    text-align: center;
    background: linear-gradient(90deg, #ff4c4c 0%, #ff9500 27.88%, #a400c1 65.38%, #0015fc 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: drawerGradientShift 2s ease-in-out infinite;
}

@keyframes drawerGradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Drawer AI Results Container */
.drawer-ai-results {
    display: none;
    flex-direction: column;
    padding: 0 16px;
    width: 100%;
}

.drawer-ai-results.is-visible {
    display: flex;
}

.drawer-ai-results .ai-results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    width: 100%;
}

.drawer-ai-results .drawer-ai-result-item {
    break-inside: avoid;
    margin-bottom: 16px;
}

.drawer-ai-card {
    border-radius: 8px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    background-color: #f0f5ff;
    display: flex;
    flex-direction: row;
    height: 150px;
    min-height: 150px;
    width: 100%;
    max-width: 100%;
    align-items: stretch;
    overflow: hidden;
    justify-content: flex-start;
    margin-bottom: 0;
    padding: 0;
    gap: 0;
    cursor: pointer;
    transition: all 0.2s;
}

.drawer-ai-card:hover {
    box-shadow: 0 4px 12px rgba(91, 176, 189, 0.15);
}

.drawer-ai-card .recipe-image-container {
    position: relative;
    display: flex;
    align-items: stretch;
    width: 150px;
    height: 150px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
}

.drawer-ai-card .recipe-image-container img {
    object-fit: cover;
    width: 150px;
    height: 150px;
    z-index: 0;
    flex-shrink: 0;
    border-radius: 0;
}

.drawer-ai-card .recipe-rating {
    border-radius: 64px;
    background-color: #fff;
    position: absolute;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 3px;
    justify-content: center;
    left: 10px;
    top: 10px;
    padding: 4px 6px;
    font-size: 12px;
    font-weight: 400;
    color: #10152c;
}

.drawer-ai-card .recipe-rating img {
    width: 12px;
    height: 12px;
}

.drawer-ai-card .recipe-info {
    flex: 1;
    flex-shrink: 1;
    flex-basis: 0%;
    padding: 10px 46px 10px 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    gap: 0;
    font-family: Montserrat, -apple-system, Roboto, Helvetica, sans-serif;
}

.drawer-ai-card .recipe-title {
    color: #10152c;
    font-size: 14px;
    font-weight: 600;
    line-height: 18px;
    margin: 0;
}

.drawer-ai-card .recipe-timing {
    display: flex;
    margin-top: 8px;
    flex-direction: column;
    align-items: stretch;
    font-size: 10px;
    color: #000;
    font-weight: 400;
}

.drawer-ai-card .timing-item {
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: flex-start;
    margin-bottom: 4px;
}

.drawer-ai-card .timing-item:last-child {
    margin-bottom: 0;
}

.drawer-ai-card-actions {
    display: flex;
    margin-top: 0;
    width: 100%;
    align-items: center;
    gap: 8px;
    justify-content: space-between;
    padding-top: 0;
}

.drawer-ai-card-actions .action-icons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.drawer-ai-card-actions .action-btn {
    width: 26px;
    height: 26px;
    border: 1px solid #cee7eb;
    background: #ffffff;
    border-radius: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}

.drawer-ai-card-actions .action-btn:hover {
    transform: scale(1.05);
}

.drawer-ai-card-actions .action-btn img {
    width: 14px;
    height: 14px;
}

.drawer-ai-card .add-button {
    margin-left: 0;
    border-radius: 17px;
    background-color: #5bb0bd;
    display: flex;
    min-height: 24px;
    align-items: center;
    gap: 4px;
    overflow: hidden;
    color: #fff;
    white-space: nowrap;
    justify-content: flex-start;
    padding: 6px 8px;
    font: 500 10px Montserrat, -apple-system, Roboto, Helvetica, sans-serif;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.drawer-ai-card .add-button:hover {
    background-color: #4a9ba8;
}

.drawer-ai-card .add-icon {
    aspect-ratio: 1;
    object-fit: contain;
    width: 17px;
    flex-shrink: 0;
}

.drawer-ai-results .ai-reason-card {
    font-family: Montserrat, sans-serif;
}

.drawer-ai-results .ai-reason-title {
    font-size: 12px;
}

.drawer-ai-results .ai-reason-icon {
    width: 12px;
    height: 12px;
}

.drawer-ai-results .ai-reason-toggle {
    font-size: 11px;
    padding: 2.5px 12.5px;
    border-radius: 8px;
}

.drawer-ai-results .ai-reason-text {
    font-size: 12px;
    line-height: 1.6;
}

.drawer-ai-results .ai-reason-card {
    padding: 12px;
    gap: 8px;
}

.drawer-ai-results .ai-added-pill {
    font-size: 10px;
    padding: 2px 8px 2px 5px;
    border-radius: 5px;
}

.drawer-ai-results .ai-added-icon {
    width: 12px;
    height: 12px;
}

/* Drawer filter tabs in AI mode — hidden until results load */
.drawer-ai-filter-tabs {
    display: none;
    padding: 0 20px 8px;
    align-items: stretch;
    color: #000;
    white-space: nowrap;
    justify-content: flex-start;
    font: 300 12px Montserrat, -apple-system, Roboto, Helvetica, sans-serif;
}

.drawer-ai-filter-tabs .filter-tab {
    background: none;
    border: none;
    border-bottom: 1px solid transparent;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    padding: 0 8px 8px;
}

.drawer-ai-filter-tabs .filter-tab.active {
    border-color: #000;
    border-bottom-width: 1px;
    font-weight: 600;
}

/* Animation for AI input box appearing */
@keyframes drawerAiInputSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.drawer-ai-input-box {
    animation: drawerAiInputSlideIn 0.3s ease-out;
}

/* Image preview in AI input */
.drawer-ai-image-preview {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

.drawer-ai-image-preview.is-visible {
    display: flex;
}

.drawer-ai-image-preview img {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
}

.drawer-ai-image-preview .remove-preview-btn {
    width: 16px;
    height: 16px;
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
}

.drawer-ai-image-preview .remove-preview-btn img {
    width: 100%;
    height: 100%;
    border-radius: 0;
}

/* Sentinel for infinite scroll in recipe drawer - invisible, minimal height */
.drawer-infinite-sentinel {
    height: 1px;
    width: 100%;
    visibility: hidden;
    pointer-events: none;
}

/* Loading more indicator for drawer AI search infinite scroll */
.drawer-ai-loading-more {
    text-align: center;
    padding: 16px 20px;
    color: #888;
    font-size: 13px;
    font-family: Montserrat, sans-serif;
    width: 100%;
}

/* Sentinel for infinite scroll in workout list - invisible, minimal height */
.workout-infinite-sentinel {
    height: 1px;
    width: 100%;
    visibility: hidden;
    pointer-events: none;
}

/* Responsive styles for drawer */
@media (max-width: 768px) {
    .add-item-drawer-overlay {
        padding: 0;
    }

    .recipe-planner-drawer {
        width: 100%;
        max-width: 100%;
        border-radius: 0;
    }

    .add-item-drawer-content.recipes-grid {
        grid-template-columns: 1fr;
    }

    .recipe-planner-drawer .category-navigation {
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .recipe-planner-drawer .category-navigation .category-tab {
        white-space: nowrap;
    }
}

/* Split-view resizing changes the drawer without changing the viewport. A
   recipe card needs enough room for its fixed thumbnail and action controls,
   so collapse to one column before either can spill into the next card. */
@container planner-drawer (max-width: 820px) {
    .recipe-planner-drawer .add-item-drawer-content.recipes-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .recipe-planner-drawer .recipes-column,
    .recipe-planner-drawer .modal-recipe-card,
    .recipe-planner-drawer .modal-recipe-card .recipe-content,
    .recipe-planner-drawer .modal-recipe-card .recipe-info,
    .recipe-planner-drawer .modal-recipe-card .recipe-actions {
        min-width: 0;
        max-width: 100%;
    }

    .recipe-planner-drawer .modal-recipe-card .recipe-title {
        display: -webkit-box;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }
}

@container planner-drawer (max-width: 520px) {
    .recipe-planner-drawer .add-item-drawer-content.recipes-grid {
        padding-right: 12px;
        padding-left: 12px;
    }

    .recipe-planner-drawer .modal-recipe-card .recipe-image-container,
    .recipe-planner-drawer .modal-recipe-card .recipe-image {
        width: 125px;
    }
}
.fc-dayGridMonth-view .fc-col-header-cell {
    text-align: center;
    font-weight: 500;
    font-size: 14px;
    color: #666;
    padding: 12px 0;
  }
  
  .fc-dayGridMonth-view .fc-col-header-cell-cushion {
    text-decoration: none;
  }
  


.fc .fc-daygrid-day-frame {
    padding: 8px;
  }
  
  .fc-theme-standard td,
  .fc-theme-standard th {
    border: 1px solid #e6e6e6;
  }
  
  /* Scrollgrid border controlled globally above – no duplicate here */

  .fc .fc-daygrid-day {
    background: #fff;
    height: 140px;
    vertical-align: top;
  }

  .fc .fc-day-header-content:nth-child(2) {
    display: none;
    }
  
  
  .fc .fc-daygrid-day-number {
    font-weight: 600;
    font-size: 16px;
    padding: 6px 8px;
    color: #111;
  }

  .fc .fc-daygrid-day.fc-day-today .fc-daygrid-day-number {
    background: #5BB0BD;
    color: #fff;
    width: 25px;
    font-size: 11px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .fc-daygrid-day.fc-day-other {
    background: #fafafa;
  }
  
  .fc-daygrid-day.fc-day-other .fc-daygrid-day-number {
    color: #bbb;
  }

  .fc-dayGridMonth-view .fc-daygrid-event {
    border: none;
    border-radius: 8px;
    padding: 0;
    margin-top: 2px;
    background: transparent !important;
    box-shadow: none !important;
  }

  .fc-dayGridMonth-view .fc-event-main {
    padding: 0;
    width: 100%;
  }

  /* "+N More" pill — outlined card style (Figma "Frame 1618874037"), matches
     the week view treatment. White fill + thin grey border so it reads as a
     neutral "more" affordance distinct from the colored event pills above it.
     `background` needs !important to beat the unscoped `.fc-week-pill--more`
     default further up (#E5E5E4 !important). */
  .fc-dayGridMonth-view .fc-daygrid-more-link.fc-week-pill {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 6px 12px;
    gap: 2px;
    width: 100%;
    height: 24px;
    background: #ffffff !important;
    border: 1px solid #CACACA;
    border-radius: 4px;
    margin-top: 2px;
    overflow: hidden;
    text-decoration: none;
    cursor: pointer;
  }

  .fc-dayGridMonth-view .fc-daygrid-more-link .fc-week-pill-title {
    align-self: stretch;
    font-family: 'Montserrat', sans-serif;
    font-style: normal;
    font-weight: 700;
    font-size: 10px;
    line-height: 12px;
    color: #000000;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .fc-toolbar-title {
    font-size: 28px;
    font-weight: 700;
  }
  
  .fc-col-header-cell {
    font-weight: 500;
    font-size: 14px;
    color: #666;
    padding: 12px 0;
  }

  /* ===== Month Compact Event Pill (matches week view pill style) ===== */

  .fc-dayGridMonth-view .month-pill {
    display: flex;
    align-items: center;
    padding: 0 10px;
    border-radius: 8px;
    height: 28px;
    box-sizing: border-box;
    overflow: hidden;
    pointer-events: none;
    width: 100%;
    position: relative;
  }

  .fc-dayGridMonth-view .month-pill.month-pill--with-portion {
    padding-right: 46px;
  }

  .fc-dayGridMonth-view .month-pill-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 10px;
    line-height: 12px;
    color: #000000;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .fc-timeGridDay-view .fc-day-header-content > div:first-child {
    display: none;
  }
    
  /* ===================================
   CLEAN MONTH VIEW – FINAL VERSION
   =================================== */

/* Rounded outer wrapper */
.fc-dayGridMonth-view .fc-scrollgrid {
    border: 1px solid #e6e6e6;
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
  }
  
  /* Keep default table layout */
  .fc-dayGridMonth-view table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0px;
  }
  


  .fc-dayGridMonth-view .fc-col-header-cell {
    border: none !important;
    padding: 14px 0;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    background: #fff;
  }
  
  /* Month body cell borders */
  .fc-dayGridMonth-view .fc-daygrid-day {
    border: 1px solid #eeeeee;
    height: 150px;
    vertical-align: top;
    background: #fff;
  }
  
  /* Remove double outer borders (clean edges) */
  /* .fc-dayGridMonth-view .fc-daygrid-day:first-child {
    border-left: none;
  } */
  
  .fc-dayGridMonth-view .fc-daygrid-day:last-child {
    border-right: none;
  }
  
  .fc-dayGridMonth-view .fc-daygrid-body tr:first-child .fc-daygrid-day {
    border-top: 1px solid #E0E0E0;
  }
  
  .fc-dayGridMonth-view .fc-daygrid-body tr:last-child .fc-daygrid-day {
    border-bottom: none;
  }
  
  /* Day number - calendar day small */
  .fc-dayGridMonth-view .fc-daygrid-day-frame {
    position: relative;
  }

  .fc-dayGridMonth-view .fc-daygrid-day-top {
    min-height: 32px;
    flex-direction: inherit;
  }

  .fc-dayGridMonth-view .fc-daygrid-day-number {
    font-family: 'Montserrat', sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 13px;
    line-height: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    color: #111;
    flex: none;
    flex-grow: 0;
  }

  /* Today circle */
  .fc-dayGridMonth-view .fc-day-today .fc-daygrid-day-number {
    position: absolute;
    left: 4px;
    top: 3px;
    width: 24px;
    height: 24px;
    background: #5BB0BD;
    border-radius: 99px;
    color: #FFFFFF;
    z-index: 1;
  }
  
  /* Other month days */
  .fc-dayGridMonth-view .fc-day-other {
    background: #fafafa;
  }
  
  .fc-dayGridMonth-view .fc-day-other .fc-daygrid-day-number {
    color: #bbb;
  }
  
}

/* Toast notifications - ensure they appear above all overlays, drawers, modals, flatpickr calendars */
body .ui.toast-container,
.ui.toast-container {
  position: fixed !important;
  z-index: 2147483647 !important;
  top: auto !important;
  bottom: 1rem !important;
  right: 1rem !important;
  left: auto !important;
}
body .ui.toast-container .toast-box,
.ui.toast-container .toast-box {
  position: relative !important;
  z-index: 2147483647 !important;
}
body .ui.toast-container .ui.toast,
.ui.toast-container .ui.toast {
  position: relative !important;
  z-index: 2147483647 !important;
}


.wd-description-section{
    border-radius: 4px;
    background-color: rgba(240, 245, 255, 1);
    min-width: 240px;
    flex: 1;
    flex-shrink: 1;
    flex-basis: 0%;
    padding: 8px 12px;
    margin-top: 10px;
    margin-left: 16px;
    margin-right: 16px;

}

/* ============================================================
   YEAR VIEW
   ============================================================ */

/* In year view and month view, remove gap between date and week indicator (single line) */
.plannerContainer.year-view-active .date-text-container,
.plannerContainer.year-view-active .calendar-date-info,
.plannerContainer.month-view-active .date-text-container,
.plannerContainer.month-view-active .calendar-date-info {
    gap: 0;
}

#yearViewContainer {
    display: none;
    width: 100%;
    background: #fff;
    padding: 16px 0;
    box-sizing: border-box;
}

.year-view-loading {
    text-align: center;
    padding: 48px;
    font-family: 'Montserrat', sans-serif;
    color: #999;
    font-size: 14px;
}

@keyframes yearSkeletonPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

.year-grid-skeleton .year-month-skeleton {
    background: #fff;
    border-radius: 12px;
    padding: 14px 12px 10px;
    box-sizing: border-box;
}

.year-month-title-skeleton {
    height: 14px;
    width: 70px;
    background: #e0e0e0;
    border-radius: 4px;
    margin-bottom: 10px;
    animation: yearSkeletonPulse 1.2s ease-in-out infinite;
}

.year-weekday-row-skeleton {
    height: 18px;
    background: #ececec;
    border-radius: 4px;
    margin-bottom: 4px;
    animation: yearSkeletonPulse 1.2s ease-in-out infinite;
    animation-delay: 0.1s;
}

.year-grid-skeleton .year-skeleton-cell {
    cursor: default;
    pointer-events: none;
}

.year-grid-skeleton .year-skeleton-cell::before {
    content: '';
    display: block;
    width: 16px;
    height: 16px;
    background: #ececec;
    border-radius: 50%;
    margin: 2px auto;
    animation: yearSkeletonPulse 1.2s ease-in-out infinite;
    animation-delay: 0.2s;
}

.year-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
}

.year-month {
    background: #fff;
    border-radius: 12px;
    padding: 14px 12px 10px;
    box-sizing: border-box;
}

.year-month-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 13px;
    color: #5BB0BD;
    margin-bottom: 10px;
    text-transform: capitalize;
}

.year-weekday-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 4px;
}

.year-weekday-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 500;
    color: #999;
    text-align: center;
    padding: 2px 0;
}

.year-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px 0;
}

.year-day-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 2px 0;
    cursor: pointer;
    border-radius: 6px;
    min-height: 32px;
}

.year-day-cell:hover:not(.year-day-other) {
    background: #f0f9fa;
}

.year-day-cell.year-day-other {
    cursor: default;
    pointer-events: none;
}

.year-day-number {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #111;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.year-day-today .year-day-number {
    background: #5BB0BD;
    color: #fff;
}

.year-day-other .year-day-number {
    color: #ccc;
}

.year-event-dots {
    display: flex;
    flex-direction: row;
    gap: 2px;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.year-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Responsive: 2 columns on medium screens */
@media (max-width: 900px) {
    .year-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsive: 1 column on small screens */
@media (max-width: 500px) {
    .year-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   PLANNER LIST VIEW — card-based list (hamburger toggle)
   ============================================================ */

#plannerListView {
    max-width: 1100px;
    margin: 0 auto;
    background: #FFFFFF;
    border-radius: 16px;
    padding: 24px 28px;
    min-height: 200px;
}

.plv-time-group {
    margin-bottom: 28px;
}

.plv-time-group:last-child {
    margin-bottom: 0;
}

.plv-time-label {
    font-family: Manrope, Arial, sans-serif;
    font-size: 12px;
    font-weight: 500;
    line-height: 100%;
    letter-spacing: -0.02em;
    color: #000000;
    text-align: center;
    width: fit-content;
    margin-bottom: 12px;
}

.plv-cards-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
}

/* Base card shared styles */
.plv-card {
    border-radius: 8px;
    overflow: hidden;
    min-width: 200px;
    max-width: 320px;
    flex: 1 1 200px;
    cursor: pointer;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
    position: relative;
    font-family: Montserrat, -apple-system, sans-serif;
}
.plv-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
    transform: translateY(-1px);
}

/* ── NOTE card ── */
.plv-card--note {
    background: #FCEBAD;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.plv-card--note .plv-card-type {
    font-family: Montserrat, -apple-system, sans-serif;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.4;
    color: rgba(162, 116, 0, 1);
    margin: 0;
}
.plv-card--note .plv-card-title {
    font-family: Montserrat, -apple-system, sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: rgba(16, 21, 44, 1);
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── RECIPE card ── */
.plv-card--recipe {
    background: #f5f3f0;
    display: flex;
    flex-direction: row;
    min-height: 124px;
    align-items: stretch;
    gap: 10px;
    padding-right: 9px;
}
.plv-card--recipe .plv-card-img {
    width: 121px;
    min-width: 121px;
    height: 124px;
    object-fit: cover;
    object-position: center;
    border-radius: 8px 0 0 8px;
    flex-shrink: 0;
    display: block;
}
.plv-card--recipe .plv-card-body {
    padding: 12px 12px 12px 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 8px;
    flex: 1 1 0;
    min-width: 0;
}
.plv-card--recipe .plv-card-type {
    font-family: Montserrat, -apple-system, sans-serif;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    line-height: 12px;
    color: #667558;
    margin: 0;
    display: block;
}
.plv-card--recipe .plv-card-title {
    font-family: Montserrat, -apple-system, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #10152c;
    line-height: 17px;
    text-transform: capitalize;
    margin: 0;
    width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
}
/* ── WORKOUT card ── */
.plv-card--workout {
    background: rgba(236, 238, 227, 1);
    display: flex;
    flex-direction: row;
    min-height: 124px;
    align-items: stretch;
    gap: 10px;
    padding-right: 9px;
}
.plv-card--workout .plv-card-img {
    width: 124px;
    min-width: 124px;
    height: 124px;
    object-fit: cover;
    object-position: center;
    border-radius: 8px 0 0 8px;
    flex-shrink: 0;
    display: block;
}
.plv-card--workout .plv-card-body {
    padding: 12px 12px 12px 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 8px;
    flex: 1;
    min-width: 0;
}
.plv-card--workout .plv-card-type {
    font-family: Montserrat, -apple-system, sans-serif;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    line-height: 12px;
    color: #667558;
    margin: 0;
    display: block;
}
.plv-card--workout .plv-card-title {
    font-family: Montserrat, -apple-system, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #10152c;
    line-height: 17px;
    text-transform: capitalize;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
}
.plv-card--workout .plv-card-duration {
    font-family: Montserrat, -apple-system, sans-serif;
    font-size: 10px;
    font-weight: 400;
    line-height: 12px;
    color: #000000;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}
.plv-card--workout .plv-card-duration svg {
    flex-shrink: 0;
    width: 12px;
    height: 12px;
    color: #000000;
    stroke: #000000;
}

/* Variants of plv-card--workout: shared layout from .plv-card--workout above; these
   override only the background and label color. Mirrors the calendar tooltip variants
   (.fc-event.workout-event.{nutrition-video,challenge,wellness-rebate}-event). */
.plv-card--workout.plv-card--nutrition-video {
    background: #F0F1F5;
}
.plv-card--workout.plv-card--nutrition-video .plv-card-type {
    color: #5C6470;
}

.plv-card--workout.plv-card--challenge {
    background: #EEE3ED;
}
.plv-card--workout.plv-card--challenge .plv-card-type {
    color: #6B5374;
}

.plv-card--workout.plv-card--wellness-rebate {
    background: #FFF2DF;
}
.plv-card--workout.plv-card--wellness-rebate .plv-card-type {
    color: #B07A2C;
}
/* Offer pill replaces the duration footer on WELLNESS_REBATE list cards.
   Mirrors .fc-workout-offer-pill from the calendar (Figma). */
.plv-card--workout.plv-card--wellness-rebate .plv-card-offer-pill {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    width: fit-content;
    padding: 5px 8px;
    background: #F3C000;
    border-radius: 45px;
    font-family: Montserrat, -apple-system, sans-serif;
    font-weight: 600;
    font-size: 12px;
    line-height: 15px;
    color: #10152C;
}

/* ── CONSULTATION / MEETING card ── */
.plv-card--consultation {
    background: #B7DCFF;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.plv-card--consultation .plv-card-type {
    font-family: Montserrat, -apple-system, sans-serif;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.4;
    color: #0050a0;
    margin: 0;
}
.plv-card--consultation .plv-card-title {
    font-family: Montserrat, -apple-system, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #10152c;
    line-height: 17px;
    text-transform: capitalize;
    margin: 0;
}
.plv-card--consultation .plv-card-duration {
    font-family: Montserrat, -apple-system, sans-serif;
    font-size: 10px;
    font-weight: 400;
    line-height: 12px;
    color: #000000;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}
.plv-card--consultation .plv-card-duration svg {
    flex-shrink: 0;
    width: 12px;
    height: 12px;
    color: #000000;
    stroke: #000000;
}
.plv-card--consultation .plv-join-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 20px;
    border-radius: 8px;
    border: none;
    background: #0066CC;
    color: #fff;
    font-family: Montserrat, -apple-system, sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 4px;
    width: fit-content;
    transition: background 0.15s ease;
}
.plv-card--consultation .plv-join-btn:hover {
    background: #0050a0;
}

/* Generic no-image placeholder — applied to any element with class .planner-no-image.
   Specific image classes (fc-recipe-image, recipe-detail-image, etc.) provide the
   correct size; this rule only sets the visual style. */
.planner-no-image {
    background: #d9d9d9 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    object-fit: unset !important;
    padding: 4px !important;
    box-sizing: border-box !important;
}

/* Icon inside any no-image placeholder */
.planner-no-image-icon {
    width: 40%;
    height: 40%;
    max-width: 48px;
    max-height: 48px;
    min-width: 20px;
    min-height: 20px;
    object-fit: contain;
    opacity: 0.45;
    display: block;
    flex-shrink: 0;
}

/* FC calendar tile no-image placeholders.
   Use !important on layout props because high-specificity rules
   (#calendar .fc-event.recipe-event .fc-recipe-image) set display:block. */
.fc-recipe-image.fc-event-no-image,
.fc-workout-image.fc-event-no-image {
    background: #d9d9d9 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    object-fit: unset !important;
    flex-shrink: 0;
    border-radius: 8px 0 0 8px;
    padding: 4px !important;
    box-sizing: border-box !important;
}

/* No-image placeholder for recipe / workout cards */
.plv-card-img.plv-card-img--no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #d9d9d9;
    object-fit: unset;
    padding: 8px;
    box-sizing: border-box;
}
/* List-view card no-image icon sizing */
.plv-card-img--no-image .planner-no-image-icon {
    width: 45%;
    height: 45%;
}

/* Empty state */
.plv-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-family: Montserrat, Arial, sans-serif;
    font-size: 14px;
}

/* Responsive: stack cards vertically on narrow screens */
@media (max-width: 680px) {
    .plv-cards-row {
        flex-direction: column;
    }
    .plv-card {
        max-width: 100%;
    }
    #plannerListView {
        padding: 16px;
    }
}

/* Consultation details modal — read-only view triggered from a consultation card. */
.consultation-details-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.consultation-details-drawer {
    background: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    max-height: calc(100vh - 80px);
    overflow: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
}

.consultation-details-drawer .cd-header {
    position: relative;
    padding: 20px 48px 16px 24px;
    border-bottom: 1px solid #eef2f7;
}

.consultation-details-drawer .cd-eyebrow {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #2563eb;
    font-weight: 600;
    margin-bottom: 4px;
}

.consultation-details-drawer .cd-title {
    margin: 0;
    font-size: 18px;
    line-height: 1.3;
    color: #0f172a;
}

.consultation-details-drawer .cd-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: #f1f5f9;
    color: #475569;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.consultation-details-drawer .cd-close:hover {
    background: #e2e8f0;
}

.consultation-details-drawer .cd-body {
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.consultation-details-drawer .cd-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.consultation-details-drawer .cd-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    font-weight: 600;
}

.consultation-details-drawer .cd-value {
    font-size: 14px;
    color: #0f172a;
    word-break: break-word;
}

.consultation-details-drawer .cd-link {
    color: #2563eb;
    text-decoration: none;
}

.consultation-details-drawer .cd-link:hover {
    text-decoration: underline;
}

.consultation-details-drawer .cd-status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.consultation-details-drawer .cd-status-6 {
    background: #dbeafe;
    color: #1d4ed8;
}

.consultation-details-drawer .cd-status-7 {
    background: #dcfce7;
    color: #166534;
}

.consultation-details-drawer .cd-footer {
    padding: 12px 24px 20px;
    border-top: 1px solid #eef2f7;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.consultation-details-drawer .cd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
}

.consultation-details-drawer .cd-btn--primary {
    background: #5bb0bd;
    color: #ffffff;
}

.consultation-details-drawer .cd-btn--primary:hover {
    background: #4a9aa6;
}

.consultation-details-drawer .cd-btn--secondary {
    background: #f1f5f9;
    color: #1f2937;
    border-color: #e2e8f0;
}

.consultation-details-drawer .cd-btn--secondary:hover {
    background: #e2e8f0;
}
.planner-client-recipe-extras-setting {
    align-items: center;
    background: #f8fbfc;
    border: 1px solid rgba(91, 176, 189, 0.35);
    border-radius: 8px;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 14px 16px;
}

.planner-client-recipe-extras-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.planner-client-recipe-extras-copy label {
    color: #2f3b3d;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    margin: 0;
}

.planner-client-recipe-extras-status {
    color: #647477;
    font-size: 12px;
    min-height: 16px;
}

.planner-client-recipe-extras-status--error {
    color: #b42318;
}

.planner-client-recipe-extras-switch {
    cursor: pointer;
    flex: 0 0 auto;
    height: 26px;
    margin: 0;
    position: relative;
    width: 46px;
}

.planner-client-recipe-extras-switch input {
    height: 0;
    opacity: 0;
    width: 0;
}

.planner-client-recipe-extras-slider {
    background-color: #a8b2b4;
    border-radius: 26px;
    inset: 0;
    position: absolute;
    transition: background-color 0.2s ease;
}

.planner-client-recipe-extras-slider::before {
    background-color: #fff;
    border-radius: 50%;
    bottom: 3px;
    content: '';
    height: 20px;
    left: 3px;
    position: absolute;
    transition: transform 0.2s ease;
    width: 20px;
}

.planner-client-recipe-extras-switch input:checked + .planner-client-recipe-extras-slider {
    background-color: #5bb0bd;
}

.planner-client-recipe-extras-switch input:checked + .planner-client-recipe-extras-slider::before {
    transform: translateX(20px);
}

.planner-client-recipe-extras-switch input:focus-visible + .planner-client-recipe-extras-slider {
    box-shadow: 0 0 0 3px rgba(91, 176, 189, 0.3);
}

.planner-client-recipe-extras-switch input:disabled + .planner-client-recipe-extras-slider {
    cursor: wait;
    opacity: 0.55;
}

@media (max-width: 600px) {
    .planner-client-recipe-extras-setting {
        align-items: flex-start;
    }
}
