
/* =========================================================
   KCAL MY PLAN
   ========================================================= */

.kcal-my-plan {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}


/* =========================================================
   PLAN CARD
   ========================================================= */

.kcal-plan {
    background: #fff;
    border: 1px solid #e7ebe8;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
    margin-bottom: 24px;
}


/* =========================================================
   HEADER
   ========================================================= */

.kcal-plan-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 10px 20px;
    border-bottom: 1px solid #edf0ee;
}

.kcal-plan-header-info {
    min-width: 0;
}

.kcal-plan-label {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 600;
    color: #7a827d;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.kcal-plan-header h3 {
    margin: 0;
    color: #234b35;
    font-size: 22px;
    line-height: 1.3;
    font-weight: 700;
}

.kcal-plan-status {
    flex-shrink: 0;
    padding: 6px 12px;
    border-radius: 30px;
    background: #eaf6ed;
    color: #26733d;
    font-size: 12px;
    line-height: 1;
    font-weight: 600;
}


/* =========================================================
   SUMMARY
   ========================================================= */

.kcal-plan-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-bottom: 1px solid #edf0ee;
}

.kcal-plan-summary-item {
    min-width: 0;
    padding: 10px 20px;
    border-right: 1px solid #edf0ee;
}

.kcal-plan-summary-item:last-child {
    border-right: 0;
}

.kcal-plan-summary-item span {
    display: block;
    margin-bottom: 5px;
    color: #7a827d;
    font-size: 12px;
    line-height: 1.3;
}

.kcal-plan-summary-item strong {
    display: block;
    color: #234b35;
    font-size: 15px;
    line-height: 1.35;
    font-weight: 600;
}


/* =========================================================
   DETAILS
   ========================================================= */

.kcal-plan-details {
    padding: 10px 20px;
}

.kcal-plan-detail {
    padding-bottom: 18px;
}

.kcal-plan-detail-header {
    margin-bottom: 9px;
}

.kcal-plan-detail-header h4 {
    margin: 0;
    color: #234b35;
    font-size: 15px;
    line-height: 1.3;
    font-weight: 700;
}


/* =========================================================
   PILLS
   ========================================================= */

.kcal-plan-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.kcal-plan-pill {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 11px;
    border: 1px solid #dfe7e1;
    border-radius: 20px;
    background: #f8faf8;
    color: #34463a;
    font-size: 12px;
    line-height: 1;
    font-weight: 500;
}

.kcal-plan-muted {
    color: #929994;
    font-size: 13px;
}


/* =========================================================
   DIETARY
   ========================================================= */

.kcal-plan-dietary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.kcal-plan-dietary-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 11px 13px;
    border: 1px solid #edf0ee;
    border-radius: 8px;
    background: #fafcfb;
}

.kcal-plan-dietary-item span {
    color: #727a75;
    font-size: 12px;
}

.kcal-plan-dietary-item strong {
    color: #234b35;
    font-size: 13px;
    font-weight: 600;
    text-align: right;
}


/* =========================================================
   FOOTER
   ========================================================= */

.kcal-plan-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 15px 24px;
    background: #fafcfb;
    border-top: 1px solid #edf0ee;
}

.kcal-plan-order-date {
    color: #7a827d;
    font-size: 12px;
}

.kcal-plan-total {
    display: flex;
    align-items: center;
    gap: 12px;
}

.kcal-plan-total span {
    color: #727a75;
    font-size: 13px;
}

.kcal-plan-total strong {
    color: #234b35;
    font-size: 19px;
    line-height: 1;
    font-weight: 700;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

    .kcal-plan-header {
        padding: 7px;
    }

    .kcal-plan-header h3 {
        font-size: 19px;
    }

    .kcal-plan-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .kcal-plan-summary-item {
        padding: 14px 15px;
        border-bottom: 1px solid #edf0ee;
    }

    .kcal-plan-summary-item:nth-child(2) {
        border-right: 0;
    }

    .kcal-plan-summary-item:nth-child(3),
    .kcal-plan-summary-item:nth-child(4) {
        border-bottom: 0;
    }

    .kcal-plan-details {
        padding: 17px 17px 2px;
    }

    .kcal-plan-dietary-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .kcal-plan-footer {
        padding: 14px 17px;
    }

    .kcal-plan-total {
        gap: 7px;
    }

    .kcal-plan-total strong {
        font-size: 17px;
    }

}

@media (max-width: 480px) {

    .kcal-plan-header {
        align-items: flex-start;
    }

    .kcal-plan-status {
        font-size: 11px;
        padding: 6px 9px;
    }

    .kcal-plan-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .kcal-plan-total {
        width: 100%;
        justify-content: space-between;
    }

}


