/* HLAVNÝ OBAL */

.td-workout-detail {
    --td-green: #16b676;
    --td-green-light: #19cc85;
    --td-background: #171f1b;
    --td-card: #19231e;
    --td-border: #35483e;
    --td-text: #f2f5f3;
    --td-muted: #aab5ae;

    color: var(--td-text);
    padding: 20px 2.5% 250px;
}


/* INFORMÁCIE O TRÉNINGU */

.td-workout-info {
    padding: 24px 4%;
    background: linear-gradient(145deg, #15251e, #19231e);
    border: 1px solid var(--td-border);
    border-radius: 25px;
    margin-bottom: 30px;
}

.td-workout-date,
.td-workout-name,
.td-note-heading {
    display: flex;
    align-items: center;
    gap: 12px;
}

.td-workout-date {
    color: #a5e8ca;
    font-size: 18px;
    margin-bottom: 12px;
}

.td-workout-name h2 {
    font-size: 32px;
    margin: 0;
    font-weight: 650;
}

.td-edit-icon {
    border: 0;
    background: transparent;
    color: var(--td-green-light);
    font-size: 24px;
    cursor: pointer;
}

.td-muscle-groups {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 22px 0;
}

.td-muscle-groups span {
    background: #234737;
    border: 1px solid #356b52;
    color: #a9ebca;
    padding: 8px 15px;
    border-radius: 30px;
    font-size: 15px;
}

.td-workout-note {
    background: #141c18;
    border: 1px solid #35483e;
    border-radius: 20px;
    padding: 17px 20px;
}

.td-note-heading strong {
    font-size: 17px;
}

.td-workout-note p {
    margin: 9px 0 0;
    color: var(--td-muted);
    font-size: 16px;
    line-height: 1.5;
}


/* NADPIS ZOZNAMU CVIKOV */

.td-section-heading {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    border-top: 1px solid var(--td-border);
    padding: 10px 2%;
    margin-bottom: 8px;
}

.td-section-heading h3 {
    margin: 0;
    font-size: 20px;
}

.td-section-heading span {
    color: var(--td-muted);
    font-size: 13px;
    font-weight: 400;
}


/* RIADOK CVIKU */

.td-exercise-row {
    display: flex;
    align-items: stretch;
    gap: 10px;
    min-height: 112px;
    padding: 12px;
    margin-bottom: 5px;
    /* background: linear-gradient(145deg, #192720, #19231e); */
    background: #1d1d1d;
    border: 1px solid var(--td-border);
    border-radius: 22px;
    overflow: hidden;
}

/* Striedanie farieb riadkov cvikov */

.td-exercise-row:nth-of-type(even) {
    background: #333333;
}

/* DVOJITÁ ŠÍPKA NA PRESÚVANIE */

.td-drag-handle {
    flex: 0 0 42px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #202f27;
    border: 0;
    border-radius: 13px;
    color: #dce9e1;
    font-size: 27px;
    line-height: 1;
    cursor: grab;
}


/* BODKY A HISTÓRIA */

.td-exercise-tools {
    flex: 0 0 16px;
    width: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0;
}

.td-exercise-tools button {
    border: 0;
    background: transparent;
    color: #aab9b0;
    cursor: pointer;
    padding: 2px;
}

.td-tool-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 16px;
    height: 24px;
    padding: 0;
    margin: 0;
    font-size: 21px;
    line-height: 16px;
    letter-spacing: 0;
    text-align: center;
}

/* NÁZOV CVIKU */

.td-exercise-name {
    flex: 0 0 clamp(145px, 28%, 240px);
    display: flex;
    align-items: center;
    padding: 0 8px;
    border-left: 1px solid #35483e;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 600;
    overflow-wrap: anywhere;
}

/* NÁZOV CVIKU A JEHO POZNÁMKA */

.td-exercise-name {
    justify-content: flex-start;
}

.td-exercise-name-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    min-width: 0;
    gap: 4px;
}

.td-exercise-title {
    font-size: inherit;
    line-height: 1.3;
    font-weight: 600;
}

.td-exercise-note {
    color: #aab5ae;
    font-size: 11px;
    line-height: 1.3;
    font-weight: 400;
    overflow-wrap: anywhere;
}


/* HORIZONTÁLNE SÉRIE */

.td-sets-scroll {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: stretch;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #496354 transparent;
}

