#trc-recipe-calendar {
    width: 100%;
    margin: 0 0 28px;
    font-family: inherit;
    box-sizing: border-box;
}

.trc-replacement {
    width: 100%;
    position: relative;
}

.trc-calendar {
    position: relative;
    width: 100%;
    background: #fff;
    border: 1px solid #e8ece7;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(35, 48, 39, .05);
    box-sizing: border-box;
}

.trc-calendar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 25px 28px 22px;
    border-bottom: 1px solid #edf0ed;
}

.trc-heading {
    min-width: 0;
}

.trc-eyebrow {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
    color: #58bd32;
    margin-bottom: 5px;
}

.trc-title {
    margin: 0;
    font-size: 25px;
    line-height: 1.15;
    font-weight: 700;
    color: #18221b;
}

.trc-subtitle {
    margin-top: 5px;
    font-size: 12px;
    color: #8a938c;
}

.trc-controls {
    display: flex;
    align-items: center;
    gap: 7px;
    flex: 0 0 auto;
}

.trc-controls button {
    font-family: inherit;
}

.trc-today {
    height: 38px;
    padding: 0 14px;
    border: 1px solid #e0e5df;
    border-radius: 9px;
    background: #fff;
    color: #526057;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.trc-today:hover {
    background: #f7faf6;
}

.trc-arrow {
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid #e0e5df;
    border-radius: 9px;
    background: #fff;
    color: #4e5b52;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.trc-arrow:hover {
    background: #f7faf6;
}

.trc-weekdays {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    background: #fafcf9;
    border-bottom: 1px solid #edf0ed;
}

.trc-weekdays > div {
    padding: 13px 14px;
    text-align: left;
    color: #8b958d;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.trc-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.trc-day {
    min-height: 126px;
    padding: 11px;
    background: #fff;
    border-right: 1px solid #edf0ed;
    border-bottom: 1px solid #edf0ed;
    box-sizing: border-box;
    cursor: pointer;
    transition: background .16s ease;
}

.trc-day:nth-child(7n) {
    border-right: 0;
}

.trc-day:hover {
    background: #fbfdfb;
}

.trc-blank {
    background: #fafbfa;
    cursor: default;
}

.trc-day-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 28px;
    margin-bottom: 7px;
}

.trc-day-number {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #59655c;
    font-size: 12px;
    font-weight: 600;
}

.trc-is-today .trc-day-number {
    background: #58bd32;
    color: #fff;
    font-weight: 800;
}

.trc-count {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 99px;
    background: #eff8eb;
    color: #4aa52d;
    font-size: 9px;
    font-weight: 800;
}

