﻿



.training-plan-wizard {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: #F8F9FB;
}

.tp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #FFFFFF;
    padding: .75rem 1rem;
    border-bottom: 1px solid #E0E6EB;
}

.tp-close {
    border: none;
    background: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #1E293B;
}

.tp-progress {
    height: 4px;
    background: #E0E6EB;
}

.tp-progress-bar {
    height: 4px;
    background: #70AFFB;
    transition: width .4s ease;
}

.tp-body {
    flex: 1;
    overflow-y: auto;
    padding: 0px;
}

.tp-section {
    background: #fff;
    padding: .75rem;
    border-radius: .75rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.tp-input, .tp-textarea, select {
    width: 100%;
    border: 1px solid #E0E6EB;
    border-radius: .4rem;
    padding: .5rem;
    margin-top: .5rem;
    font-size: 1rem;
    color: #1E293B;
}

.tp-textarea {
    min-height: 80px;
}

.tp-footer {
    display: flex;
    justify-content: space-between;
    position: sticky;
    bottom: 0;
    width: 100%;
    background: #fff;
    border-top: 1px solid #E0E6EB;
}

.tp-btn {
    flex: 1;
    border: none;
    padding: .9rem 0;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
}

    .tp-btn.back {
        background: #E0E6EB;
        color: #1E293B;
    }

    .tp-btn.next {
        background: #70AFFB;
        color: #fff;
    }

    .tp-btn.create {
        background: #22C55E;
        color: #fff;
    }

    .tp-btn:disabled {
        opacity: .5;
        cursor: not-allowed;
    }
/* Typography & spacing for clarity */
.tp-desc {
    color: #6C757D;
    margin-bottom: 1rem;
    font-size: .9rem;
    line-height: 1.3;
}

.tp-label {
    display: block;
    font-size: .85rem;
    color: #1E293B;
    margin-bottom: .25rem;
    font-weight: 600;
}

/* Improve mobile spacing */
.tp-section {
    padding: 1rem;
}

.tp-generating {
    text-align: center;
    padding: 1.5rem 0;
    color: #6C757D;
    font-size: .9rem;
    background: white;
}

/* Buttons and inputs touch area */
.rz-dropdown,
.rz-dropdown .rz-inputtext,
.tp-btn {
    min-height: 44px; /* Thumb size target for mobile */
}

@media (max-width: 768px) {
    .tp-section {
        padding: .75rem;
    }

    .tp-label {
        font-size: .8rem;
    }

    .tp-desc {
        font-size: .85rem;
    }

    .rz-button {
        font-size: .9rem;
    }
}

.equipment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: .5rem;
    margin-bottom: 1rem;
}

.equipment-btn {
    border: 1px solid #E0E6EB;
    background-color: #FFFFFF;
    color: #1E293B;
    font-size: .85rem;
    font-weight: 500;
    padding: .6rem .75rem;
    border-radius: .75rem;
    text-align: center;
    cursor: pointer;
    transition: all .15s ease;
    width: 100%;
    min-height: 44px;
    outline: none; /* Prevents blue focus ring */
    user-select: none;
}

    /* Remove the gray “active” state flash */
    .equipment-btn:focus,
    .equipment-btn:active {
        background-color: inherit;
        box-shadow: none;
    }

    /* Selected state (instant and persistent) */
    .equipment-btn.selected {
        background-color: #70AFFB;
        border-color: #70AFFB;
        color: white;
        font-weight: 600;
        box-shadow: 0 2px 4px rgba(112,175,251,0.3);
    }

    /* Hover/focus still lightens when not selected */
    .equipment-btn:hover:not(.selected) {
        background-color: #F8F9FB;
        border-color: #D8E0E6;
    }


/* Better spacing on small screens */
@media (max-width: 768px) {
    .equipment-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: .4rem;
    }

    .equipment-btn {
        font-size: .8rem;
        padding: .5rem .65rem;
    }
}





.tp-workout-card {
    margin-bottom: 1rem;
    border-radius: .75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #E0E6EB;
}

.tp-workout-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .5rem;
}

