/* ============================================================
   Elevate Progress Tracker — frontend
   Brand: gold #C9A24B / deep red #C32126 / cream #F3F2EC
   ============================================================ */

:root {
    --ept-gold: #C9A24B;
    --ept-gold-dark: #A9832F;
    --ept-red: #C32126;
    --ept-green: #2E7D5B;
    --ept-green-soft: #E6F4EC;
    --ept-ink: #2b2b2b;
}

/* ---- Completion button ------------------------------------ */
.ept-complete {
    margin: 18px auto 6px;
    text-align: center;
}

/* Hide the real checkbox; the <label> is the button. */
.ept-complete-cb {
    position: absolute !important;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    pointer-events: none;
}

.ept-complete-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    padding: 12px 26px;
    border-radius: 999px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: .02em;
    line-height: 1;
    color: var(--ept-gold-dark);
    background: #fff;
    border: 2px solid var(--ept-gold);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .06);
    transition: all .18s ease;
    margin: 0;
}

.ept-complete-btn:hover {
    background: var(--ept-gold);
    color: #fff;
    box-shadow: 0 4px 12px rgba(201, 162, 75, .35);
    transform: translateY(-1px);
}

.ept-complete-btn:focus-visible {
    outline: 3px solid rgba(201, 162, 75, .5);
    outline-offset: 2px;
}

/* Circle icon that becomes a checkmark when complete */
.ept-complete-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid currentColor;
    flex: 0 0 auto;
    position: relative;
}

/* Label text is set by frontend.js from the label's data-text / data-done-text. */
.ept-complete-btn .ept-complete-text {
    display: inline-block;
}

/* ---- Completed state -------------------------------------- */
.ept-complete-cb:checked + .ept-complete-btn {
    color: #fff;
    background: var(--ept-green);
    border-color: var(--ept-green);
    box-shadow: 0 3px 10px rgba(46, 125, 91, .3);
}
.ept-complete-cb:checked + .ept-complete-btn:hover {
    background: #256a4c;
    border-color: #256a4c;
}
.ept-complete-cb:checked + .ept-complete-btn .ept-complete-icon {
    background: #fff;
    border-color: #fff;
}
.ept-complete-cb:checked + .ept-complete-btn .ept-complete-icon::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid var(--ept-green);
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

/* ---- Progress bars --------------------------------------- */
.ept-progress-strip {
    background: var(--ept-cream, #F3F2EC);
    padding: 30px 20px 10px;
}
.ept-progress {
    max-width: 620px;
    margin: 0 auto 26px;
    text-align: center;
}
.ept-progress__label {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--ept-gold-dark);
    margin-bottom: 8px;
}
.ept-progress--course .ept-progress__label {
    color: var(--ept-red);
}
/* Style ProgressAlly's bar even when its own (admin-configured) CSS is absent:
   give the track a height + background, colour the fill, centre the % text. */
.ept-progress .progressally_progress_bar_chart {
    height: 24px;
    min-height: 24px;
    width: 100%;
    background: #e7e3d5;                 /* track (empty) colour */
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: 999px !important;
    overflow: hidden;
    box-sizing: border-box;
}
.ept-progress .progressally_progress_bar_overlay {
    border-radius: 999px 0 0 999px;
    min-width: 0;
    transition: width .4s ease;
}
.ept-progress--module .progressally_progress_bar_overlay { background-color: var(--ept-gold); }
.ept-progress--course .progressally_progress_bar_overlay { background-color: var(--ept-red); }
/* Centre the percentage label over the whole track */
.ept-progress .progressally_progress_bar_percentage {
    position: absolute !important;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px !important;
    line-height: 1 !important;
    font-weight: 600;
    color: #3a3320;
}
.ept-progress .progressally_progress_bar_border_overlay { border-radius: 999px; }

/* ---- Completed toggle: turn the title + Divi's own icon green -----
   Note: Divi renders the accordion open/close icon via
   .et_pb_toggle_title::before, so we must NOT add our own ::before there
   (it collides). We only recolour. */
.et_pb_toggle.ept-toggle-done .et_pb_toggle_title,
.et_pb_toggle.ept-toggle-done h5.et_pb_toggle_title {
    color: var(--ept-green) !important;
}
.et_pb_toggle.ept-toggle-done .et_pb_toggle_title::before {
    color: var(--ept-green) !important;
}

/* ---- Certificate ----------------------------------------- */
.ept-cert-wrap {
    max-width: 640px;
    margin: 30px auto;
    text-align: center;
}
.ept-cert {
    padding: 30px 24px;
    border-radius: 16px;
    font-family: 'Montserrat', sans-serif;
}
.ept-cert--locked {
    background: #faf8f2;
    border: 2px dashed var(--ept-gold);
    color: #8a7a52;
}
.ept-cert--unlocked {
    background: linear-gradient(135deg, #fff, var(--ept-cream, #F3F2EC));
    border: 2px solid var(--ept-gold);
    box-shadow: 0 6px 20px rgba(201, 162, 75, .2);
}
.ept-cert__msg {
    font-weight: 600;
    font-size: 17px;
    margin: 10px 0 18px;
}
.ept-cert__lock {
    display: inline-block;
    width: 34px;
    height: 30px;
    margin-bottom: 6px;
    border: 3px solid currentColor;
    border-radius: 6px;
    position: relative;
}
.ept-cert__lock::before {
    content: "";
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 18px;
    height: 18px;
    border: 3px solid currentColor;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
}
.ept-cert__admin-note {
    color: #b45; font-size: 13px; margin-top: 14px;
}

@media (max-width: 600px) {
    .ept-complete-btn { font-size: 14px; padding: 11px 20px; }
}