.td-set {
    flex: 0 0 112px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10px 5px;
    background: linear-gradient(145deg, #24372d, #1d2d24);
    border: 1px solid #30483a;
    border-radius: 17px;
    text-align: center;
}

.td-set strong {
    font-size: 21px;
    line-height: 1.3;
}

.td-set span {
    color: #a3ebc8;
    font-size: 17px;
    margin-top: 2px;
}

.td-set small {
    color: #a3ebc8;
    font-size: 11px;
    margin-top: 7px;
    /* padding-top: 5px;
   border-top: 1px solid #496354;  */
    width: 100%;
    line-height: 1.3;
}

/* PRIDAŤ CVIK */

.td-add-exercise {
    width: 100%;
    min-height: 65px;
    margin: 20px 0;
    border: 1px solid var(--td-green-light);
    border-radius: 35px;
    background: var(--td-green);
    color: white;
    font-size: 19px;
    font-weight: 700;
    cursor: pointer;
}

.td-add-exercise span {
    font-size: 26px;
    vertical-align: -2px;
    margin-right: 8px;
}


/* POZNÁMKA PO TRÉNINGU */

.td-after-note {
    padding: 20px;
    margin-top: 10px;
}

.td-note-placeholder {
    color: #89958d;
}


/* VYSVETLIVKY */

.td-explanations {
    margin: 15px 2%;
    color: var(--td-muted);
    font-size: 14px;
}

.td-explanations summary {
    cursor: pointer;
    padding: 10px 0;
}

.td-explanations-content {
    padding: 5px 12px 12px;
    line-height: 1.5;
}


/* FIXNÝ SPODNÝ PANEL */

.td-workout-actions {
    position: fixed;
    z-index: 1000;
    left: 0;
    right: 0;
    bottom: 0;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;

    padding: 15px 3% 18px;
    background: rgba(17, 27, 21, 0.98);
    border-top: 1px solid #35483e;
}


/* HLAVNÉ TLAČIDLÁ */

.td-primary-action {
    width: 100%;
    max-width: 760px;
    min-height: 58px;
    border: 1px solid var(--td-green-light);
    border-radius: 35px;
    background: var(--td-green);
    color: white;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
}

.td-primary-action span {
    font-size: 22px;
    margin-right: 8px;
}


/* TEXT POD VYTVORENÍM TRÉNINGU */

.td-create-action-wrap {
    width: 100%;
    max-width: 760px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.td-create-action-wrap small {
    color: #aab5ae;
    font-size: 12px;
    text-align: center;
    line-height: 1.4;
}


/* ZMAZAŤ TRÉNING */

.td-delete-action {
    border: 0;
    background: transparent;
    color: #f45a52;
    font-size: 16px;
    font-weight: 650;
    padding: 7px 15px;
    cursor: pointer;
}

.td-delete-action span {
    margin-right: 8px;
}


/* ZOBRAZENIE PODĽA STAVU TRÉNINGU */

/* Aktuálny tréning */
.td-workout-detail[data-status="active"] .td-create-action-wrap {
    display: none;
}

/* Dokončený tréning */
.td-workout-detail[data-status="completed"] .td-finish {
    display: none;
}

/* PRIDANIE SÉRIE */

.td-add-set {
    flex: 0 0 58px;
    align-self: stretch;
    display: flex;
    justify-content: center;
    align-items: center;

    background: #203c2e;
    border: 1px dashed #19cc85;
    border-radius: 17px;

    color: #19cc85;
    font-size: 34px;
    font-weight: 300;

    cursor: pointer;
}

.td-add-set:active {
    background: #28513b;
}

/* SPOJENÉ SÉRIE – SPOLOČNÝ BLOK */

.td-linked-group {
    overflow: hidden;
    border: 1px solid #52645a;
    border-radius: 22px;
    margin-bottom: 12px;
}

/* Odstránenie samostatných obalov jednotlivých cvikov */

.td-linked-group > .td-exercise-row {
    margin: 0;
    border: 0;
    border-radius: 0;
}

/* Jemné oddelenie jednotlivých cvikov */

.td-linked-group > .td-exercise-row + .td-exercise-row {
    border-top: 1px solid rgba(255,255,255,0.12);
}


/* VLOŽENÉ SÉRIE */

.td-inserted-a > .td-exercise-row {
    background: #07636b;
}

.td-inserted-b > .td-exercise-row {
    background: #0c3e43;
}


/* SUPERSÉRIE, TROJSÉRIE, GIGANTICKÉ SÉRIE */

.td-superset-a > .td-exercise-row {
    background: #8b2704;
}

.td-superset-b > .td-exercise-row {
    background: #5d1b07;
}

/* BUNKA PLAN SERII A OPAKOVANI */

.td-plan-value {
    flex: 0 0 112px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10px 8px;
    background: linear-gradient(145deg, #24372d, #1d2d24);
    border: 1px solid #30483a;
    border-radius: 17px;
    text-align: center;
}

.td-plan-value strong {
    font-size: 21px;
    line-height: 1.3;
    color: var(--td-text);
}

.td-plan-value small {
    color: #a3ebc8;
    font-size: 11px;
    margin-top: 7px;
    line-height: 1.3;
}

.td-plan-row .td-exercise-name {
    flex-basis: clamp(145px, 28%, 260px);
}

.td-plan-row .td-plan-value {
    margin-left: auto;
}

/* DESKTOP A VÄČŠIE OBRAZOVKY */

@media (min-width: 601px) {

    .td-workout-info {
        padding: 16px 3%;
        border-radius: 20px;
        margin-bottom: 16px;
    }

    .td-workout-date {
        font-size: 15px;
        margin-bottom: 7px;
    }

    .td-workout-name h2 {
        font-size: 26px;
    }

    .td-muscle-groups {
        gap: 7px;
        margin: 12px 0;
    }

    .td-muscle-groups span {
        padding: 5px 11px;
        font-size: 13px;
    }

    .td-workout-note {
        padding: 11px 15px;
        border-radius: 15px;
    }

    .td-note-heading strong {
        font-size: 15px;
    }

    .td-workout-note p {
        margin-top: 5px;
        font-size: 14px;
        line-height: 1.4;
    }

    .td-exercise-row {
        min-height: 90px;
        padding: 8px;
        margin-bottom: 4px;
    }
    
    .td-plan-row .td-plan-value {
        margin-left: auto;
        margin-right: 25%;
    }
}

/* MOBIL */

@media (max-width: 600px) {

    /* HLAVNÝ OBAL */

    .td-workout-detail {
        padding: 8px 2.5% 175px;
    }


    /* INFORMÁCIE O TRÉNINGU */

    .td-workout-info {
        padding: 12px 3%;
        border-radius: 17px;
        margin-bottom: 12px;
    }

    .td-workout-date {
        font-size: 14px;
        margin-bottom: 5px;
    }

    .td-workout-date,
    .td-workout-name,
    .td-note-heading {
        gap: 7px;
    }

    .td-workout-name h2 {
        font-size: 22px;
    }

    .td-edit-icon {
        font-size: 19px;
    }

    .td-muscle-groups {
        gap: 5px;
        margin: 9px 0;
    }

    .td-muscle-groups span {
        padding: 4px 9px;
        font-size: 12px;
    }

    .td-workout-note {
        padding: 9px 12px;
        border-radius: 13px;
    }

    .td-note-heading strong {
        font-size: 13px;
    }

    .td-workout-note p {
        margin-top: 4px;
        font-size: 13px;
        line-height: 1.35;
    }


    /* RIADOK CVIKU */

    .td-exercise-row {
        gap: 5px;
        min-height: 76px;
        padding: 6px;
        border-radius: 15px;
        margin-bottom: 4px;
    }

.td-drag-handle {
    flex-basis: 27px;
    font-size: 23px;
    border-radius: 9px;
}
      
    .td-exercise-tools {
        flex: 0 0 12px !important;
        width: 12px !important;
        min-width: 12px !important;
        max-width: 12px !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .td-tool-dots {
        width: 8px;
        min-width: 8px;
        font-size: 27px;
        line-height: 20px;
    }

    .td-exercise-name {
        flex-basis: clamp(115px, 35%, 165px);
        font-size: 13px;
        line-height: 1.25;
        padding: 0 5px;
    }

    .td-sets-scroll {
        gap: 5px;
    }

    .td-set {
        flex-basis: 82px;
        padding: 6px 4px;
        border-radius: 12px;
    }

    .td-set strong {
        font-size: 17px;
    }

    .td-set span {
        font-size: 14px;
    }

    .td-set small {
        font-size: 10px;
        margin-top: 4px;
        padding-top: 3px;
    }

    .td-add-set {
        flex-basis: 42px;
        border-radius: 12px;
        font-size: 27px;
    }


    /* PRIDAŤ CVIK */

    .td-add-exercise {
        min-height: 46px;
        margin: 10px 0;
        font-size: 15px;
        border-radius: 25px;
    }

    .td-add-exercise span {
        font-size: 21px;
        margin-right: 5px;
    }


    /* POZNÁMKA PO TRÉNINGU */

    .td-after-note {
        padding: 10px;
        margin-top: 5px;
    }


    /* VYSVETLIVKY */

    .td-explanations {
        margin: 8px 2%;
        font-size: 12px;
    }

    .td-explanations summary {
        padding: 6px 0;
    }

    .td-explanations-content {
        padding: 4px 9px 9px;
        line-height: 1.4;
    }


    /* FIXNÝ SPODNÝ PANEL */

    .td-workout-actions {
        padding: 8px 3% 9px;
        gap: 5px;
    }


    /* HLAVNÉ TLAČIDLÁ */

    .td-primary-action {
        min-height: 46px;
        font-size: 14px;
        border-radius: 27px;
    }

    .td-primary-action span {
        font-size: 18px;
        margin-right: 5px;
    }


    /* TEXT POD VYTVORENÍM TRÉNINGU */

    .td-create-action-wrap {
        gap: 3px;
    }

    .td-create-action-wrap small {
        font-size: 10px;
        line-height: 1.3;
    }

    .td-delete-action {
        font-size: 13px;
    }

    .td-exercise-tools {
        flex-basis: 32px;
        gap: 5px;
    }   
    
/* BUNKA PLAN SERII A OPAKOVANI */    
    
.td-plan-value {
    flex-basis: 90px;
    padding: 6px 5px;
    border-radius: 12px;
}

.td-plan-value strong {
    font-size: 17px;
}

.td-plan-value small {
    font-size: 10px;
    margin-top: 4px;
}

    .td-plan-row .td-exercise-name {
        flex-basis: clamp(115px, 35%, 165px);
    }

    .td-plan-row .td-plan-value {
        margin-left: auto;
        margin-right: 10px;
    }
    
.td-plan-row .td-exercise-name {
    flex-basis: clamp(125px, 43%, 190px);
}    
}