.tp-workout-meta {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.tp-time {
    font-size: .85rem;
    color: #6C757D;
    background: #F8F9FB;
    padding: .25rem .5rem;
    border-radius: .5rem;
}

.tp-exercise-list {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    margin-top: .5rem;
}

.tp-exercise-row {
    display: grid;
    grid-template-columns: auto 1fr 100px;
    align-items: center;
    gap: .5rem;
    padding: .35rem 0;
    border-bottom: 1px solid #F0F2F5;
}

.tp-exercise-name {
    font-size: .9rem;
    color: #1E293B;
}

.tp-prescription {
    width: 100%;
    font-size: .85rem;
}

.tp-checkbox {
    width: 18px;
    height: 18px;
    accent-color: #70AFFB;
}

.tp-add-exercise {
    text-align: right;
    margin-top: .5rem;
}

@media (max-width: 768px) {
    .tp-exercise-row {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
    }

    .tp-prescription {
        grid-column: 1 / span 2;
        width: 100%;
    }
}

.tp-footer-actions {
    display: flex;
    justify-content: space-between;
    gap: 0rem;
    width: 100%;
}

.tp-btn.back {
    background: #E0E6EB;
    color: #1E293B;
}


.tp-exercise-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .4rem 0;
    border-bottom: 1px solid #E0E6EB;
}

.tp-checkbox {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.tp-exercise-name {
    flex: 1;
    font-size: 0.95rem;
    color: #1E293B;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tp-prescription {
    width: 90px;
    min-width: 90px;
    text-align: center;
    padding: 0.4rem;
    border: 1px solid #E0E6EB;
    border-radius: 8px;
    background: #fff;
}

/* Prevent stacking and maintain single-line layout on mobile */
@media (max-width: 768px) {
    .tp-exercise-row {
        flex-wrap: nowrap;
    }

    .tp-exercise-name {
        font-size: 0.9rem;
    }

    .tp-prescription {
        width: 90px;
        font-size: 0.9rem;
    }
}




.phase-builder h5 {
    font-weight: 600;
    color: #1E293B;
}

.phase-builder .rz-card {
    border: 1px solid #E0E6EB;
    border-radius: 12px;
}

.equip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.equip-chip {
    padding: .4rem .6rem;
    border: 1px solid #E0E6EB;
    border-radius: 10px;
    background: #fff;
    color: #1E293B;
}

    .equip-chip.selected {
        background: #70AFFB;
        color: #fff;
        border-color: #70AFFB;
    }
/* ---- PLAN SETUP VISUAL CLEANUP ---- */
.tp-section {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1rem;
}

.phase-card {
    background: #FFFFFF;
    border: 1px solid #E0E6EB;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 1rem;
    padding: 1rem;
    position: relative;
}

.phase-header {
    background: linear-gradient(to right, #70AFFB, #3B82F6);
    border-radius: 8px 8px 0 0;
    color: #fff;
    padding: .4rem .75rem;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: -1rem -1rem 1rem -1rem;
}

.tp-label {
    font-weight: 600;
    color: #1E293B;
    font-size: 0.9rem;
    margin-bottom: .25rem;
    display: block;
}

.equip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .25rem;
}

.equip-chip {
    padding: .4rem .75rem;
    border: 1px solid #E0E6EB;
    border-radius: 12px;
    background: #fff;
    color: #1E293B;
    cursor: pointer;
    transition: all .15s ease-in-out;
}

    .equip-chip:hover {
        background: #F1F5FB;
    }

    .equip-chip.selected {
        background: #70AFFB;
        color: #fff;
        border-color: #70AFFB;
    }

.tp-btn.next {
    background-color: #70AFFB !important;
    border: none !important;
    /*border-radius: 10px !important;*/
    transition: background-color .2s ease, transform .1s ease;
}

    .tp-btn.next:hover:enabled {
        background-color: #4C95F5 !important;
        transform: translateY(-1px);
    }

    .tp-btn.next:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }


.phase-header-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    font-size: 0.95rem;
    padding: .4rem .5rem;
    color: #1E293B;
    font-weight: 600;
}

