/**
 * Revenue Engine — frontend stylesheet
 * All re_* shortcode styles live here.
 * Class names are prefixed with re- for namespace safety.
 */

/* =========================================================
   Base / shared
   ========================================================= */

.re-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
    max-width: 960px;
}

.re-msg {
    background: #f0fff4;
    border: 1px solid #46b450;
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: 14px;
}

.re-error-msg {
    background: #fff5f5;
    border: 1px solid #dc3232;
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: 14px;
}

.re-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 14px 16px;
}

.re-section-heading {
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 6px;
    margin-top: 28px;
    margin-bottom: 14px;
    font-size: 16px;
}

.re-section-heading--interactive {
    cursor: pointer;
}

.re-back-link {
    color: #0073aa;
    font-size: 14px;
    text-decoration: none;
}

.re-back-link:hover {
    text-decoration: underline;
}

.re-btn {
    display: inline-block;
    padding: 9px 22px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    line-height: 1.4;
}

.re-btn:hover {
    background: #005d8f;
    color: #fff;
}

.re-btn--green  { background: #46b450; }
.re-btn--green:hover  { background: #3a9c44; }
.re-btn--orange { background: #e67e22; }
.re-btn--orange:hover { background: #cf6d17; }
.re-btn--red    { background: #dc3232; }
.re-btn--red:hover    { background: #c02020; }
.re-btn--grey   { background: #f0f0f0; color: #333; border: 1px solid #ccc; }
.re-btn--grey:hover   { background: #e4e4e4; }
.re-btn--sm     { padding: 5px 12px; font-size: 12px; }
.re-btn--lg     { padding: 14px 28px; font-size: 16px; font-weight: 600; }

.re-input,
.re-select,
.re-textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}

.re-textarea { resize: vertical; }

.re-form-group {
    margin-bottom: 12px;
}

.re-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
}

.re-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.re-form-actions {
    margin-top: 14px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.re-badge {
    display: inline-block;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 10px;
    white-space: nowrap;
}

.re-badge--green  { background: #e8f5e9; color: #388e3c; }
.re-badge--blue   { background: #e3f2fd; color: #1976d2; }
.re-badge--purple { background: #f3e5f5; color: #7b1fa2; }
.re-badge--orange { background: #fff3e0; color: #e65100; }
.re-badge--grey   { background: #f5f5f5; color: #616161; }
.re-badge--teal   { background: #e0f2f1; color: #00695c; }

.re-progress-bar {
    background: #e0e0e0;
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
}

.re-progress-bar__fill {
    height: 8px;
    border-radius: 4px;
    background: #0073aa;
    transition: width .3s ease;
}

.re-progress-bar__fill--complete { background: #46b450; }

.re-collapsible-panel {
    display: none;
    margin-bottom: 28px;
}

/* =========================================================
   Programmes  [re_programmes]
   ========================================================= */

.re-programme-title { color: #4498D8; }

/* ── Programme page ── */

.re-programme {
    max-width: 700px;
    color: #fff;
    padding-bottom: 60px;
}

.re-programme .re-back-link {
    display: block;
    margin-bottom: 12px;
    color: #aaa;
    font-size: 14px;
    text-decoration: none;
}

.re-programme .re-back-link:hover { color: #E6AD23; }

.re-programme-desc {
    color: #ccc;
    margin-bottom: 20px;
    line-height: 1.6;
    font-size: 15px;
}

.re-programme-desc p { margin: 0 0 12px; }
.re-programme-desc p:last-child { margin-bottom: 0; }

/* ── Progress bar header ── */

.re-prog-progress {
    margin: 20px 0 24px;
}

.re-prog-progress__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-weight: 600;
    color: #fff;
    font-size: 14px;
}

.re-prog-badge {
    display: inline-block;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
}

.re-prog-badge--progress { background: #E6AD23; color: #1a1d24; }
.re-prog-badge--complete  { background: #46b450; color: #fff; }
.re-prog-badge--new       { background: #555;    color: #fff; }

/* ── Module sections ── */

.re-module-section {
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
}

.re-module-section__header {
    background: #4498D8;
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.re-module-section__title {
    flex: 1;
}

.re-module-view-btn {
    display: inline-block;
    padding: 5px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    background: #E6AD23;
    color: #1a1d24;
    border: none;
}

.re-module-view-btn:hover {
    background: #d49b15;
    color: #1a1d24;
}

.re-module-section--locked .re-module-section__header {
    background: #2d5a8a;
    opacity: 0.65;
}

.re-lock-icon { margin-right: 4px; }

.re-module-section__desc {
    background: rgba(255, 255, 255, 0.05);
    color: #bbb;
    padding: 10px 16px;
    font-size: 14px;
    line-height: 1.6;
}

.re-module-section__desc p { margin: 0 0 8px; }
.re-module-section__desc p:last-child { margin-bottom: 0; }

/* ── Output rows (shared by programme and module pages) ── */

.re-output-rows {
    background: rgba(255, 255, 255, 0.03);
}

.re-output-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.re-output-row--locked { opacity: 0.4; }

.re-output-row__circle {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #555;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #fff;
}

.re-output-row__circle--done {
    border-color: #E6AD23;
    background: #E6AD23;
    color: #223F4C;
}

.re-output-row__title {
    flex: 1;
    color: #fff;
    font-size: 14px;
}

.re-output-btn {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    border: none;
    cursor: pointer;
}

.re-output-btn--action {
    background: #E6AD23;
    color: #1a1d24;
}

.re-output-btn--action:hover {
    background: #d49b15;
    color: #1a1d24;
}

.re-output-btn--view {
    background: #2d3748;
    color: #aaa;
    border: 1px solid #444;
}

.re-output-btn--view:hover {
    background: #3d4758;
    color: #fff;
}

/* ── Module page ── */

.re-module {
    max-width: 760px;
    color: #fff;
    padding-bottom: 60px;
}

.re-module .re-back-link {
    display: block;
    margin-bottom: 12px;
    color: #aaa;
    font-size: 14px;
    text-decoration: none;
}

.re-module .re-back-link:hover { color: #E6AD23; }

.re-module-title {
    font-size: 22px;
    margin-bottom: 12px;
    color: #fff;
}

.re-module-desc {
    color: #ccc;
    margin-bottom: 16px;
    line-height: 1.6;
}

.re-module-desc p { margin: 0 0 10px; }
.re-module-desc p:last-child { margin-bottom: 0; }

.re-module-content {
    color: #ccc;
    margin-bottom: 16px;
    line-height: 1.6;
}

.re-outcomes h3,
.re-downloads h3,
.re-outputs h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: #fff;
}

.re-outcomes ul,
.re-downloads ul {
    padding-left: 20px;
    margin-bottom: 16px;
    color: #ccc;
}

.re-downloads a { color: #fff; text-decoration: none; }
.re-downloads a:hover { color: #E6AD23; }

.re-outputs-intro { color: #888; font-size: 14px; margin-bottom: 4px; }

/* ── Collapsible module content ── */

.re-content-wrap { margin-bottom: 16px; }

.re-content-preview p {
    color: #ccc;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
}

.re-read-btn {
    display: inline-block;
    padding: 7px 18px;
    background: transparent;
    color: #E6AD23;
    border: 1px solid #E6AD23;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 16px;
}

.re-read-btn:hover {
    background: #E6AD23;
    color: #1a1d24;
}

.re-content-full {
    display: none;
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 16px;
}

.re-content-wrap--open .re-content-preview { display: none; }
.re-content-wrap--open .re-content-full    { display: block; }

/* ── General link hover within programme/module contexts ── */

.re-programme a:not(.re-output-btn):not(.re-back-link):not(.re-module-view-btn):not(.re-next-module-btn):not(.re-next-output-btn):hover,
.re-module    a:not(.re-output-btn):not(.re-back-link):not(.re-read-btn):not(.re-module-view-btn):not(.re-next-module-btn):not(.re-next-output-btn):hover {
    color: #E6AD23;
}

/* ── Status/notice text ── */

.re-login-notice,
.re-access-denied,
.re-not-found,
.re-empty-notice,
.re-locked-notice {
    color: #aaa;
    font-style: italic;
}

/* =========================================================
   Daily View  [re_daily_view]
   ========================================================= */

.re-daily-view { max-width: 960px; }

.re-daily-view__date {
    margin-bottom: 4px;
    font-size: 22px;
}

.re-daily-view__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.re-daily-view__panel-heading {
    margin-top: 0;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 6px;
    font-size: 15px;
}

.re-daily-view__panel-heading--green   { border-bottom-color: #46b450; }
.re-daily-view__panel-heading--red     { border-bottom-color: #dc3232; }
.re-daily-view__panel-heading--yellow  { border-bottom-color: #f0b849; }
.re-daily-view__panel-heading--purple  { border-bottom-color: #9b59b6; }

.re-pursuit-item {
    padding: 10px 12px;
    background: #f6f7f7;
    border-radius: 6px;
    border-left: 3px solid #0073aa;
    font-size: 14px;
    margin-bottom: 6px;
}

.re-pursuit-item__stage { color: #888; margin-left: 8px; }
.re-pursuit-item__due   { font-size: 12px; color: #555; margin-top: 2px; }

.re-task-item {
    padding: 10px 12px;
    background: #fff5f5;
    border-radius: 6px;
    border-left: 3px solid #dc3232;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.re-activity-item {
    padding: 10px 12px;
    border-radius: 6px;
    border-left: 3px solid #f0b849;
    font-size: 14px;
    background: #fffbf0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.re-activity-item--done {
    background: #f0fff4;
    border-left-color: #46b450;
}

.re-activity-item__meta { font-size: 12px; color: #888; }

.re-calendar-item {
    padding: 10px 12px;
    background: #f8f4ff;
    border-radius: 6px;
    border-left: 3px solid #9b59b6;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.re-calendar-item__time { font-size: 12px; color: #888; }

.re-target-row {
    margin-bottom: 10px;
}

.re-target-row__header {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 4px;
}

.re-unreviewed-banner {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 14px;
}

/* =========================================================
   Targets  [re_targets]
   ========================================================= */

.re-targets { max-width: 860px; }

.re-targets__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.re-target-card {
    padding: 14px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    margin-bottom: 10px;
}

.re-target-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.re-target-card__label { font-size: 15px; }
.re-target-card__meta  { font-size: 12px; color: #888; margin-left: 8px; }
.re-target-card__value { font-size: 15px; font-weight: 600; }

.re-target-card__pct {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
    text-align: right;
}

.re-period-group { margin-bottom: 28px; }

.re-period-group__heading {
    margin-bottom: 12px;
    font-size: 16px;
}

.re-add-form-panel {
    display: none;
    background: #f6f7f7;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

/* =========================================================
   Cookbooks  [re_cookbooks]
   ========================================================= */

.re-cookbooks  { max-width: 860px; }
.re-cookbooks__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.re-cookbook-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: border-color .15s;
    margin-bottom: 10px;
}

.re-cookbook-card:hover { border-color: #0073aa; }

.re-cookbook-card__bar {
    width: 4px;
    height: 40px;
    border-radius: 2px;
    flex-shrink: 0;
}

.re-cookbook-card__label { font-size: 16px; font-weight: 700; }

.re-cookbook-card__meta {
    font-size: 13px;
    color: #888;
    margin-top: 2px;
}

.re-cookbook-detail { max-width: 860px; }

.re-recipe-block {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 12px;
}

.re-recipe-block__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.re-recipe-block__name { font-size: 15px; }
.re-recipe-block__desc { font-size: 13px; color: #888; margin-top: 2px; }

.re-ingredient-list {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.re-ingredient-item {
    font-size: 13px;
    color: #555;
    padding-left: 12px;
    border-left: 2px solid #e0e0e0;
}

.re-ingredient-item__freq { color: #aaa; }

.re-remove-btn {
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    font-size: 18px;
    flex-shrink: 0;
    margin-left: 12px;
    line-height: 1;
}

.re-remove-btn:hover { color: #dc3232; }

/* =========================================================
   Meetings  [re_meetings]
   ========================================================= */

.re-meetings { max-width: 860px; }

.re-meetings__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.re-meeting-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: border-color .15s;
    margin-bottom: 10px;
}

.re-meeting-card:hover { border-color: #0073aa; }

.re-meeting-card__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.re-meeting-card__title { font-size: 15px; font-weight: 700; }

.re-meeting-card__meta {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

.re-meeting-card__date {
    text-align: right;
    font-size: 13px;
    color: #555;
    flex-shrink: 0;
}

.re-meeting-card__badges {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.re-meeting-detail { max-width: 780px; }

.re-meeting-detail__title { margin: 12px 0 4px; }

.re-meeting-detail__meta {
    color: #888;
    font-size: 14px;
    margin: 0;
}

.re-msa-field { margin-bottom: 12px; }

.re-msa-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.re-prep-question {
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
}

.re-prep-question__text  { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.re-prep-question__guide { font-size: 12px; color: #888; margin-bottom: 8px; }

.re-live-capture-item {
    padding: 8px 12px;
    background: rgba(26, 29, 36, 0.07);
    border-radius: 6px;
    font-size: 14px;
    border-left: 3px solid #0073aa;
    margin-bottom: 6px;
}

.re-live-capture-item__letter { color: #0073aa; }
.re-live-capture-item__meta   { color: #aaa; font-size: 12px; margin-left: 8px; }

.re-transcript-block {
    background: #f6f7f7;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 16px;
    font-size: 14px;
    white-space: pre-wrap;
    line-height: 1.6;
}

.re-melt-signals__letter {
    font-weight: 700;
    font-size: 13px;
    color: #0073aa;
    margin-bottom: 2px;
}

/* =========================================================
   Add Meeting form
   ========================================================= */

.re-add-meeting-form {
    margin-top: 28px;
    border-top: 1px solid #ddd;
    padding-top: 24px;
    max-width: 640px;
}

/* =========================================================
   Coaching Booking  [re_coaching_booking]
   ========================================================= */

.re-coaching-booking { max-width: 640px; }

.re-coach-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: border-color .15s;
    margin-bottom: 12px;
}

.re-coach-card:hover { border-color: #0073aa; }

.re-coach-card img,
.re-coach-card .avatar {
    border-radius: 50%;
    flex-shrink: 0;
}

.re-coach-card__name  { font-size: 16px; font-weight: 700; }
.re-coach-card__price { color: #555; font-size: 14px; margin-top: 2px; }

.re-slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.re-slot-card {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: all .15s;
    display: block;
}

.re-slot-card:hover {
    border-color: #0073aa;
    background: #f0f8ff;
}

.re-slot-card__day  { font-weight: 700; font-size: 15px; }
.re-slot-card__time { font-size: 13px; color: #555; }

.re-booking-summary {
    padding: 20px;
    background: #f6f7f7;
    border-radius: 8px;
    margin: 16px 0;
}

.re-booking-summary p { margin: 0 0 8px; font-size: 15px; }
.re-booking-summary p:last-child { margin-bottom: 0; }

.re-booking-success {
    padding: 24px;
    background: #f0fff4;
    border: 1px solid #46b450;
    border-radius: 8px;
    text-align: center;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 640px) {
    .re-daily-view__grid { grid-template-columns: 1fr; }
    .re-form-row         { grid-template-columns: 1fr; }
    .re-slot-grid        { grid-template-columns: 1fr 1fr; }
    .re-meetings__header,
    .re-targets__header,
    .re-cookbooks__header { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* =========================================================
   Module Video — Plyr protection overrides
   ========================================================= */

/* 16:9 aspect-ratio container for the Plyr player */
.re-video-wrap {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    margin-bottom: 24px;
}

/* Plyr fills the 16:9 percentage-padding wrapper */
.re-video-wrap .plyr {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: 0;
}

/* Block all pointer interaction with the YouTube iframe itself.
   Plyr controls live in a sibling element and are unaffected. */
.re-video-wrap .plyr__video-embed iframe {
    pointer-events: none;
}

/* Next module link — shown when all outputs in the current module are approved */
.re-next-module {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(87, 110, 122, 0.3);
}

.re-next-module-btn {
    display: inline-block;
    background: #E6AD23;
    color: #1a1d24;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.re-next-module-btn:hover {
    background: #d49b15;
    color: #1a1d24;
    text-decoration: none;
}

