/* ==========================================================
   My Workout AI  -  CSS FOR THE PLAN PAGE

   Loaded only on /plan/{slug}.

   The rest of the site CSS is in public/css/style.css, and the
   colours (--brand and friends) come from :root there.
   ========================================================== */


/* ----------------------------------------------------------
   1. Plan hero - name, the four stats, and the start button
   ---------------------------------------------------------- */
.plan-hero {
    position: relative;
    padding: 55px 0 50px;
    border-bottom: 1px solid var(--line);
    overflow: hidden;
}

.plan-hero::before {
    content: "";
    position: absolute;
    top: -240px;
    left: 50%;
    transform: translateX(-50%);
    width: 680px;
    height: 440px;
    background: var(--c, var(--brand));
    opacity: 0.18;
    filter: blur(130px);
    border-radius: 50%;
    pointer-events: none;
}

.plan-hero .inner {
    position: relative;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 50px;
    align-items: center;
}

.plan-hero h1 {
    font-size: 54px;
    margin: 16px 0 14px;
}

.plan-hero .lead {
    color: var(--muted);
    font-size: 16.5px;
    line-height: 1.65;
}

/* the four numbers under the title */
.plan-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 28px;
}

.plan-stats div {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 13px;
    padding: 15px 12px;
}

.plan-stats b {
    display: block;
    font-family: 'Barlow Condensed', Arial, sans-serif;
    font-size: 30px;
    line-height: 1;
    color: var(--c, var(--brand));
}

.plan-stats small {
    display: block;
    font-size: 10.5px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 5px;
}

.plan-hero .btn {
    margin-top: 26px;
}


/* ----------------------------------------------------------
   2. The card on the right - who this plan is for
   ---------------------------------------------------------- */
.plan-fit {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 28px;
}

.plan-fit h3 {
    font-size: 22px;
    margin-bottom: 18px;
}

.plan-fit ul {
    list-style: none;
}

.plan-fit li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 10px 0;
    font-size: 14.5px;
    color: var(--muted);
    line-height: 1.55;
}

.plan-fit li b {
    color: var(--c, var(--brand));
    flex: 0 0 auto;
}

/* the small progress ring showing week 1 of 4 */
.plan-fit .ring-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.plan-fit .ring-row svg {
    width: 62px;
    height: 62px;
    flex: 0 0 62px;
}

.plan-fit .ring-row b {
    display: block;
    font-size: 15px;
}

.plan-fit .ring-row small {
    color: var(--muted);
    font-size: 13px;
}


/* ----------------------------------------------------------
   3. Week tabs - week 1, 2, 3, 4
   ---------------------------------------------------------- */
.week-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.week-tab {
    background: var(--card);
    border: 1px solid var(--line);
    color: var(--muted);
    padding: 11px 24px;
    border-radius: 999px;
    font-family: 'Inter', Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.week-tab:hover {
    color: var(--text);
    border-color: #3d3d52;
}

.week-tab.on {
    background: var(--c, var(--brand));
    border-color: var(--c, var(--brand));
    color: #fff;
}

/* small label saying how much harder this week is */
.week-note {
    text-align: center;
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 30px;
}

.week-note b {
    color: var(--c, var(--brand));
}


/* ----------------------------------------------------------
   4. The seven day strip
   ---------------------------------------------------------- */
.day-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
}

.day-card {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px 14px;
    cursor: pointer;
    transition: border-color 0.25s, transform 0.25s, background 0.25s;
}

.day-card:hover {
    border-color: var(--c, var(--brand));
    transform: translateY(-4px);
}

/* the day currently open below */
.day-card.on {
    border-color: var(--c, var(--brand));
    background: var(--card-hi);
    box-shadow: 0 0 0 1px var(--c, var(--brand));
}

.day-card .d-num {
    font-size: 10.5px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
}

