/*
Theme Name: RootXcess Academy
Template: twentytwentyfive
Description: Child theme for lms.rootxcess.com. RootXcess palette (navy #082E60), Poppins, 35px brand radius, LearnPress styling.
Version: 0.2.0
Text Domain: rootxcess-academy
*/

/* Eyebrow label (UPPERCASE, wide tracking) */
.rx-eyebrow { text-transform: uppercase; letter-spacing: .2em; font-size: .75rem; font-weight: 600; }

/* Cards */
.rx-card { transition: transform .2s ease, box-shadow .2s ease; }
.rx-card:hover { transform: translateY(-3px); box-shadow: 0 30px 60px -24px rgba(8,46,96,.28); }
.rx-card a { text-decoration: none; }

/* Header brand */
.rx-brand img { display: block; }
.rx-brand .wp-block-site-title a { text-decoration: none; }

/* ---------- LearnPress ---------- */
:root {
	--lp-primary-color: #082E60;
	--lp-secondary-color: #FFAA77;
	--lp-border-radius: 22px;
}
.learn-press-courses .course-item,
.lp-courses-bar, .lp-archive-courses .course-item { border-radius: 22px; }
.learn-press-courses .course-item { background: #fff; box-shadow: 0 2px 8px rgba(8,46,96,.08); overflow: hidden; }
.learn-press-courses .course-item:hover { box-shadow: 0 12px 28px -12px rgba(8,46,96,.20); }
.lp-button, button.lp-button, .learn-press-form button[type="submit"],
#learn-press-profile .lp-button, .course-summary .lp-button,
form[name="learn-press-form-login"] button, form[name="learn-press-form-register"] button {
	background: #082E60 !important; color: #FFFCF8 !important; border: 0 !important;
	border-radius: 999px !important; font-family: Poppins, sans-serif; font-weight: 600; letter-spacing: .02em;
}
.lp-button:hover, .learn-press-form button[type="submit"]:hover { background: #0d3f7f !important; }
.learn-press-form input[type="text"], .learn-press-form input[type="email"], .learn-press-form input[type="password"],
.learn-press-form textarea { border-radius: 16px; border: 1px solid rgba(8,46,96,.28); padding: .75rem 1rem; }
.learn-press-message, .lp-content-area .learn-press-message { border-radius: 16px; }
.course-price .price, .course-item-price .price { color: #005548; font-weight: 600; }
.course-price .free, .course-item-price .free { color: #005548; }

/* Links inside cards take the card's text colour (fixes navy-on-green) */
.rx-card a { color: inherit; }

/* No gap between the last section and the footer */
.wp-site-blocks > footer, .wp-site-blocks > .wp-block-template-part:last-child { margin-block-start: 0; }

/* LearnPress notices and filters in brand colours */
.learn-press-message, .lp-content-area .learn-press-message {
	background: #EEE9E9 !important; border: 0 !important; color: #082E60 !important;
}
.learn-press-message::before, .learn-press-message svg { color: #082E60 !important; }
.lp-form-course-filter .course-filter-submit, .lp-form-course-filter .course-filter-reset {
	border-radius: 999px !important; font-family: Poppins, sans-serif; font-weight: 600;
}
.lp-form-course-filter .course-filter-submit { background: #082E60 !important; color: #FFFCF8 !important; border-color: #082E60 !important; }
.lp-form-course-filter .course-filter-reset { background: transparent !important; color: #082E60 !important; border: 1px solid rgba(8,46,96,.28) !important; }
.learn-press-form label, #learn-press-profile label { font-style: normal !important; }

/* Contact form ([rx_contact_form]) */
.rx-form { max-width: none; }
.rx-form label { display: block; font-weight: 600; color: #082E60; font-size: .9375rem; margin-bottom: .35rem; }
.rx-form input[type=text], .rx-form input[type=email], .rx-form select, .rx-form textarea {
	width: 100%; box-sizing: border-box; font: inherit; color: #2c3a4d; background: #fff;
	border: 1px solid rgba(8,46,96,.28); border-radius: 16px; padding: .8rem 1rem;
}
.rx-form input:focus, .rx-form select:focus, .rx-form textarea:focus { outline: none; box-shadow: 0 0 0 3px #FFFCF8, 0 0 0 6px #082E60; }
.rx-form button { cursor: pointer; border: 0; }
.rx-hp { position: absolute !important; left: -9999px !important; height: 1px; overflow: hidden; }
.rx-notice { border-radius: 16px; padding: 1rem 1.25rem; font-size: .9375rem; }
.rx-notice--ok { background: #D7E48A; color: #082E60; }
.rx-notice--error { background: #FFAA77; color: #041a3a; }

/* Lesson / quiz popup header in navy (LearnPress uses the secondary colour) */
#popup-header { background: #082E60 !important; }
#popup-header .popup-header__inner, #popup-header .lp-button { background: transparent !important; }
#popup-header a, #popup-header .course-title a, #popup-header .toggle-content-item { color: #FFFCF8 !important; }

/* Code in lessons */
.wp-block-code, .lp-content-area pre, #learn-press-content-item pre, .content-item-description pre {
	background: #041a3a; color: #D7E48A; border-radius: 16px; padding: 1.25rem 1.5rem; overflow-x: auto;
	font-family: "DejaVu Sans Mono", Menlo, Consolas, monospace; font-size: .9rem; line-height: 1.6; border: 0;
}
.wp-block-code code, #learn-press-content-item pre code { color: inherit; background: none; font-family: inherit; }
:not(pre) > code { background: #EEE9E9; color: #082E60; border-radius: 6px; padding: .1em .4em; font-size: .9em; }

/* ---------- Lesson teaching components (course content) ---------- */
.rx-callout { border-radius: 16px; padding: 1.1rem 1.35rem; margin: 1.5rem 0; border-left: 5px solid; }
.rx-callout > :last-child { margin-bottom: 0; }
.rx-callout__title { font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; margin: 0 0 .4rem; }
.rx-callout--why { background: #082E60; color: #FFFCF8; border-color: #D7E48A; }
.rx-callout--why .rx-callout__title { color: #D7E48A; }
.rx-callout--why a { color: #FFFCF8; }
.rx-callout--analogy { background: #e6f3fa; border-color: #AED9EF; color: #082E60; }
.rx-callout--exam { background: #f3f6dc; border-color: #9fb43a; color: #041a3a; }
.rx-callout--exam .rx-callout__title { color: #4e5c12; }
.rx-callout--mistake { background: #fff1e8; border-color: #FFAA77; color: #041a3a; }
.rx-callout--mistake .rx-callout__title { color: #a14a16; }
.rx-callout--lab { background: #e5f0ee; border-color: #005548; color: #041a3a; }
.rx-callout--lab .rx-callout__title { color: #005548; }
.rx-keypoints { background: #EEE9E9; border-radius: 16px; padding: 1.1rem 1.35rem 1.1rem 2.6rem; }
.rx-keypoints li { margin: .3rem 0; }
#learn-press-content-item table, .lp-content-area table, .content-item-description table {
	width: 100%; border-collapse: collapse; margin: 1.25rem 0; font-size: .95rem; display: block; overflow-x: auto;
}
#learn-press-content-item th, .content-item-description th { background: #082E60; color: #FFFCF8; text-align: left; font-weight: 600; }
#learn-press-content-item th, #learn-press-content-item td,
.content-item-description th, .content-item-description td { padding: .6rem .85rem; border: 1px solid rgba(8,46,96,.14); vertical-align: top; }
#learn-press-content-item tr:nth-child(even) td, .content-item-description tr:nth-child(even) td { background: #f7f4f1; }
#learn-press-content-item h2 { margin-top: 2.25rem; font-size: 1.6rem; }
#learn-press-content-item h3 { margin-top: 1.5rem; font-size: 1.2rem; }

/* ---------- Lesson figures (photos with credits, diagrams) ---------- */
.rx-figure { margin: 1.75rem 0; }
.rx-figure img { display: block; width: 100%; height: auto; max-height: 520px; object-fit: contain; background: #fff;
	border-radius: 16px; border: 1px solid rgba(8,46,96,.12); }
.rx-figure--diagram img { background: #FFFCF8; max-height: none; }
.rx-figure figcaption { margin-top: .6rem; font-size: .875rem; line-height: 1.5; color: #4a5568; }
.rx-figure .rx-credit { display: block; margin-top: .2rem; font-size: .75rem; color: #6a7688; }
.rx-figure .rx-credit a { color: #6a7688; text-decoration: underline; }
.rx-figure-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin: 1.75rem 0; }
.rx-figure-row .rx-figure { margin: 0; }
.rx-figure-row .rx-figure img { height: 220px; object-fit: contain; }
/* Photo rows: uniform height whatever the source aspect ratio */
.rx-figure-row .rx-figure img { height: 220px !important; max-height: 220px !important; width: 100% !important; object-fit: contain !important; }
@media (max-width: 600px) { .rx-figure-row .rx-figure img { height: 180px !important; max-height: 180px !important; } }

/* ---------- Lesson Tasks (HTB-style) ---------- */
.rx-tasks { margin: 2.5rem 0 1rem; background: #041a3a; color: #FFFCF8; border-radius: 22px; padding: 1.6rem 1.6rem 1.2rem; }
.rx-tasks--challenge { background: linear-gradient(160deg, #041a3a 0%, #082E60 100%); border: 2px solid #D7E48A; }
.rx-tasks__header { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.rx-tasks__eyebrow { margin: 0; color: #D7E48A; text-transform: uppercase; letter-spacing: .18em; font-size: .72rem; font-weight: 700; }
.rx-tasks .rx-tasks__title { color: #FFFCF8 !important; margin: .2rem 0 0 !important; font-size: 1.5rem !important; }
.rx-tasks__score { font-size: .9rem; color: #b9c6d8; min-width: 160px; text-align: right; }
.rx-tasks__done { color: #D7E48A; font-weight: 700; font-size: 1.1rem; }
.rx-tasks__bar { display: block; height: 6px; background: rgba(255,252,248,.15); border-radius: 99px; margin-top: .4rem; overflow: hidden; }
.rx-tasks__bar span { display: block; height: 100%; background: #D7E48A; border-radius: 99px; transition: width .4s ease; }
.rx-tasks__intro, .rx-tasks__login { color: #b9c6d8; font-size: .9rem; margin: .8rem 0 1rem; }
.rx-tasks__list { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.rx-task { background: rgba(255,252,248,.05); border: 1px solid rgba(255,252,248,.12); border-radius: 16px; padding: 1rem 1.1rem; margin: 0 0 .8rem; transition: border-color .2s; }
.rx-task.is-solved { border-color: #D7E48A; }
.rx-task.is-revealed { border-color: #FFAA77; }
.rx-task__head { display: flex; gap: .8rem; align-items: flex-start; }
.rx-task__num { flex: 0 0 1.9rem; height: 1.9rem; border-radius: 50%; background: rgba(255,252,248,.12); color: #FFFCF8; display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.rx-task.is-solved .rx-task__num { background: #D7E48A; color: #082E60; }
.rx-task.is-revealed .rx-task__num { background: #FFAA77; color: #041a3a; }
.rx-task__q { flex: 1; color: #FFFCF8; line-height: 1.55; }
.rx-task__q p { margin: 0; color: #FFFCF8; }
.rx-task__q code, .rx-task__result code { background: rgba(215,228,138,.15); color: #D7E48A; padding: .1em .4em; border-radius: 6px; }
.rx-task__form { display: flex; gap: .5rem; margin: .8rem 0 .5rem 2.7rem; }
.rx-task__input { flex: 1; min-width: 0; background: #020f24; color: #D7E48A; border: 1px solid rgba(255,252,248,.2); border-radius: 12px; padding: .7rem .9rem;
	font-family: "DejaVu Sans Mono", Menlo, Consolas, monospace; font-size: .95rem; }
.rx-task__input::placeholder { color: rgba(185,198,216,.6); }
.rx-task__input:focus { outline: none; border-color: #D7E48A; box-shadow: 0 0 0 3px rgba(215,228,138,.25); }
.rx-task__submit { background: #D7E48A; color: #082E60; border: 0; border-radius: 999px; padding: 0 1.3rem; font-weight: 700; cursor: pointer; font-family: inherit; }
.rx-task__submit:hover:not(:disabled) { background: #e5eda0; }
.rx-task__tools { margin-left: 2.7rem; display: flex; gap: 1rem; }
.rx-task__tools button { background: none; border: 0; padding: 0; color: #AED9EF; font-size: .82rem; font-weight: 600; cursor: pointer; text-decoration: underline; font-family: inherit; }
.rx-task__tools button:disabled, .rx-task__submit:disabled, .rx-task__input:disabled { opacity: .45; cursor: default; }
.rx-task__hint { margin: .6rem 0 0 2.7rem; background: rgba(174,217,239,.12); border-radius: 12px; padding: .6rem .8rem; font-size: .88rem; color: #e6f3fa; }
.rx-task__feedback { margin: .4rem 0 0 2.7rem; font-size: .85rem; color: #b9c6d8; min-height: 0; }
.rx-task__feedback.is-wrong { color: #FFAA77; }
.rx-task__result { margin: .7rem 0 0 2.7rem; border-radius: 12px; padding: .7rem .9rem; font-size: .9rem; }
.rx-task__result p { margin: .4rem 0 0; color: #e6ecf3; }
.rx-task__result--solved { background: rgba(215,228,138,.12); color: #D7E48A; }
.rx-task__result--revealed { background: rgba(255,170,119,.12); color: #FFAA77; }
.rx-tasks.is-complete .rx-tasks__score::after { content: " ✓ All done"; color: #D7E48A; font-weight: 700; }
.rx-task.shake { animation: rx-shake .35s; }
@keyframes rx-shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@media (max-width: 600px) {
	.rx-task__form, .rx-task__tools, .rx-task__hint, .rx-task__feedback, .rx-task__result { margin-left: 0; }
	.rx-task__form { flex-direction: column; } .rx-task__submit { padding: .7rem; }
}

/* ---------- Watch it: YouTube references ---------- */
.rx-videos { margin: 2rem 0; }
.rx-videos__title { font-size: 1.3rem !important; margin: 0 0 .8rem !important; }
.rx-videos__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.rx-video { background: #fff; border: 1px solid rgba(8,46,96,.12); border-radius: 16px; overflow: hidden; }
.rx-video__frame { position: relative; aspect-ratio: 16/9; background: #041a3a; cursor: pointer; }
.rx-video__frame img { width: 100%; height: 100%; object-fit: cover; display: block; border: 0 !important; border-radius: 0 !important; }
.rx-video__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.rx-video__play { position: absolute; inset: 0; margin: auto; width: 68px; height: 48px; border-radius: 14px; background: rgba(4,26,58,.85); border: 0; cursor: pointer; }
.rx-video__play::after { content: ""; position: absolute; left: 27px; top: 14px; border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent #D7E48A; }
.rx-video__meta { padding: .7rem .9rem .8rem; font-size: .85rem; line-height: 1.4; }
.rx-video__meta strong { display: block; color: #082E60; font-size: .92rem; }
.rx-video__meta span { color: #6a7688; font-size: .78rem; }
.rx-video__why { display: block; margin-top: .3rem; color: #2c3a4d; }
.rx-tasks ol.rx-tasks__list { list-style: none !important; padding-left: 0 !important; margin-left: 0 !important; }
.rx-tasks ol.rx-tasks__list > li { list-style: none !important; }
.rx-tasks ol.rx-tasks__list > li::marker, .rx-tasks ol.rx-tasks__list > li::before { content: none !important; display: none !important; }
.rx-videos__grid > br, .rx-videos__grid > p:empty { display: none; }