@media (max-width: 480px) {

    .kcal-plan-grid {
        grid-template-columns: 1fr;
    }

    .kcal-plan-info-grid {
        grid-template-columns: 1fr;
    }

}


/* =========================================================
   KCAL MY MEALS
   ========================================================= */

.kcal-my-meals {
    width: 100%;
}

.kcal-my-meals > h2 {
    color: #234b35;
    margin-bottom: 25px;
}

.kcal-meal-day {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 25px;
    padding: 20px 0;
    border-bottom: 1px solid #e5e5e5;
}

.kcal-meal-date {
    display: flex;
    flex-direction: column;
}

.kcal-meal-date-day {
    font-size: 30px;
    font-weight: 700;
    line-height: 1;
    color: #234b35;
}

.kcal-meal-date-info {
    margin-top: 8px;
    color: #777;
    font-size: 14px;
}

.kcal-meal-day-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kcal-meal-row {
    display: grid;
    grid-template-columns: 130px 1fr auto;
    gap: 15px;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    background: #fff;
}

.kcal-meal-type {
    font-weight: 600;
    color: #234b35;
}

.kcal-meal-name {
    color: #333;
}

.kcal-meal-status {
    font-size: 13px;
    font-weight: 600;
}

.kcal-meal-day.is-delivered .kcal-meal-status {
    color: #234b35;
}

.kcal-meal-day.is-upcoming .kcal-meal-status {
    color: #F97316;
}

.kcal-meals-empty {
    padding: 30px;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    text-align: center;
}

@media (max-width: 700px) {

    .kcal-meal-day {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .kcal-meal-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

}


/*preferences*/

/* =========================================================
   KCAL PREFERENCES
   ========================================================= */

.kcal-preferences {
    width: 100%;
}

.kcal-preferences > h2 {
    margin-bottom: 24px;
}

.kcal-preferences-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
}


/* Header */

.kcal-preferences-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 28px;
    border-bottom: 1px solid #e5e7eb;
}

.kcal-preferences-label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.kcal-preferences-header h3 {
    margin: 0;
    color: #234b35;
    font-size: 22px;
}


/* Status */

.kcal-preferences-status {
    padding: 7px 13px;
    border-radius: 999px;
    background: #ecfdf3;
    color: #237a48;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}


/* Details */

.kcal-preferences-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.kcal-preference-item {
    padding: 24px 28px;
    border-bottom: 1px solid #e5e7eb;
}

.kcal-preference-item:nth-child(odd) {
    border-right: 1px solid #e5e7eb;
}

.kcal-preference-item-header h4 {
    margin: 0 0 10px;
    color: #234b35;
    font-size: 15px;
    font-weight: 600;
}

.kcal-preference-value {
    color: #374151;
    font-size: 15px;
    line-height: 1.6;
}

.kcal-preference-muted {
    color: #9ca3af;
}


/* Footer */

.kcal-preferences-footer {
    padding: 18px 28px;
    background: #fafafa;
    color: #6b7280;
    font-size: 13px;
}


/* Empty */

.kcal-preferences-empty {
    padding: 30px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
}


/* Mobile */

@media (max-width: 767px) {

    .kcal-preferences-header {
        padding: 20px;
        align-items: flex-start;
        flex-direction: column;
    }

    .kcal-preferences-details {
        grid-template-columns: 1fr;
    }

    .kcal-preference-item {
        padding: 20px;
    }

    .kcal-preference-item:nth-child(odd) {
        border-right: 0;
    }

    .kcal-preferences-footer {
        padding: 16px 20px;
    }

}


/* =========================================================
   KCAL PROGRESS PAGE
   ========================================================= */

.kcal-progress-content {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}


/* =========================================================
   SECTION HEADERS
   ========================================================= */

.kcal-progress-section {
    width: 100%;
    margin-top: 32px;
}

.kcal-progress-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.kcal-progress-section-label,
.kcal-section-label {
    display: block;
    margin-bottom: 5px;
    color: #F97316;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.kcal-progress-section-header h3 {
    margin: 0;
    color: #234b35;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
}


/* =========================================================
   SUMMARY CARDS
   ========================================================= */

.kcal-progress-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
}

.kcal-progress-card {
    position: relative;
    min-width: 0;
    padding: 22px 20px;
    background: #ffffff;
    border: 1px solid #e6ebe7;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(35, 75, 53, 0.05);
}

.kcal-progress-card-label {
    display: block;
    margin-bottom: 9px;
    color: #6b746e;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
}

.kcal-progress-card-value {
    display: block;
    margin: 0;
    color: #234b35;
    font-size: 27px;
    font-weight: 700;
    line-height: 1.2;
}