.phase-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1E293B;
}

.phase-meta {
    font-size: 0.85rem;
    color: #64748B;
    font-weight: 500;
}

.workout-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .5rem;
}

.workout-title {
    font-weight: 600;
    font-size: 1rem;
    color: #1E293B;
}

.exercise-list {
    display: flex;
    flex-direction: column;
    gap: .4rem;
}

.exercise-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    background: #F8F9FB;
    border-radius: 8px;
    padding: .4rem .6rem;
}

.tp-checkbox {
    accent-color: #70AFFB;
    width: 18px;
    height: 18px;
}

.tp-exercise-name {
    flex: 1;
    color: #1E293B;
    font-size: 0.9rem;
    font-weight: 500;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.tp-prescription {
    width: 100px;
    text-align: center;
    font-size: 0.9rem;
}

.phase-empty {
    color: #6C757D;
    padding: .5rem;
    font-style: italic;
}


/* ----- Collapsible Phase Card Styling ----- */
.rz-panel {
    border-radius: 0px !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08) !important;
    border: none !important;
    margin-bottom: 1rem !important;
    overflow: hidden;
    background-color: #fff;
    transition: all 0.2s ease-in-out;
}

    .rz-panel:hover {
        box-shadow: 0 3px 8px rgba(0,0,0,0.12) !important;
    }

/* Header */
.phase-header-bar {
    display: flex;
    flex-direction: column;
    padding: .8rem 1rem;
    /*background: #F8FAFC;*/
    font-size: 1rem;
    font-weight: 600;
    color: #1E293B;
    /*border-bottom: 1px solid #E0E6EB;*/
}

.phase-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1E293B;
    margin-bottom: 0.25rem;
}

.phase-meta {
    font-size: 0.9rem;
    color: #475569;
    font-weight: 500;
    line-height: 1.2rem;
}

    /* Remove bullet look from meta text */
    .phase-meta::before {
        content: "";
    }

/* Expanded content spacing */
.rz-panel-content {
    background-color: #FFFFFF;
    padding: 0rem;
    border-top: 1px solid #E5E7EB;
}

.tp-workout-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: .25rem;
}

.tp-workout-duration {
    font-size: 0.85rem;
    color: #6C757D;
    background: #F1F5F9;
    padding: 2px 8px;
    border-radius: 8px;
}

.tp-exercise-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #F8FAFC;
    border-radius: 8px;
    padding: .5rem .75rem;
    margin-bottom: .5rem;
}

.tp-exercise-name {
    flex: 1;
    font-weight: 500;
    color: #1E293B;
    margin-left: .5rem;
}

.tp-prescription {
    width: 100px;
    text-align: center;
}

.tp-workout-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .5rem;
}

.tp-workout-duration {
    font-size: 0.85rem;
    color: #6C757D;
    background: #F1F5F9;
    padding: 2px 8px;
    border-radius: 8px;
}

.tp-exercise-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #F8FAFC;
    border-radius: 8px;
    padding: .5rem .75rem;
    margin-bottom: .5rem;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

    .tp-exercise-row[draggable="true"]:active {
        cursor: grabbing;
        transform: scale(1.02);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    }

    .tp-exercise-row.drag-over {
        border: 2px dashed #70AFFB;
        background-color: #EFF6FF;
    }

    .tp-exercise-row.highlight {
        border: 2px dashed #70AFFB;
        background-color: #EBF3FF;
    }

.tp-drag-handle {
    cursor: grab;
    color: #9CA3AF;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: .5rem;
    width: 10px;
}

    .tp-drag-handle:hover {
        color: #70AFFB;
    }

.tp-drag-handle {
    cursor: grab;
    color: #9CA3AF;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: .5rem;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    transition: background 0.1s ease, color 0.1s ease;
}

    .tp-drag-handle:hover {
        background-color: #EFF6FF;
        color: #3B82F6;
    }

.tp-exercise-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #F8FAFC;
    border-radius: 8px;
    padding: .5rem .75rem;
    margin-bottom: .5rem;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

    .tp-exercise-row.drag-over {
        border: 2px dashed #70AFFB;
        background-color: #EFF6FF;
    }












