﻿html
{
    margin: 0 auto;
    max-width: 1400px;
    background-image: linear-gradient(to bottom, #000000, #2A1D31 50%, #000000);
}

body
{
    font-family: 'Segoe UI', system-ui, sans-serif;
    margin: 0;
    background-color: transparent !important;
    line-height: normal;
}

a
{
    color: #FFECB3 !important;
    text-decoration: none;
    text-decoration-skip-ink: none;
}

a:hover
{
    color: #ffc862 !important;
    border-bottom: 1px solid #ffc862;
    text-shadow: #ffc862 0px 0px 10px;
    outline: none;
}

.expandable + *
{
    display: none;
}

h1, h1 a, .section-title-ext, .section-title-ext:hover
{
    display: inline-block;
    margin-top: 0.2rem;
    margin-bottom: 0.2rem;
    color: orange !important;
    font-weight: normal;
    font-style: italic;
    font-size: 16pt;
    line-height: normal;
}

h1 a
{
    border-bottom-color: Orange;
}

::-moz-selection 
{ 
    color: white;
    background: #E87E04; 
}

::selection 
{
    color: white; 
    background: #E87E04; 
}

.section-title-ext,
.section-title-ext:hover
{
    color: orange !important; 
    border-bottom-color: orange !important;
}

hr.ui-widget-content
{
    border-style: dotted none none none; 
    width: 95%; 
    height: 1px;
}

table
{
    border-spacing: 0;
}

table td
{
    vertical-align: top;
}

.navi-icons a
{
    border-bottom-style: none;
}

.section-title
{
    font-style: italic;
    color: #FF9900;
}

.center
{
    text-align: center;
}

a.expandable:focus
{
    outline: none;
}

a:has(img), a:has(img):focus
{
    outline: none;
}

.expanded
{
    padding-left: 15px;
    padding-top: 15px;
}

/* List marker: the bi-chevron-right font glyph (the same one .expandable links
   draw) instead of the legacy list.png — crisp at any zoom, scales with the font,
   colorable, one less file request. Drawn as an absolute li::before rather than a
   real ::marker: Chrome accepts nothing but font/color on ::marker (no margins,
   no text-indent), so the glyph position could not be controlled there. */
.section-enum
{
    margin-top: 8px;
    line-height: normal;
    display: block;
    list-style: none; /* the marker is drawn by li::before below */
}

.section-enum li
{
    margin-bottom: 8px;
    position: relative;
}

.section-enum li::before
{
    content: '\f285'; /* bi-chevron-right */
    font-family: 'bootstrap-icons';
    font-size: .75rem;
    font-style: normal;
    font-weight: 400;
    color: orange;
    position: absolute;
    left: -1rem;
    top: 0.3rem;
}

.section-enum li ul
{
    margin-top: -5px;
    margin-left: 0;
    padding-left: 1.25rem;
}

.section-enum li:has(> a.expandable)
{
    margin-left: -1.25rem;
}

/* Expander items carry their own chevron (a.expandable::before) — hide the drawn one */
.section-enum li:has(> a.expandable)::before
{
    content: none;
}

.music-list
{
    list-style-type: none;
    list-style-image: none;
    margin-left: 10px;
    padding-left: 0;
}

.music-list .expanded
{
    margin-left: 5px;
    padding-top: 10px;
}

.music-list span
{
    display: block;
}

.music-list input
{
    margin-top: 10px;
}

#Content
{
    width: 100%; 
    visibility: hidden;
    border: 0;
}

#Content table, #Content td > div
{
    background: transparent;
}

#ProdDetails
{
    border-bottom-style: none;
}

#ProdHeader
{
    height: 51px;
    line-height: 50px;
    padding-left: 10px;
    padding-right: 10px;
    font-size: 20px;
    font-weight: normal;
    text-overflow: ellipsis !important;
    overflow: hidden;
}

.remark
{
    font-style: normal;
    color: #808080;
    font-size: smaller;
}

.book-quote p
{
    padding-bottom: 20px;
}

.book-reference
{
    display: block;
    font-style: italic;
    float: right;
    color: gray;
    font-size: small;
    margin-top: 5px;
}

.videocaption
{
    text-align: center;
}

video
{
    display: block;
    margin: 0 auto; 
}

.download-button
{
    float: left;
    font-weight: normal !important;
}

a.download-button
{
    float: none;
    width: auto;
}

.pdf
{
   float: left;
   margin-right: 5px;
   margin-top: 2px;
}

.content-left
{
    margin: 0 15px 0 5px;
    padding: 5px 5px 10px 0;
    float: left;
    text-align: center;
}

.content-left img,
.prod a img
{
    border: 1px solid #404040;
    margin: 0 auto;
}

.content-left img
{
    display: block;
}

.description
{
    padding-left: 10px;
    overflow: hidden;
}

.description p:first-child, .description h1:first-child
{
    margin-top: 0;
}

.clear
{
    float: none;
    clear: both;
}

/* For tablets phones */
@media only screen and (max-width: 767px)
{
    .content-left
    {
        float: none;
    }

}

@media print
{
    @page
    {
        margin: 0.4in 0.5in 0.4in 0.8in;
    }
    
    body
    {
        color: Black;
        font-family: Arial, sans-serif;
        font-size: 100%;
    }
    
    #ProdContent > a.expandable
    {
        display: none;
    }
    
    #ProdDetails, #ProdHeader
    {
        border-style: none;
    }
   
    h1, a, .section-title-ext
    {
        color: black !important;
        text-decoration: none !important;
        font-style: italic !important;
        border-style: none !important;
    }
    
    h1, .section-title-ext, .section-title
    {
        font-weight: bold;
        color: black;
    }
    
    .section-enum
    {
        list-style-type: disc;
    }

    /* back to a plain disc in print — hide the absolutely drawn font glyph */
    .section-enum li::before
    {
        content: none;
    }
}

/* ============================================================
   Blazor host styles (formerly site.css, merged into main.css)
   ============================================================ */


/* The old #Content was hidden until main.js loaded — now it is visible right away */
#Content
{
    visibility: visible;
}

/* Expanders (.expandable) — equivalent of MakeExpandLink from main.js without jQuery.
   Underlining uses text-decoration instead of the legacy border-bottom (the border was
   drawn under the marker too): ::before as inline-block is an atomic inline, so the
   underline does not propagate onto it — only the text is underlined */
/* .bs-island variant — overrides .bs-island a { text-decoration: none } (same specificity, but later in the file) */
a.expandable,
.bs-island a.expandable
{
    border-bottom: none;
    text-decoration: underline dotted !important;
}

a.expandable:hover,
.bs-island a.expandable:hover
{
    border-bottom: none;
}

a.expandable::before
{
    content: '\f285'; /* bi-chevron-right */
    font-family: 'bootstrap-icons';
    font-style: normal; /* in fragments the link may sit inside <em> — keep italics off the marker */
    font-weight: 400;
    display: inline-block;
    margin-right: .25em;
    vertical-align: bottom;
    text-decoration: none;
    transition: transform .18s ease;
}

/* Same glyph + rotation: transition on content does not work, but transform animates smoothly */
a.expandable.open::before
{
    transform: rotate(90deg);
}

a.expandable.open + *
{
    display: block;
}

/* Values substituted from the DB instead of placeholders */
.section-value
{
    white-space: normal;
}

.login-required
{
    color: #FFECB3;
}

/* ============================================================
   Bootstrap 5.3 "islands" (home page, enrollment form, cards)
   main.css applies site-wide with !important — isolate
   Bootstrap components via .bs-island, colors are taken from
   the current theme's variables (dark by default).
   ============================================================ */

.bs-island
{
    font-size: 1rem;
    color: var(--bs-body-color);
}

.bs-island a
{
    border-bottom: none !important;
    text-decoration: underline !important;
}

.bs-island .nav-pills .nav-link,
.mw-course-tabs .nav-link
{
    color: var(--bs-secondary-color) !important;
    background: transparent;
    border: none;
}

.bs-island .nav-pills .nav-link:hover,
.mw-course-tabs .nav-link:hover
{
    color: var(--bs-body-color) !important;
    text-decoration: none !important;
    transition: none; /* Bootstrap .nav-link fades border-color .15s — the hover frame must swap instantly */
}

.bs-island .nav-pills .nav-link.active,
.mw-course-tabs .nav-link.active
{
    color: #fff !important;
    background-color: #f58400;
    background-image: linear-gradient(#f58400, #f69933);
    border: 1px solid #ffaf0f;
}

.bs-island .card
{
    background-color: transparent;
}

/* Card headers like on the old site: grey "small dots" (jQuery UI ui-darkness tile
   ui-bg_dots-small_30_333333_2x2 — a 1px #515151 dot every 2px on #333), reproduced
   as a vector 2px checkerboard via conic-gradient, no images */
.bs-island .card-header
{
    --mw-header-base: #000;
    --mw-header-dot: #515151;
    background-color: var(--mw-header-base);
    background-image: conic-gradient(var(--mw-header-dot) 90deg, transparent 0deg 180deg, var(--mw-header-dot) 180deg 270deg);
    background-size: 2px 2px;
}

/* light theme: same dots, light palette (the legacy site was dark-only) */
[data-bs-theme="light"] .bs-island .card-header
{
    --mw-header-base: #ddd;
    --mw-header-dot: #c6c6c6;
}

.bs-island .validation-message
{
    display: block;
    color: var(--bs-danger);
    font-size: 0.875rem;
}

/* Products — like the original myway.by (.prod cells): no card frame, a flat tile
   "thumbnail + centered pale-gold caption"; hover — orange border, #323232 fill
   and a gray glow on the picture */
.bs-island .mw-prod-card
{
    background-color: transparent;
    border: 1px solid transparent;
    border-radius: 0;
    padding: 20px 20px 15px;
    height: auto;
}

.bs-island .mw-prod-card:hover,
.bs-island .mw-prod-card.mw-prod-card-active
{
    border-color: orange;
    background-color: #323232;
}

.bs-island .mw-prod-card .card-img-top
{
    width: auto;
    height: auto;
    max-width: 100%;
    display: block;
    margin: 0 auto;
    object-fit: contain;
    background: none;
    border: 1px solid #404040;
    border-radius: 0;
}

.bs-island .mw-prod-card:hover .card-img-top,
.bs-island .mw-prod-card.mw-prod-card-active:hover .card-img-top
{
    box-shadow: 0 0 30px gray;
}

.bs-island .mw-prod-card .card-body
{
    padding: .6rem 0 0;
    text-align: center;
}

.bs-island .mw-prod-card .card-body a
{
    font-size: .852rem;
    color: #ffecb3;
}

.bs-island .mw-prod-card .card-body a:hover
{
    text-decoration: underline !important;
}

/* light theme: the pale-gold caption is unreadable on white — a darker gold */
[data-bs-theme="light"] .bs-island .mw-prod-card .card-body a
{
    color: #a06a00;
}

/* Course tabs — CSS reproduction of the original myway.by look (jQuery UI ui-darkness
   ui-tabs, values taken from the live site's computed styles): the strip is
   ui-widget-header (#333 with a 2px dot tile at 30% — the same vector dots as the card
   headers, radius 6px 6px 0 0, padding .2em), tabs are ui-state-default (#666→#555
   gradient, bold #fff 13px, 6px top corners, overlapping the strip border by -1px),
   hover/active are ui-state-hover/active (#f58400→#f69933, border #ffaf0f). The old
   theme's PNG tiles are replaced by CSS gradients — no markup changes. */
.bs-island .mw-course-tabs
{
    --mw-tab-strip: #333;
    --mw-tab-strip-dot: rgba(81, 81, 81, .7);
    --mw-tab-strip-border: #333;
    --mw-tab-border: #666;
    --mw-tab-color: #fff;
    --mw-tab-from: #666;
    --mw-tab-to: #555;
    --mw-tab-hot-border: #ffaf0f;


    /* tabs fill the full content width (like the original); wrap on narrow screens */

    align-items: flex-end;
    margin-top: 1.4em;
    margin-bottom: -1px !important; /* overrides Bootstrap mb-3 (it is !important): dock the strip onto the card border */
    padding: .2em .2em 0;
    border: 1px solid var(--mw-tab-strip-border);
    border-radius: 6px 6px 0 0;
    background-color: var(--mw-tab-strip);
    background-image: conic-gradient(var(--mw-tab-strip-dot) 90deg, transparent 90deg 180deg, var(--mw-tab-strip-dot) 180deg 270deg, transparent 270deg);
    background-size: 2px 2px;
}

/* The tab overlaps the bottom border of the strip (margin -1px in ui-tabs-nav li) */
.bs-island .mw-course-tabs .nav-item
{
    flex: 1 0 auto; /* stretch to fill the row, never below content width, wrap when tight */
    margin: 0 .2em -1px 0; /* the tab overlaps the bottom border of the strip (margin -1px in ui-tabs-nav li) */
}

/* wide enough — like the original: equal tabs filling the whole row;
   below 992px they keep natural widths and wrap */
@media (min-width: 992px)
{
    .bs-island .mw-course-tabs .nav-item
    {
        flex: 1 1 0;
    }
}

.bs-island .mw-course-tabs .nav-link
{
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: .5em 1em;
    font-size: 0.825rem;
    line-height: 1.3;
    font-weight: 700;
    color: var(--mw-tab-color) !important;
    border: 1px solid var(--mw-tab-border);
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    background-color: var(--mw-tab-to);
    background-image: linear-gradient(var(--mw-tab-from), var(--mw-tab-to));
    text-decoration: none !important;
    transition: none; /* Bootstrap .nav-link fades border-color .15s — the hover frame must swap instantly */
}

.bs-island .mw-course-tabs .nav-link:hover,
.bs-island .mw-course-tabs .nav-link.active,
.bs-island .mw-course-tabs .nav-link.active:hover
{
    color: #fff !important;
    border-color: var(--mw-tab-hot-border);
    background-color: #f58400;
    background-image: linear-gradient(#f58400, #f69933);
    text-decoration: none !important;
    transition: none; /* Bootstrap .nav-link fades border-color .15s — the hover frame must swap instantly */
}

/* Schedule badge (скоро/летом/осенью…) — a caption above the tab (gold italic, like the
   original). The underline is only on the active tab and spans the full tab width
   (box 100% + border-bottom; text-decoration would underline only the word).
   pointer-events: none — must not swallow tab clicks */
.bs-island .mw-course-tabs .badge
{
    position: absolute;
    top: -2.4em;
    left: 0;
    right: 0;
    padding-bottom: 0.2em;
    border: 0;
    border-bottom: 2px solid transparent; /* reserve the active-tab underline space, like the original */
    border-radius: 0;
    background-color: transparent !important;
    color: #ffc862 !important;
    font-size: 0.8rem;
    font-style: italic;
    font-weight: normal;
    text-decoration: none !important;
    transition: none; /* Bootstrap .nav-link fades border-color .15s — the hover frame must swap instantly */
    text-align: center;
    white-space: nowrap;
    pointer-events: none;
}

.bs-island .mw-course-tabs .nav-link.active .badge
{
    border-bottom: 2px solid orange;
}

/* light theme: the legacy site was dark-only — here the same geometry with light greys,
   the orange hover/active accent (the site's brand) stays */
[data-bs-theme="light"] .bs-island .mw-course-tabs
{
    --mw-tab-strip: #e3e3e3;
    --mw-tab-strip-dot: rgba(150, 150, 150, .7);
    --mw-tab-strip-border: #ccc;
    --mw-tab-border: #b5b5b5;
    --mw-tab-color: #333;
    --mw-tab-from: #fff;
    --mw-tab-to: #e3e3e3;
}

.bs-island .mw-side-img
{
    max-width: 100%;
    max-height: 110px;
}

/* Partner tiles in the sidebar — the same flat .prod tiles as on the original site
   (#Advert .prod: display:block, transparent, padding 20/20/15). On hover — an orange
   border, #323232 fill and a gray glow on the cover; caption — 13.2px pale-gold, centered.
   The underline on the caption stays: it comes from our site-wide .bs-island a rule,
   the original shows a dotted underline there as well */
.mw-partner
{
    display: block;
    height: auto;
    padding: 20px 20px 15px;
    border: 1px solid transparent;
    border-radius: 0;
    background-color: transparent;
    color: #ffecb3;
    text-align: center;
    font-size: .825rem; /* 13.2px as on the original */
}

.mw-partner:hover,
.mw-partner.mw-partner-active,
.mw-partner:focus-visible
{
    border-color: orange;
    background-color: #323232;
    color: #ffecb3;
}

.bs-island .mw-partner .mw-side-img
{
    display: block;
    margin: 0 auto;
    width: auto;
    border: 1px solid #404040;
}

.bs-island .mw-partner:hover .mw-side-img,
.bs-island .mw-partner.mw-partner-active:hover .mw-side-img
{
    box-shadow: 0 0 30px gray;
}

/* light theme: pale-gold is unreadable on white — a darker gold */
[data-bs-theme="light"] .mw-partner
{
    color: #a06a00;
}

button.mw-theme-btn
{
    padding: 0;
    vertical-align: top;
    margin-right: 6px;
    border: none;
    padding-bottom: 0.3em;

}

/* ============================================================
   Bootstrap Icons in the chrome (font, color = currentColor)
   ============================================================ */

/* Navigation icons in the header (instead of the home/sitemap/feedback .gif images) */
.navi-icons .bi
{
    font-size: 1.1rem;
    vertical-align: middle;
    margin-left: 6px;
}


/* Theme toggle: in dark mode show the sun (click → light), in light mode — the moon */
.theme-icon-sun, .theme-icon-moon
{
    pointer-events: none;
}

[data-bs-theme="dark"] .theme-icon-moon
{
    display: none;
}

[data-bs-theme="light"] .theme-icon-sun
{
    display: none;
}

/* Icon spacing in the admin pill navigation (icons-only buttons must not get the margin,
   otherwise flex-centering shifts the glyph off-center) */
.nav-pills .nav-link .bi
{
    margin-right: 0.35rem;
}

/* Blazor unhandled exception UI: hidden until an error occurs
   (app.css of this template version is missing the display:none rule) */
#blazor-error-ui
{
    color-scheme: light;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss
{
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* ============================================================
   Footer — Bootstrap instead of the legacy <table class="footer">
   (main.css: .footer{color:Gray} — keep the muted text)
   ============================================================ */
.mw-footer
{
    color: var(--bs-secondary-color);
    font-size: .95rem;
}

@media print
{
    .mw-footer
    {
        display: none;
    }
}


/* ============================================================
   Site shell (MainLayout) — Bootstrap flexbox instead of tables.
   Old visual traits preserved: dark texture, gold links,
   Georgia slogan, ad to the right of the logo.
   ============================================================ */

/* --- auth + control icons, same row as the logo (the separate top utility bar is retired) --- */
.mw-topline
{
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: .75rem;
    /* center against the logo image, not the logo+slogan column */
    align-self: flex-start;
}
/* On mobile the icons live on their own row above the logo */
@media (max-width: 991.98px)
{
    .mw-topline
    {
        order: -1;
        width: 100%;
        justify-content: flex-end;
        margin-top: 0;
    }
}

.mw-auth
{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem 1rem;
}

.mw-user
{
    color: var(--bs-warning-text-emphasis);
}

.mw-auth a,
.mw-brand-link,
.mw-ad
{
    border-bottom: none !important;
    text-shadow: none !important;
    text-decoration: none;
}

.mw-auth a:hover,
.mw-brand-link:hover,
.mw-ad:hover
{
    text-decoration: underline;
}

.navi-icons
{
    display: flex;
    align-items: center;
    gap: .25rem;
    margin: 0;
}

/* --- masthead: logo + slogan and ad (equivalent of the two td cells of the old table) --- */
.mw-masthead-inner
{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem 2rem;
    padding: 1rem 1rem .75rem;
}

.mw-brand
{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    min-width: 0;
}

.mw-brand-link img
{
    max-width: 100%;
    height: auto;
}

.mw-slogan
{
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 14.67px; /* as on the original site (11pt Georgia) */
    color: #ffc862; /* the original gold */
    margin-top: -.45rem; /* the original pulls the slogan up onto the logo’s built-in bottom padding */
    text-align: center;
}

.mw-ad
{
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.mw-ad img
{
    max-width: min(100%, 420px);
    height: auto;
}

@media (min-width: 992px)
{
    .mw-masthead-inner
    {
        flex-wrap: nowrap !important; /* overrides Bootstrap .flex-wrap (it is !important) */
        justify-content: flex-start;
    }

    .mw-brand
    {
        flex: 0 0 300px;
    }

    .mw-ad
    {
        flex: 1 1 auto;
        justify-content: flex-start;
        padding-left: 1.5rem;
    }
}

/* --- divider instead of repeat-x on Divider.png --- */
.mw-divider
{
    height: 1px;
    margin: 0 1rem 1rem;
    background: linear-gradient(90deg, transparent, var(--bs-border-color) 15%, color-mix(in srgb, var(--bs-warning) 55%, transparent) 50%, var(--bs-border-color) 85%, transparent);
}

@media print
{
    .mw-masthead, .mw-divider
    {
        display: none;
    }
}

/* --- chrome: muted links with gold underline (myWay brand) --- */
.mw-auth a
{
    color: var(--bs-secondary-color) !important;
}

.mw-auth a:hover
{
    color: var(--bs-warning-text-emphasis) !important;
    text-decoration: underline;
}

.mw-footer a
{
    color: var(--bs-warning-text-emphasis) !important;
    text-decoration: none;
}

.mw-footer a:hover
{
    text-decoration: underline;
}

/* --- content fragments: media no wider than the column (e.g. video width=400 in fragments) --- */
#Content img,
#Content video,
#Content embed,
#Content iframe
{
    max-width: 100%;
}

/* ============================================================
   Leftover ui-* classes in HTML fragments (jQuery UI removed):
   span.ui-icon.pdf — download icons; ui-state-default — "Download" buttons
   ============================================================ */
.ui-icon
{
    display: inline-block;
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

/* PDF icon — bootstrap-icons instead of the pdf.png image background (see .pdf in main.css) */
.ui-icon.pdf
{
    width: auto;
    height: auto;
}

.ui-icon.pdf::before
{
    content: '\f756'; /* bi-filetype-pdf */
    font-family: 'bootstrap-icons';
    font-style: normal;
    font-weight: 400;
    font-size: 1rem;
    margin-top: -0.2em;
    display: inline-block;
    color: var(--bs-danger);
}

.ui-state-default.ui-button,
input.ui-state-default,
button.ui-state-default
{
    appearance: none;
    display: inline-block;
    padding: .3rem .8rem;
    font: inherit;
    color: var(--bs-body-color);
    background: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 6px;
    cursor: pointer;
}

.ui-state-default.ui-button:hover,
input.ui-state-default:hover,
button.ui-state-default:hover
{
    border-color: var(--bs-warning);
    color: var(--bs-warning-text-emphasis);
}

/* Order form (Blazor OrderForm) — hidden by default and shown only when the
   old .expandable link is expanded: the opener link is marked data-mw-order by
   FragmentService, site.js adds .open to #order-form and to .mw-order-form directly.
   The "~" rule is kept as a fallback (e.g. if site.js fails to load). The file order —
   site.css after bootstrap — guarantees the .card override. */

#order-form,
.mw-order-form
{
    display: none !important;
}

#order-form.open ~ .mw-order-form,
.mw-order-form.open
{
    display: flex !important;
}

.mw-order-form .card-body
{
    background-color: var(--bs-body-bg);
}

/* ============================================================
   Auth dialog: the /Account/Login and /Account/Register routes
   render a static modal (.modal[data-mw-dialog]) with
   "Log in / Register" tabs (AuthTabs) — switched by the native
   Blazor router, the active tab = the current URL.
   ============================================================ */
.modal[data-mw-dialog] .modal-dialog
{
    max-width: 440px;
}

/* The auth dialog floats (position:fixed) over an empty main — give the page body so
   the footer is not squeezed right under the header; the backdrop dims the shell */
body:has(.modal[data-mw-dialog]) main
{
    min-height: 70vh;
}

.mw-auth-header
{
    align-items: flex-start;
    padding-bottom: 0;
}

.mw-auth-tabs
{
    flex: 1 1 auto;
    border-bottom: 0;
    align-self: flex-end; /* sit on the header border so the active tab can punch through it */
}

/* NavLink renders nav-item and nav-link on the same <a> — hence both classes on one selector */
/* The divider under the tab row is the modal header border — the active tab
   punches through it: bootstrap already pulls the tab 1px down and paints its
   own background there, so just make the bottom edge transparent (a NavLink
   element carries nav-item and nav-link together, hence .nav-item.active) */
.mw-auth-tabs .nav-item.active
{
    border-bottom-color: transparent;
}
.mw-auth-tabs .nav-item
{
    flex: 1 1 0;
    text-align: center;
}

.mw-auth-header .btn-close
{
    flex: 0 0 auto;
    margin: .65rem 0 0 .5rem;
    border: 0;
    border-bottom: 2px solid transparent; /* reserve the active-tab underline space, like the original */
}

/* Login icon in the top utility bar */
.mw-auth-icon
{
    display: inline-flex;
    align-items: center;
    font-size: 1.15rem;
}

/* ============================================================
   Admin panel in the main shell (MainLayout): the mw-admin-main container
   neutralizes legacy site styles (gold links, italic h1, 75% font),
   pills navigation — in the current theme's colors
   ============================================================ */
.mw-admin-main,
.mw-manage-main
{
    color: var(--bs-body-color);
    font-size: 1rem;
    min-height: 70vh;
    padding-bottom: 2rem;
    border-radius: var(--bs-border-radius-lg);
}

.mw-admin-main a
{
    border-bottom: none !important;
    text-shadow: none !important;
    text-decoration: none;
}

.mw-admin-main a:hover
{
    text-decoration: underline;
    text-shadow: none !important;
}

.mw-admin-main h1, .mw-admin-main h2, .mw-admin-main h3, .mw-admin-main h4, .mw-manage-main h1, .mw-manage-main h2, .mw-manage-main h3, .mw-manage-main h4,
.mw-admin-main label, .mw-admin-main th, .mw-admin-main td, .mw-admin-main small, .mw-manage-main label, .mw-manage-main th, .mw-manage-main td, .mw-manage-main small
{
    color: inherit !important;
    font-style: normal;
}

.mw-admin-main h1, .mw-admin-main h2, .mw-admin-main h3, .mw-manage-main h1, .mw-manage-main h2, .mw-manage-main h3
{
    color: var(--bs-heading-color) !important;
}

.mw-admin-main .text-secondary,
.mw-manage-main .text-secondary
{
    color: var(--bs-secondary-color) !important;
}

.mw-admin-main .text-danger,
.mw-manage-main .text-danger
{
    color: var(--bs-danger) !important;
}

.mw-admin-main .text-success,
.mw-manage-main .text-success
{
    color: var(--bs-success) !important;
}

/* Admin pills navigation (in the shell header, outside mw-admin-main) */
.mw-admin-nav .nav-link
{
    color: var(--bs-body-color);
    border-bottom: none;
}

.mw-admin-nav .nav-link:hover
{
    color: var(--bs-body-color);
    background: var(--bs-tertiary-bg);
}

.mw-admin-nav .nav-link.active
{
    color: #fff !important;
    background: var(--bs-primary);
}

/* Admin tables — no background of their own (Bootstrap 5.3 gives .table the body background) */
.mw-admin-main .table,
.mw-manage-main .table
{
    --bs-table-bg: transparent;
}

/* ============================================================
   Back to top — fixed round button in the bottom right corner
   (btn btn-warning + bi-arrow-up). Hidden until site.js detects scrolling.
   ============================================================ */
.mw-to-top
{
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1030; /* below modals (1055), above content */
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .45);
    opacity: 0;
    visibility: hidden;
    transform: translateY(.5rem);
    transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
}

.mw-to-top.mw-to-top-show
{
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .2s ease, transform .2s ease, visibility 0s linear 0s;
}

@media print
{
    .mw-to-top
    {
        display: none;
    }
}

/* Color: a dark translucent disc with a thin orange rim and a gold arrow — in the
  palette of the course tab strip, so the button doesn't stand out from the site */
.mw-to-top
{
    background-color: rgba(40, 40, 40, .88);
    border: 2px solid #ffaf0f;
    color: #ffc862;
}

.mw-to-top:hover,
.mw-to-top:focus-visible
{
    background-color: #f58400;
    background-image: linear-gradient(#f58400, #f69933);
    border-color: #ffaf0f;
    color: #fff;
}
/* The sidebar top aligns with the tab strip top (not with the badge captions floating
   above it): keep the row's vertical gutter (a margin-top on columns in Bootstrap) and
   add the strip's 1.4em offset on top — mirror it on xl+ only. */
@media (min-width: 1200px)
{
    .mw-side-col
    {
        margin-top: calc(var(--bs-gutter-y) + 1.4em);
    }
}

/* Sidebar headers («Рекомендуем», «Партнёры») — the same height as the tab strip
   (52px at xl: two-line tabs + strip padding), text centered so the bars read
   as one row with the tabs */
.mw-side-col .card-header
{
    display: flex;
    align-items: center;
    justify-content: center;
    height: 3.3rem; /* one event-tab strip (≈53px), like the tabs it pairs with */
}

/* The partners card must not clip the hover border of the last tile
   (Bootstrap .card has overflow:hidden by default) */
.bs-island .card.mw-partner-card
{
    overflow: visible;
}

/* Site-wide .bs-island a { border-bottom: none !important } was eating the hover
   box's bottom edge on the partner tiles (they are anchors) — bring it back */
.bs-island a.mw-partner
{
    border-bottom: 1px solid transparent !important;
}

.bs-island a.mw-partner:hover,
.bs-island a.mw-partner.mw-partner-active,
.bs-island a.mw-partner:focus-visible
{
    border-bottom-color: orange !important;
}

/* Primary buttons — in the palette of the active course tab (orange), not Bootstrap blue;
   covers every .btn-primary (profile forms, order buttons, admin) via the BS button vars */
.btn-primary
{
    --bs-btn-color: #fff;
    --bs-btn-bg: #f58400;
    --bs-btn-border-color: #ffaf0f;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #f69933;
    --bs-btn-hover-border-color: #ffaf0f;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #e07b00;
    --bs-btn-active-border-color: #d98500;
    --bs-btn-disabled-color: rgba(255, 255, 255, .65);
    --bs-btn-disabled-bg: #f58400;
    --bs-btn-disabled-border-color: #ffaf0f;
    --bs-btn-focus-shadow-rgb: 245, 132, 0;
    background-image: linear-gradient(#f58400, #f69933);
}

.btn-primary:hover
{
    background-image: linear-gradient(#f69933, #f58400);
}

/* Admin nav-pills — active pill in the tab-strip (warning) palette, not Bootstrap blue */
.mw-admin-nav .nav-pills .nav-link
{
    color: #ffecb3; /* site link gold (main.css a-color) */
}

.mw-admin-nav .nav-pills .nav-link:hover
{
    color: #ffc862; /* site link hover gold */
    text-decoration: none;
}

.mw-admin-nav .nav-pills .nav-link.active,
.mw-admin-nav .nav-pills .show > .nav-link
{
    color: #fff !important;
    background-color: #f58400;
    background-image: linear-gradient(#f58400, #f69933);
    border: 1px solid #ffaf0f;
}

/* Outline buttons (the btn-group filters «Все/Новые», «Править» in admin tables) —
   warning palette to match .btn-primary above */
.btn-outline-primary
{
    --bs-btn-color: #f58400;
    --bs-btn-border-color: #f58400;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #f58400;
    --bs-btn-hover-border-color: #ffaf0f;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #e07b00;
    --bs-btn-active-border-color: #e07b00;
    --bs-btn-disabled-color: rgba(245, 132, 0, .55);
    --bs-btn-disabled-border-color: rgba(245, 132, 0, .55);
    --bs-btn-focus-shadow-rgb: 245, 132, 0;
}

/* User menu in the top bar: icon + login as a plain button, Bootstrap dropdown
   (show class is toggled by site.js since bootstrap.bundle.js is not loaded) */
.mw-user-btn
{
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: 0;
    border: 0;
    color: var(--bs-warning-text-emphasis);
    font-size: inherit;
}

.mw-user-btn:hover,
.mw-user-btn:focus-visible
{
    color: orange;
}

.mw-user-btn .bi
{
    font-size: 1.2rem;
}

.mw-user-menu
{
    min-width: 14rem;
}

.mw-user-menu .dropdown-item i
{
    margin-right: .45rem;
}

/* Without bootstrap.bundle.js the .dropdown-menu-end anchor rule ([data-bs-popper])
   never applies — anchor the user menu to the right edge of its .dropdown manually */
.mw-user-menu
{
    position: absolute;
    top: 100%;
    right: 0;
    left: auto;
}

.wf-body .wf-tree-label
{
    flex: inherit;
}

.wf-root button.wf-button[class*="wf-button-"]
{
    color: white !important;
}

.wf-root .wf-places,
.wf-root .wf-toolbar-row .wf-icon-button:has(.wf-icon-undo,.wf-icon-redo),
.wf-root .wf-toolbar-row .wf-icon-button:has(.wf-icon-undo,.wf-icon-redo) + .wf-toolbar-divider
{
    display: none;
}
/* Profile section menu (Account/Manage) — the same warning palette for the pills
   as the admin nav and the course tabs */
.mw-manage-nav .nav-link
{
    color: #ffecb3; /* site link gold (main.css a-color) */
    /* legacy main.css a:hover paints border-bottom — keep it invisible here */
    border-bottom: 1px solid transparent;
}

.mw-manage-nav .nav-link:hover
{
    color: #ffc862; /* site link hover gold */
    text-decoration: none;
    border-bottom-color: transparent;
}

.mw-manage-nav .nav-link.active
{
    color: #fff !important;
    background-color: #f58400;
    background-image: linear-gradient(#f58400, #f69933);
    border: 1px solid #ffaf0f;
}

/* Legacy main.css paints «a:hover { border-bottom: 1px solid #ffc862 }» on every link —
   anchor-buttons (.btn rendered as <a>, e.g. the admin/PersonalData «Delete») must not
   get that glowing underline; keep an invisible border in the base state so hovering
   does not shift layout by a pixel */
a.btn,
a.btn:hover
{
    border-bottom: 1px solid transparent;
}

/* User dropdown: «Change password» is an <a> and inherits the legacy gold hover
   underline («Logout» is a button, so it never got one). Match the button look */
.mw-user-menu a.dropdown-item,
.mw-user-menu a.dropdown-item:hover
{
    border-bottom: 1px solid transparent;
    text-decoration: none;
}

/* Same rule extended: legacy a:hover also recolors the text bright-gold — for dropdown
   anchors use the same hover palette as bootstrap dropdown-item buttons («Logout») */
.mw-user-menu a.dropdown-item
{
    color: var(--bs-dropdown-link-color) !important;
}

.mw-user-menu a.dropdown-item:hover
{
    color: var(--bs-dropdown-link-hover-color) !important;
    background-color: var(--bs-dropdown-link-hover-bg);
}


/* ============================================================
   Focus halo on inputs — site-orange, not Bootstrap blue.
   (Bootstrap's compiled .form-control:focus hardcodes rgba(13,110,253)
   literals — --bs-focus-ring-color is not consulted, so override rules.)
   ============================================================ */
.form-control:focus,
.form-select:focus,
.form-check-input:focus
{
    border-color: #ffaf0f; /* the active-tab border color */
    box-shadow: 0 0 0 .25rem rgba(246, 153, 51, .5); /* #f69933 halo */
}

[data-bs-theme="light"] .form-control:focus,
[data-bs-theme="light"] .form-select:focus,
[data-bs-theme="light"] .form-check-input:focus
{
    border-color: #f58400;
    box-shadow: 0 0 0 .25rem rgba(245, 132, 0, .35);
}

/* ============================================================
   Product pages: the course tab strip is replaced with the back arrow
   («Перейти к расписанию курсов»), as .backbutton on the old site
   ============================================================ */
.mw-backbutton
{
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .3rem 0;
}

.mw-backbutton .bi
{
    font-size: 1.8rem;
}

/* Product pages (no tab strip above the columns): the sidebar drops to the
   common top edge, and the back-arrow row centers against the sidebar
   card header (3.25rem, .mw-side-col .card-header) — one level with «Рекомендуем» */
.mw-product-row .mw-side-col
{
    /* same offset as on course pages (base .mw-side-col rule): the
       headers land at one vertical position across the whole site */
    margin-top: calc(var(--bs-gutter-y) + 1.4em);
}

.mw-product-row > .col-12.col-xl-9
{
    position: relative;
    padding-top: 22px; /* the gap where the arrow floats, card header lands at 162 like «Рекомендуем» */
}

.mw-product-row .mw-backbutton
{
    /* lifted out of the flow: floats in the gap between the divider and the
       cards, above both card headers, pushing nothing */
    position: absolute;
    top: -1.15rem;
    left: calc(var(--bs-gutter-x, 1.5rem) / 2); /* flush with the card header left edge */
    right: 0;
    margin: 0;
    padding: 0;
}

.mw-product-row .col-12.col-xl-9 > .card > .card-header
{
    display: flex;
    align-items: center;
    height: 3.3rem; /* same header height as «Рекомендуем»/«Партнёры» */
    font-size: 1.25rem; /* 20px — as .ui-widget-header on the original site */
}

/* Course tab strip — accordion mode when the row does not fit (below 992px,
   where equal-stretch tabs would wrap into rows): nothing resizes — all pills
   keep their regular desktop size and sit in ONE horizontally scrollable row
   (wheel/touch, scrollbar hidden). The scroller is the wrapper (.mw-tabs-scroll),
   never the <ul>: the floating badge row above the tabs would be clipped by a
   scroll container, so the wrapper takes the clipping and reserves the badge
   height via padding-top; the equal negative margin keeps the strip exactly
   where it was */
@media (max-width: 991.98px)
{
    .mw-tabs-scroll
    {
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-top: 2.4em;
        margin-top: -2.4em;
    }

    .mw-tabs-scroll::-webkit-scrollbar
    {
        display: none;
    }

    .bs-island .mw-course-tabs
    {
        flex-wrap: nowrap !important; /* overrides Bootstrap .flex-wrap (it is !important) */
    }

    .bs-island .mw-course-tabs .nav-item
    {
        flex: 0 0 auto; /* natural width, never squeezed */
    }
}

/* Sitemap — the h2 catalog-group headers: same legacy orange-italic look as h1,
   one step smaller; extra space between sections (main.css keeps h1 margins tight) */
.mw-sitemap h2
{
    color: orange !important;
    font-weight: normal;
    font-style: italic;
    font-size: 14pt;
    line-height: normal;
    margin: .8rem 0 .2rem;
}

.mw-sitemap h1:not(:first-child)
{
    margin-top: .8rem;
}

/* ============================================================
   Blazor template validation styles (formerly app.css, merged
   into main.css; must stay after bootstrap and the site rules)
   ============================================================ */

h1:focus
{
    outline: none;
}

.valid.modified:not([type=checkbox])
{
    outline: 1px solid #26b050;
}

.invalid
{
    outline: 1px solid #e50000;
}

.validation-message
{
    color: #e50000;
}

.darker-border-checkbox.form-check-input
{
    border-color: #929292;
}

.form-floating > .form-control::placeholder
{
    color: var(--bs-secondary-color);
    text-align: center;
}

/* Admin form cards («Новый товар», «Правка #N»…) — headers like on the product/event
   pages: the same dotted-black bar (.bs-island .card-header), height and type size */
.mw-admin-main .card-header
{
    --mw-header-base: #000;
    --mw-header-dot: #515151;
    display: flex;
    align-items: center;
    height: 3.3rem; /* one event-tab strip (≈53px), like the headers it pairs with */
    font-size: 1.25rem; /* 20px — as .ui-widget-header on the original site */
    background-color: var(--mw-header-base);
    background-image: conic-gradient(var(--mw-header-dot) 90deg, transparent 0deg 180deg, var(--mw-header-dot) 180deg 270deg);
    background-size: 2px 2px;
}

/* light theme: same dots in the light palette (as [data-bs-theme="light"] .bs-island .card-header) */
[data-bs-theme="light"] .mw-admin-main .card-header
{
    --mw-header-base: #ddd;
    --mw-header-dot: #c6c6c6;
}

/* Floating captions in the admin forms sit darker than the typed text (secondary,
   not body) — so an empty field's label is not mistaken for a value; on focus the
   caption returns to the body color, marking the active field */
.mw-admin-main .form-floating > label
{
    color: var(--bs-secondary-color);
    opacity: 1;
}

.mw-admin-main .form-floating > :focus ~ label
{
    color: var(--bs-body-color);
}

/* Buttons-as-links (.btn-link — e.g. «Отправить письмо для подтверждения» on the
   e-mail page) — the same gold and the same hover (glow + underline) as site links */
.btn-link
{
    color: #FFECB3 !important;
    text-decoration: none;
}

.btn-link:hover
{
    color: #ffc862 !important;
    text-decoration: underline;
    text-shadow: #ffc862 0px 0px 10px;
}