.kcal-progress-card-value small {
    font-size: 13px;
    font-weight: 600;
    color: #6b746e;
}

.kcal-progress-card-meta {
    display: block;
    margin-top: 8px;
    color: #89918c;
    font-size: 11px;
    line-height: 1.4;
}


/* =========================================================
   WEIGHT JOURNEY
   ========================================================= */

.kcal-progress-chart {
    position: relative;
    width: 100%;
    height: 320px;
    padding: 22px;
    background: #ffffff;
    border: 1px solid #e6ebe7;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(35, 75, 53, 0.05);
    box-sizing: border-box;
}

.kcal-progress-chart canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.kcal-progress-chart-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    padding: 30px;
    background: #ffffff;
    border: 1px solid #e6ebe7;
    border-radius: 12px;
    text-align: center;
}

.kcal-progress-chart-empty p {
    max-width: 450px;
    margin: 0;
    color: #727a75;
    font-size: 14px;
    line-height: 1.6;
}


/* =========================================================
   LATEST ASSESSMENT DETAILS
   ========================================================= */

.kcal-progress-details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e6ebe7;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(35, 75, 53, 0.05);
}

.kcal-progress-detail {
    min-width: 0;
    padding: 20px;
    border-right: 1px solid #edf0ee;
    border-bottom: 1px solid #edf0ee;
}

.kcal-progress-detail:nth-child(3n) {
    border-right: 0;
}

.kcal-progress-detail:nth-last-child(-n + 3) {
    border-bottom: 0;
}