.trc-event {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 5px;
    padding: 7px 8px;
    border: 1px solid #e1f0dc;
    border-radius: 8px;
    background: #f4faf1;
    text-decoration: none !important;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.trc-event:hover {
    background: #edf8e9;
    box-shadow: 0 3px 10px rgba(67,145,47,.10);
    transform: translateY(-1px);
}

.trc-event-dot {
    flex: 0 0 auto;
    width: 6px;
    height: 6px;
    margin-top: 4px;
    border-radius: 50%;
    background: #58bd32;
}

.trc-event-name {
    min-width: 0;
    color: #347f28;
    font-size: 10px;
    line-height: 1.35;
    font-weight: 700;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.trc-selected {
    padding: 17px 22px;
    background: #fafcf9;
    border-top: 1px solid #edf0ed;
}

.trc-selected-inner,
.trc-selected-heading {
    display: flex;
    align-items: center;
    gap: 12px;
}

.trc-selected-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef8ea;
    border-radius: 10px;
    font-size: 17px;
}

.trc-selected-label {
    font-size: 11px;
    font-weight: 800;
    color: #4d5b51;
}

.trc-selected-text {
    margin-top: 3px;
    color: #929b94;
    font-size: 11px;
}

.trc-selected-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.trc-selected-recipe {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 12px;
    border: 1px solid #e4e9e3;
    border-radius: 10px;
    background: #fff;
    text-decoration: none !important;
}

.trc-selected-recipe:hover {
    border-color: #cfe5c8;
}

.trc-selected-recipe-icon {
    font-size: 15px;
}

.trc-selected-recipe-name {
    min-width: 0;
    flex: 1;
    color: #263228;
    font-size: 11px;
    font-weight: 700;
}

.trc-open {
    color: #52a936;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

/* Month-change loading overlay */

.trc-loading-overlay {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.88);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .18s ease, visibility .18s ease;
}

.trc-loading-overlay.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.trc-loading-card {
    min-width: 180px;
    padding: 20px;
    text-align: center;
    border: 1px solid #e4eae2;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 25px rgba(35,48,39,.08);
}

.trc-loader-spinner {
    width: 30px;
    height: 30px;
    margin: 0 auto 11px;
    border: 3px solid #e6eee4;
    border-top-color: #58bd32;
    border-radius: 50%;
    animation: trc-spin .7s linear infinite;
}

.trc-loading-text {
    color: #69756c;
    font-size: 12px;
    font-weight: 600;
}

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

@media (max-width: 768px) {
    .trc-calendar-head {
        padding: 18px 15px;
    }

    .trc-title {
        font-size: 19px;
    }

    .trc-subtitle {
        font-size: 10px;
    }

    .trc-controls {
        gap: 4px;
    }

    .trc-today {
        height: 34px;
        padding: 0 9px;
        font-size: 10px;
    }

    .trc-arrow {
        width: 34px;
        height: 34px;
    }

    .trc-weekdays > div {
        padding: 10px 2px;
        text-align: center;
        font-size: 8px;
    }

    .trc-day {
        min-height: 92px;
        padding: 6px;
    }

    .trc-day-number {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }

    .trc-event {
        padding: 5px;
        gap: 4px;
    }

    .trc-event-name {
        font-size: 8px;
    }

    .trc-selected {
        padding: 14px;
    }

    .trc-selected-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .trc-calendar {
        border-radius: 13px;
    }

    .trc-calendar-head {
        align-items: flex-start;
    }

    .trc-eyebrow {
        font-size: 8px;
    }

    .trc-title {
        font-size: 17px;
    }

    .trc-day {
        min-height: 76px;
        padding: 4px;
    }

    .trc-event {
        border-radius: 6px;
    }

    .trc-event-name {
        font-size: 7px;
    }
}


/* v3.0 production loading states */
.trc-loading-overlay {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(255,255,255,.88);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .18s ease, visibility .18s ease;
}

.trc-loading-overlay.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.trc-loading-card {
    min-width: 190px;
    padding: 18px 20px;
    text-align: center;
    background: rgba(255,255,255,.98);
    border: 1px solid #e8ece7;
    border-radius: 14px;
    box-shadow: 0 12px 34px rgba(35,48,39,.10);
}

.trc-loading-card .trc-loader-spinner {
    width: 30px;
    height: 30px;
    margin-bottom: 10px;
    border-width: 3px;
}

.trc-loading-text {
    color: #69746c;
    font-size: 12px;
    font-weight: 700;
}

.trc-day:focus-within,
.trc-event:focus {
    outline: 2px solid #58bd32;
    outline-offset: -2px;
}

.trc-event {
    color: inherit;
}

@media (max-width: 767px) {
    .trc-calendar-head {
        align-items: flex-start;
        flex-direction: column;
        padding: 20px;
    }

    .trc-controls {
        width: 100%;
    }

    .trc-today {
        flex: 1;
    }

    .trc-day {
        min-height: 100px;
        padding: 7px;
    }

    .trc-weekdays > div {
        padding: 10px 6px;
        font-size: 9px;
    }

    .trc-event {
        padding: 6px;
    }

    .trc-event-name {
        font-size: 9px;
    }
}


/* v3.1 production singleton: hide roots generated by older addon versions. */
#trc-recipe-calendar,
#trc-recipe-calendar-root,
.trc-recipe-calendar-root,
.trc-legacy-calendar {
    display: none !important;
}
#trc-recipe-calendar-v31 {
    display: block !important;
}