.day-card .d-title {
    font-family: 'Barlow Condensed', Arial, sans-serif;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.1;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.day-card .d-meta {
    margin-top: auto;
    font-size: 11.5px;
    color: var(--muted);
}

/* rest days look deliberately quieter */
.day-card.rest {
    background: transparent;
    border-style: dashed;
}

.day-card.rest .d-title {
    color: var(--muted);
}


/* ----------------------------------------------------------
   5. The open day - its exercise list
   ---------------------------------------------------------- */
.day-panel {
    display: none;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 26px;
    margin-top: 22px;
}

.day-panel.show {
    display: block;
}

.day-panel-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.day-panel-head h3 {
    font-size: 25px;
}

.day-panel-head .chip {
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    color: var(--muted);
}

.day-panel-head .btn {
    margin-left: auto;
}

/* one exercise row */
.plan-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 16px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 10px;
    transition: border-color 0.2s, transform 0.2s, background 0.2s;
}

.plan-row:last-child {
    margin-bottom: 0;
}

.plan-row:hover {
    border-color: var(--c, var(--brand));
    transform: translateX(5px);
}

.plan-row .p-no {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-soft);
    color: var(--c, var(--brand));
    border-radius: 9px;
    font-family: 'Barlow Condensed', Arial, sans-serif;
    font-size: 16px;
    font-weight: 700;
}

.plan-row .p-name {
    flex: 1;
    min-width: 0;
}

.plan-row .p-name b {
    display: block;
    font-size: 15px;
    margin-bottom: 2px;
}

.plan-row .p-name small {
    color: var(--muted);
    font-size: 12.5px;
}

.plan-row .p-sets {
    font-family: 'Barlow Condensed', Arial, sans-serif;
    font-size: 19px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
}

.plan-row .p-go {
    color: var(--muted);
    transition: transform 0.25s, color 0.25s;
}

.plan-row:hover .p-go {
    color: var(--c, var(--brand));
    transform: translateX(4px);
}

/* rest day panel */
.rest-panel {
    text-align: center;
    padding: 30px 20px;
    color: var(--muted);
}

.rest-panel .big {
    font-size: 44px;
    margin-bottom: 12px;
}

.rest-panel b {
    display: block;
    color: var(--text);
    font-size: 18px;
    margin-bottom: 6px;
}


/* ----------------------------------------------------------
   6. Plan cards, used on the category page and at the bottom
   ---------------------------------------------------------- */
.plan-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.plan-card {
    --c: var(--brand);
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 24px;
    overflow: hidden;
    transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.plan-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 90% at 12% 0%, var(--c), transparent 60%);
    opacity: 0.10;
    transition: opacity 0.3s;
    pointer-events: none;
}

.plan-card:hover::before {
    opacity: 0.22;
}

.plan-card:hover {
    border-color: var(--c);
    transform: translateY(-6px);
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.5);
}

.plan-card > * {
    position: relative;
}

.plan-card .pc-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

/* the big day count badge */
.plan-card .pc-days {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.plan-card:hover .pc-days {
    border-color: var(--c);
    box-shadow: 0 10px 24px -9px var(--c);
}

.plan-card .pc-days b {
    font-family: 'Barlow Condensed', Arial, sans-serif;
    font-size: 25px;
    line-height: 1;
    color: var(--c);
}

.plan-card .pc-days small {
    font-size: 9px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--muted);
}

.plan-card h3 {
    font-size: 22px;
    margin-bottom: 6px;
}

.plan-card p {
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.55;
    margin-bottom: 18px;
}

.plan-card .pc-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    font-size: 12.5px;
    color: var(--muted);
}

.plan-card .pc-foot .m-arrow {
    color: var(--c);
}


/* ----------------------------------------------------------
   7. Mobile
   ---------------------------------------------------------- */
@media (max-width: 1000px) {

    .day-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 900px) {

    .plan-hero .inner {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .plan-hero h1 {
        font-size: 38px;
    }

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

@media (max-width: 600px) {

    .plan-hero h1 {
        font-size: 31px;
    }

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

    .day-grid {
        grid-template-columns: 1fr 1fr;
    }

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

    .day-panel-head .btn {
        margin-left: 0;
        width: 100%;
        text-align: center;
    }
}
