/* COURSE 29.04.26
Developer: t.me/moretheme
Screen resolution: 460, 860, 1440, 1920 */

/* This module was built for MoreTheme's own design system and leans on its
   CSS custom properties (--color1, --bg2, --radius, etc.) for every color/
   radius in the file below — Cursus never defined them, so without this
   they'd all fall back to nothing. Mapped to our own palette here instead
   of rewriting every rule in the file. */
:root {
	--color1: #ed2a26;
	--color2: #ed2a26;
	--bg2: #f2f4f7;
	--text2: #686f7a;
	--radius: 10px;
	--light: #fff;
	--dark: #333;
}

.course-form_bonuse {
    background: url('../images/money.png') right 100px/ 200px no-repeat, linear-gradient(180deg, #a8e063, #56ab2f) center / cover no-repeat;
    box-shadow: 0 0 20px 0 rgb(0 0 0 / 10%);
    border-radius: var(--radius);
    padding: 30px;
    margin-bottom: 20px;
}

.course-form_bonus {
    display: flex;
    align-items: center;
    grid-gap: 20px;
    justify-content: space-between;
    margin-bottom: 30px;
}

.course-form_bonus > div > b {
    display: block;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
}

.course-form_bonus > div > span {
    display: block;
    color: #dbffdc;
    font-size: 16px;
    font-weight: bold;
}

.course-form_bonuse > a {
    max-width: max-content;
    display: flex;
    align-items: center;
    grid-gap: 10px;
    font-weight: 200;
    border-bottom: 1px dotted;
    opacity: 0.9;
}

.course-form_subs {
    background: var(--bg2);
    padding: 10px 20px;
    border-radius: var(--radius);
}

.course-form_subs label {
    display: block;
    font-size: 14px;
    font-weight: 500;
}

.course-form_payment {
    display: grid;
    grid-gap: 20px;
    grid-auto-rows: max-content;
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 860px) {
    .course-form_payment {
        grid-template-columns: repeat(2, 1fr);
    }
}

.course-form_payment > label {
    position: relative;
    color: var(--text2);
    font-weight: 500;
    overflow: hidden;
}

.course-form_payment > label input {
    position: absolute;
    margin: 12px;
    border: 2px solid var(--dark);
}

.course-form_payment > label input + img, .course-form_payment > a img {
    display: inline-block;
    background: #fff;
    padding: 10px 20px 10px 50px;
    border-radius: var(--radius);
    border: 2px solid var(--bg2);
    width: 100%;
    height: 80px;
    object-fit: contain;
    cursor: pointer;
    transition: 0.3s;
    margin-bottom: 10px;
}

.course-form_payment > label input:checked + img {
    opacity: 1;
    border: 2px solid var(--color1);
}

.course-form_payment > label span, .course-form_payment > a span {
    display: block;
    font-size: 14px;
    line-height: 1.5;
    margin-top: 10px;
}

/* ORDER PROFILE */
.course-order_list {
    display: grid;
    grid-gap: 30px;
    grid-auto-rows: max-content;
    grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 860px) {
    .course-order_list {
        grid-template-columns: 1fr;
    }
}

.course-order_list li {
    position: relative;
    background: linear-gradient(15deg, #ed2a26, #f26b68);
    color: #fff;
    border-radius: var(--radius);
    padding: 20px;
    overflow: hidden;
}

.course-order_list li:nth-child(2n+2) {
    background: linear-gradient(15deg, #333, #5a5a5a);
}

.course-order_list li span {
    display: block;
    font-size: 14px;
    line-height: 1.4;
    margin: 10px 0;
}

.course-order_list li span:first-child {
    font-size: 16px;
    font-weight: bold;
}

.course-check {
    display: flex;
    flex-direction: column;
    align-items: center;
    grid-gap: 10px;
}

/* Checkout page ([order] in course.tpl) — redesigned to match shopping_cart.html:
   .membership_chk_bg/.checkout_title/.order_dt_section are the theme's own
   classes (already styled + already red), .course-form_subs/.course-form_payment
   stay from the plugin itself (colored via the :root vars above). */
.cart_img { max-width: 100%; max-height: 160px; border-radius: 10px; margin-bottom: 1em; object-fit: cover; }
.membership_chk_bg .course-form_subs { margin-bottom: 1.5em; }
.membership_chk_bg .checkout_title.mt-30 { margin-top: 30px; }
/* Not enough width to fit "Накоплено: 0 бонусов" and the checkbox on one
   row — stack the checkbox below instead of squeezing both in. */
.membership_chk_bg .course-form_bonus { margin-bottom: 0; flex-direction: column; align-items: flex-start; gap: .6em; }
/* .course-form_bonus > div > span was styled #dbffdc (pale mint) for the
   plugin's own green gradient card — on our plain white .membership_chk_bg
   card that's nearly invisible. Also both > b and > span were display:block,
   stacking "Накоплено" and the number on separate lines. */
.cursus-bonus-balance { display: flex; align-items: baseline; gap: .4em; }
.course-form_bonus > .cursus-bonus-balance > b,
.course-form_bonus > .cursus-bonus-balance > span { display: inline; margin: 0; }
.membership_chk_bg .cursus-bonus-balance > span { color: #ed2a26; }
/* .coupon_input has no CSS of its own anywhere in the theme — the reference
   page's button-inside-the-field look actually comes from Semantic UI
   wrapper markup we deliberately don't load. Flexbox instead of the theme's
   .code-apply-btn position:absolute (which has no top offset, so without a
   *close* positioned ancestor it jumps to whatever ancestor happens to be
   positioned — here, .rght1528's position:sticky — landing nowhere near the
   input); flex keeps the button next to the input no matter what. */
/* .coupon_code p ("Промокод" label) is float:left/width:100% in the theme's
   own CSS — same recurring pattern, and it pushed .coupon_input (its next
   sibling) out of normal flow instead of letting it sit cleanly below. */
.coupon_code p { float: none; width: auto; }
.coupon_code .coupon_input { display: flex; gap: .6em; width: 100%; }
.coupon_code .coupon_input input { flex: 1 1 auto; min-width: 0; width: auto; height: 40px; box-sizing: border-box; }
/* .code-apply-btn is a plain <a> with no display set in the theme's own
   CSS — height:40px does nothing on an inline element, so its real height
   came from line-height/padding instead, not the intended 40px box. */
.coupon_code .code-apply-btn {
	position: static; flex: 0 0 auto;
	display: inline-flex; align-items: center; justify-content: center;
	height: 40px; box-sizing: border-box;
}

/* .membership_chk_bg is float:left in the theme's own CSS (same reason as
   ._216b01/.fcrse_3 elsewhere) — inside a Bootstrap flex column it doesn't
   need or want that, just full width. */
.row .membership_chk_bg { float: none; width: 100%; }

/* .chckot_btn is float:right in the theme's own CSS with nothing clearing
   it — inside our card that let it overlap the price rows above instead of
   sitting cleanly below them. Full-width flat button instead. */
.chckout_order_dt .chckot_btn { float: none; width: 100%; margin-top: 20px; }
.chckout_order_dt::after { content: ''; display: table; clear: both; }

/* The "spend bonus points" checkbox had no label at all — couldn't tell
   what it did or which value (checkbox vs balance) it belonged to. */
.cursus-bonus-toggle {
	display: flex; align-items: center; gap: .5em; cursor: pointer;
	font-size: 13px; color: var(--text2); flex: 0 0 auto;
}
.cursus-bonus-toggle input { margin: 0; }

/* Night mode — night-mode.css already covers .membership_chk_bg/
   .chckout_order_dt/.order_title (border + .order_price/.order_price5 text)
   since those are the theme's own classes, but only for the h4 heading
   variant; ours use h6/h3. .checkout_title h4, .course-form_subs, the
   payment-method cards and the coupon field are all the plugin's own
   classes with no dark styling anywhere at all. */
.night-mode .checkout_title h4,
.night-mode .order_title h6,
.night-mode .order_title h3 {
	color: #c7c7c7;
}
.night-mode .course-form_subs { background: #242424; }
.night-mode .course-form_subs label { color: #fff; }
.night-mode .course-form_payment > label input + img,
.night-mode .course-form_payment > a img {
	background: #333;
	border-color: #3a3a3a;
}
.night-mode .course-form_payment > label { color: #c7c7c7; }
.night-mode .coupon_code p { color: #c7c7c7; }
.night-mode .coupon_code .coupon_input input {
	background: #242424;
	border-color: #3a3a3a;
	color: #fff;
}
.night-mode .cursus-bonus-toggle { color: #c7c7c7; }