.kcal-progress-detail span {
    display: block;
    margin-bottom: 7px;
    color: #7a827d;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

.kcal-progress-detail strong {
    display: block;
    color: #234b35;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
}


/* =========================================================
   ASSESSMENT HISTORY
   ========================================================= */

.kcal-assessment-history {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.kcal-assessment-history-item {
    display: flex;
    align-items: stretch;
    width: 100%;
    background: #ffffff;
    border: 1px solid #e6ebe7;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(35, 75, 53, 0.04);
}

.kcal-assessment-history-date {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 125px;
    padding: 18px;
    background: #f6f9f7;
    color: #234b35;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.kcal-assessment-history-info {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    flex: 1;
}

.kcal-assessment-history-info > div {
    min-width: 0;
    padding: 18px;
    border-right: 1px solid #edf0ee;
}

.kcal-assessment-history-info > div:last-child {
    border-right: 0;
}

.kcal-assessment-history-info span {
    display: block;
    margin-bottom: 6px;
    color: #7a827d;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
}

.kcal-assessment-history-info strong {
    display: block;
    color: #234b35;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}


/* =========================================================
   EMPTY HISTORY
   ========================================================= */

.kcal-progress-history-empty {
    padding: 30px;
    background: #ffffff;
    border: 1px solid #e6ebe7;
    border-radius: 12px;
    text-align: center;
}

.kcal-progress-history-empty p {
    margin: 0;
    color: #737b76;
    font-size: 14px;
}


/* =========================================================
   ACTION
   ========================================================= */

.kcal-progress-action {
    display: flex;
    justify-content: flex-start;
    margin-top: 30px;
    padding-bottom: 20px;
}

.kcal-progress-assessment-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    background: #234b35;
    border: 1px solid #234b35;
    border-radius: 7px;
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none !important;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.kcal-progress-assessment-button:hover {
    background: #1b3d2b;
    border-color: #1b3d2b;
    color: #ffffff !important;
    transform: translateY(-1px);
}


/* =========================================================
   WOOCOMMERCE MY ACCOUNT OVERRIDES
   ========================================================= */

.woocommerce-account .kcal-progress-content {
    box-sizing: border-box;
}

.woocommerce-account .kcal-progress-content *,
.woocommerce-account .kcal-progress-content *::before,
.woocommerce-account .kcal-progress-content *::after {
    box-sizing: border-box;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 900px) {

    .kcal-progress-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .kcal-progress-details {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .kcal-progress-detail:nth-child(3n) {
        border-right: 1px solid #edf0ee;
    }

    .kcal-progress-detail:nth-child(2n) {
        border-right: 0;
    }

    .kcal-progress-detail:nth-last-child(-n + 3) {
        border-bottom: 1px solid #edf0ee;
    }

    .kcal-progress-detail:nth-last-child(-n + 2) {
        border-bottom: 0;
    }

    .kcal-assessment-history-item {
        flex-direction: column;
    }

    .kcal-assessment-history-date {
        justify-content: flex-start;
        flex: none;
        padding: 13px 18px;
        border-bottom: 1px solid #e6ebe7;
    }

    .kcal-assessment-history-info {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .kcal-assessment-history-info > div:nth-child(2) {
        border-right: 0;
    }

    .kcal-assessment-history-info > div:nth-child(-n + 2) {
        border-bottom: 1px solid #edf0ee;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .kcal-progress-content {
        width: 100%;
    }

    .kcal-progress-summary {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .kcal-progress-card {
        padding: 16px 14px;
        border-radius: 10px;
    }

    .kcal-progress-card-label {
        font-size: 11px;
    }

    .kcal-progress-card-value {
        font-size: 21px;
    }

    .kcal-progress-card-meta {
        font-size: 10px;
    }


    .kcal-progress-section {
        margin-top: 26px;
    }

    .kcal-progress-section-header {
        margin-bottom: 13px;
    }

    .kcal-progress-section-header h3 {
        font-size: 19px;
    }

    .kcal-progress-section-label,
    .kcal-section-label {
        font-size: 10px;
    }


    .kcal-progress-chart {
        height: 250px;
        padding: 12px;
        border-radius: 10px;
    }


    .kcal-progress-details {
        grid-template-columns: 1fr;
        border-radius: 10px;
    }

    .kcal-progress-detail,
    .kcal-progress-detail:nth-child(3n),
    .kcal-progress-detail:nth-child(2n) {
        border-right: 0;
        border-bottom: 1px solid #edf0ee;
    }

    .kcal-progress-detail:last-child {
        border-bottom: 0;
    }

    .kcal-progress-detail {
        padding: 15px;
    }


    .kcal-assessment-history-item {
        border-radius: 10px;
    }

    .kcal-assessment-history-info {
        grid-template-columns: 1fr 1fr;
    }

    .kcal-assessment-history-info > div {
        padding: 14px;
        border-right: 1px solid #edf0ee;
        border-bottom: 1px solid #edf0ee;
    }

    .kcal-assessment-history-info > div:nth-child(2),
    .kcal-assessment-history-info > div:nth-child(4) {
        border-right: 0;
    }

    .kcal-assessment-history-info > div:nth-last-child(-n + 2) {
        border-bottom: 0;
    }

    .kcal-assessment-history-date {
        padding: 12px 14px;
        font-size: 12px;
    }


    .kcal-progress-action {
        margin-top: 24px;
    }

    .kcal-progress-assessment-button {
        width: 100%;
        min-height: 44px;
    }

}

/*Renew*/
/* =========================================================
   RENEW PAGE
   ========================================================= */

.kcal-renew-page {
    width: 100%;
}

.kcal-renew-header {
    margin-bottom: 30px;
}

.kcal-renew-header .kcal-section-label {
    display: block;
    margin-bottom: 6px;
    color: #F97316;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.kcal-renew-header h2 {
    margin: 0 0 8px;
    color: #234b35;
    font-size: 28px;
}

.kcal-renew-header p {
    margin: 0;
    color: #6b7280;
}


/* =========================================================
   EMPTY
   ========================================================= */

.kcal-renew-empty {
    padding: 40px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
}

.kcal-renew-empty h3 {
    margin: 0 0 8px;
    color: #234b35;
}

.kcal-renew-empty p {
    margin: 0;
    color: #6b7280;
}


/* =========================================================
   RENEW CARD
   ========================================================= */

.kcal-renew-plans {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.kcal-renew-card {
    padding: 24px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
}


/* Header */

.kcal-renew-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.kcal-renew-label {
    display: block;
    margin-bottom: 5px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.kcal-renew-card-header h3 {
    margin: 0;
    color: #234b35;
    font-size: 20px;
}

.kcal-renew-status {
    padding: 6px 12px;
    border-radius: 20px;
    background: #eef7f0;
    color: #234b35;
    font-size: 12px;
    font-weight: 700;
}


/* Summary */

.kcal-renew-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 22px 0;
}

.kcal-renew-summary-item span {
    display: block;
    margin-bottom: 5px;
    color: #6b7280;
    font-size: 13px;
}

.kcal-renew-summary-item strong {
    color: #234b35;
    font-size: 15px;
}


/* Footer */

.kcal-renew-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.kcal-renew-change-text {
    color: #6b7280;
    font-size: 14px;
}

.kcal-renew-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 130px;
    padding: 11px 20px;
    border-radius: 8px;
    background: #234b35;
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
}

.kcal-renew-action:hover {
    background: #193a28;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

    .kcal-renew-card {
        padding: 18px;
    }

    .kcal-renew-card-header {
        flex-direction: column;
    }

    .kcal-renew-summary {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .kcal-renew-card-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .kcal-renew-action {
        width: 100%;
    }

}