/* AI DAILY WELLNESS ROUTINE — MindCare Design System */

/* Dashboard Card Wrapper */
.wellness-plan-card {
    background: var(--mc-surface, #ffffff);
    border-radius: var(--mc-radius-md, 10px);
    border: 1px solid var(--mc-border, #e2e8f0);
    box-shadow: var(--mc-shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.06));
    overflow: hidden;
}

/* Header */
.wellness-plan-header {
    background: var(--mc-primary-dark, #0f766e);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.wellness-plan-header-text {
    min-width: 0;
}

.wellness-plan-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2px;
}

.wellness-plan-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.2;
}

.wellness-plan-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--mc-radius-full, 9999px);
    padding: 4px 10px;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Card Body */
.wellness-plan-body {
    padding: 16px 20px 20px;
}

.wellness-plan-desc {
    font-size: 0.85rem;
    color: var(--mc-text-secondary, #475569);
    margin: 0 0 14px;
    line-height: 1.5;
    min-height: 38px;
}

/* Step Chips (2-column grid) */
.wellness-steps-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 14px;
    list-style: none;
    padding: 0;
}

.wellness-step-chip {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 12px;
    border-radius: var(--mc-radius-sm, 6px);
    background: var(--mc-surface-muted, #f8fafc);
    border: 1px solid var(--mc-border, #e2e8f0);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--mc-text-primary, #0f172a);
    min-height: 44px;
}

.wellness-step-chip-icon {
    width: 28px;
    height: 28px;
    border-radius: var(--mc-radius-sm, 6px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    background: var(--mc-primary-light, #f0fdfa);
    color: var(--mc-primary-dark, #0f766e);
    flex-shrink: 0;
}

/* Start Button */
.wellness-start-btn {
    width: 100%;
    padding: 11px 16px;
    border: 1px solid transparent;
    border-radius: var(--mc-radius-sm, 6px);
    background: var(--mc-primary, #0F766E);
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    transition: background 0.15s ease;
    text-decoration: none;
}

.wellness-start-btn:hover {
    background: var(--mc-primary-dark, #0f766e);
}

.wellness-start-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Shimmer skeleton while plan is loading */
.wellness-loading-shimmer {
    height: 13px;
    border-radius: var(--mc-radius-xs, 4px);
    background: var(--mc-border, #e2e8f0);
    margin-bottom: 8px;
}

/* Routine step modal */

.wellness-routine-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    z-index: 4500;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.wellness-modal-content {
    background: var(--mc-surface, #ffffff);
    border-radius: var(--mc-radius-lg, 16px) var(--mc-radius-lg, 16px) 0 0;
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

@media (min-width: 600px) {
    .wellness-routine-modal {
        align-items: center;
        padding: 20px;
    }
    .wellness-modal-content {
        border-radius: var(--mc-radius-md, 10px);
        max-height: 82vh;
        border: 1px solid var(--mc-border, #e2e8f0);
    }
}

.wellness-modal-header {
    background: var(--mc-primary-dark, #0f766e);
    padding: 16px 48px 14px 18px;
    position: relative;
    flex-shrink: 0;
}

.wellness-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 28px;
    height: 28px;
    border-radius: var(--mc-radius-sm, 6px);
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.wellness-modal-close:hover {
    background: rgba(255, 255, 255, 0.35);
}

.wellness-modal-step-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2px;
    display: block;
}

.wellness-modal-step-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 12px;
}

.wellness-step-dots {
    display: flex;
    gap: 4px;
}

.wellness-step-dot {
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.3);
    flex: 1;
}

.wellness-step-dot.active {
    background: #ffffff;
}

.wellness-step-dot.done {
    background: rgba(255, 255, 255, 0.7);
}

.wellness-modal-body {
    padding: 18px 18px 0;
    flex: 1;
    overflow-y: auto;
}

.wellness-step-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: var(--mc-radius-sm, 6px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background: var(--mc-primary-light, #f0fdfa);
    color: var(--mc-primary-dark, #0f766e);
    margin-bottom: 10px;
    flex-shrink: 0;
}

.wellness-step-heading {
    font-size: 1rem;
    font-weight: 700;
    color: var(--mc-text-primary, #0f172a);
    margin: 0 0 6px;
}

.wellness-step-desc {
    font-size: 0.85rem;
    color: var(--mc-text-secondary, #475569);
    line-height: 1.5;
    margin-bottom: 12px;
}

.wellness-step-instruction-list {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
}

.wellness-step-instruction-list li {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    font-size: 0.84rem;
    color: var(--mc-text-secondary, #475569);
    padding: 6px 0;
    border-bottom: 1px solid var(--mc-border, #e2e8f0);
    line-height: 1.5;
}

.wellness-step-instruction-list li:last-child {
    border-bottom: none;
}

.wr-step-num {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--mc-primary, #0F766E);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.wellness-journal-prompt-box {
    background: var(--mc-primary-light, #f0fdfa);
    border: 1px dashed var(--mc-primary, #0F766E);
    border-radius: var(--mc-radius-sm, 6px);
    padding: 12px 14px;
    font-size: 0.88rem;
    color: var(--mc-primary-dark, #0f766e);
    font-style: italic;
    line-height: 1.55;
    margin-bottom: 12px;
}

.wellness-ai-tip-box {
    background: var(--mc-surface-muted, #f8fafc);
    border: 1px solid var(--mc-border, #e2e8f0);
    border-radius: var(--mc-radius-sm, 6px);
    padding: 12px 14px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.wellness-ai-tip-icon {
    width: 28px;
    height: 28px;
    border-radius: var(--mc-radius-sm, 6px);
    background: var(--mc-primary-light, #f0fdfa);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mc-primary-dark, #0f766e);
    font-size: 0.82rem;
    flex-shrink: 0;
}

.wellness-ai-tip-text {
    font-size: 0.82rem;
    color: var(--mc-text-secondary, #475569);
    line-height: 1.5;
    margin: 0;
}

.wellness-ai-tip-text strong {
    color: var(--mc-text-primary, #0f172a);
    font-weight: 600;
}

.wellness-modal-footer {
    padding: 12px 18px 18px;
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.wellness-btn-prev {
    padding: 10px 16px;
    border-radius: var(--mc-radius-sm, 6px);
    border: 1px solid var(--mc-border, #e2e8f0);
    background: var(--mc-surface, #ffffff);
    color: var(--mc-text-secondary, #475569);
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.wellness-btn-prev:hover {
    background: var(--mc-surface-muted, #f8fafc);
}

.wellness-btn-next {
    flex: 1;
    padding: 10px 16px;
    border-radius: var(--mc-radius-sm, 6px);
    border: 1px solid transparent;
    background: var(--mc-primary, #0F766E);
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.15s ease;
}

.wellness-btn-next:hover {
    background: var(--mc-primary-dark, #0f766e);
}

/* Responsive overrides */
@media (max-width: 480px) {
    .wellness-steps-list {
        grid-template-columns: 1fr 1fr;
    }
    .wellness-plan-badge {
        display: none;
    }
}

@media (max-width: 360px) {
    .wellness-steps-list {
        grid-template-columns: 1fr;
    }
    .wellness-plan-header {
        padding: 12px 14px;
    }
    .wellness-plan-body {
        padding: 12px 14px 14px;
    }
}

/* Dark / charcoal theme */
body.theme-charcoal .wellness-plan-card,
body.theme-charcoal .wellness-modal-content {
    background: #1e293b;
    border-color: #334155;
}

body.theme-charcoal .wellness-plan-desc,
body.theme-charcoal .wellness-step-desc,
body.theme-charcoal .wellness-ai-tip-text {
    color: #94a3b8;
}

body.theme-charcoal .wellness-step-chip {
    background: #0f172a;
    border-color: #334155;
    color: #cbd5e1;
}

body.theme-charcoal .wellness-ai-tip-box {
    background: #0f172a;
    border-color: #334155;
}

body.theme-charcoal .wellness-ai-tip-text strong,
body.theme-charcoal .wellness-step-heading {
    color: #f1f5f9;
}

body.theme-charcoal .wellness-btn-prev {
    background: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}

body.theme-charcoal .wellness-btn-prev:hover {
    background: #0f172a;
}

body.theme-charcoal .wellness-journal-prompt-box {
    background: rgba(13, 148, 136, 0.1);
    color: #5eead4;
}

body.theme-charcoal .wellness-step-instruction-list li {
    color: #cbd5e1;
    border-bottom-color: #334155;
}