/* ROOT LAYOUT – full-panel white card, flex column */
.training-plan-wizard {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #ECEBF0 !important;
    
}

/* HEADER + PROGRESS */
.tp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem 0.5rem;
}

.tp-progress {
    height: 3px;
    background: #E0E6EB;
    margin: 0 1.25rem 0.75rem;
    border-radius: 999px;
    overflow: hidden;
}

.tp-progress-bar {
    height: 100%;
    background: #70AFFB;
}

/* BODY – scrolls, footer stays at bottom */
.tp-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 0 1rem 5.5rem; /* bottom pad so content doesn't hide behind footer */
    height: 100vh;
}

/* ADD PHASE BUTTON */
.tp-add-phase {
    background: #F97316 !important;
    color: white !important;
    border-radius: 14px !important;
    padding: .5rem 1rem !important;
    font-weight: 600;
    font-size: .9rem;
    box-shadow: 0 2px 6px rgba(249, 115, 22, 0.25);
}

/* PHASE SUMMARY CARDS */
.phase-summary-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.phase-summary-card {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 1rem 1rem;
    border: 1px solid #E0E6EB;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: flex-start;
}

.phase-summary-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.phase-summary-title {
    font-weight: 600;
    color: #1E293B;
    font-size: 0.95rem;
}

.phase-summary-meta {
    font-size: .85rem;
    color: #64748B;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.phase-equipment .equip-list {
    font-size: .85rem;
    color: #6C757D;
}

.phase-equipment .equip-more {
    font-size: .85rem;
    color: #6C757D;
    margin-left: 4px;
}

/* RIGHT-SIDE ACTIONS */
.phase-summary-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: stretch;
    flex-shrink: 0;
}

.plan-action-btn.drag-handle {
    border: none;
    background: #ECEFF4;
    border-radius: 999px;
    width: 36px;
    height: 36px;
    font-size: 18px;
    cursor: grab;
}

/* FOOTER – sticky inside wizard, always visible */
.tp-footer {
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    background: #FFFFFF;
    padding: 0.75rem 1.25rem calc(env(safe-area-inset-bottom) + 0.75rem);
    box-shadow: 0 -4px 12px rgba(0,0,0,0.08);
    z-index: 20;
    padding-bottom: 40px;
}

.tp-footer-actions {
    display: flex;
    gap: .75rem;
}

/* MAIN CTA */
.tp-btn.next {
    width: 100%;
    background: #70AFFB;
    border: none;
    color: white;
    border-radius: 999px;
    padding: .9rem 1.2rem;
    font-size: 1.05rem;
    font-weight: 600;
}

/* STEP 2 BUTTONS */
.tp-btn.back,
.tp-btn.create {
    flex: 1;
    padding: .8rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
}

.tp-btn.back {
    background: #E0E6EB;
    color: #1E293B;
}

.tp-btn.create {
    background: #70AFFB;
    color: white;
}

/* CHIP STYLES (used in phase editor dialog too) */
.goal-chip-group,
.equip-chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.goal-chip,
.equip-chip {
    border: 1px solid #E0E6EB;
    background: #F8F9FB;
    color: #1E293B;
    padding: .35rem .8rem;
    border-radius: 999px;
    font-size: .85rem;
    transition: all 0.15s ease;
}

    .goal-chip:hover,
    .equip-chip:hover {
        background: #EAF2FF;
        border-color: #70AFFB;
    }

    .goal-chip.selected,
    .equip-chip.selected {
        background: #70AFFB;
        color: white;
        border-color: #70AFFB;
    }
/* Phase editor dialog footer buttons */
.phase-editor-footer {
    display: flex;
    justify-content: flex-end;
    gap: .5rem;
    margin-top: 1rem;
}

    .phase-editor-footer .rz-button {
        border-radius: 999px !important;
        padding: .6rem 1.2rem !important;
    }

.rz-dialog-content, .rz-dialog-side-content {
    padding: 0px;
}
