/* Bim_Training frontend styles — palette matches bimmodeller.com (blue primary, orange accent) */

:root {
    --bimt-blue: #1D4ED8;
    --bimt-blue-dark: #1E3A8A;
    --bimt-orange: #F97316;
    --bimt-orange-dark: #EA580C;
    --bimt-ink: #111827;
    --bimt-muted: #6B7280;
    --bimt-bg: #F5F7FB;
    --bimt-border: #E5E7EB;
}

.bimt-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px 64px;
}

/* ---------- Hero / search ---------- */

.bimt-hero {
    text-align: center;
    padding: 40px 16px 28px;
}

.bimt-hero__eyebrow {
    display: inline-block;
    color: var(--bimt-blue);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: .08em;
    margin-bottom: 10px;
}

.bimt-hero__title {
    font-size: 34px;
    font-weight: 800;
    color: var(--bimt-ink);
    margin: 0 0 8px;
}

.bimt-hero__subtitle {
    color: var(--bimt-muted);
    margin: 0 0 24px;
    font-size: 15px;
}

.bimt-search {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 70%;
    margin: 0 auto;
    border: 1px solid var(--bimt-border);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 6px 20px rgba(17, 24, 39, .08);
    transition: box-shadow .15s ease, border-color .15s ease;
}

.bimt-search:focus-within {
    border-color: var(--bimt-blue);
    box-shadow: 0 8px 24px rgba(29, 78, 216, .14);
}

.bimt-search__icon {
    position: absolute;
    left: 20px;
    color: var(--bimt-muted);
    pointer-events: none;
}

.bimt-search input[type="text"] {
    flex: 1;
    border: none;
    padding: 25px 25px 25px 52px;
    font-size: 15px;
    outline: none;
    background: transparent;
}

.bimt-search button {
    border: none;
    background: var(--bimt-blue);
    color: #fff;
    padding: 0 26px;
    align-self: stretch;
    font-weight: 700;
    font-size: 14px;
    border-radius: 10px;
    margin: 5px 5px 5px 0;
    cursor: pointer;
    transition: background .15s ease, transform .1s ease;
}

.bimt-search button:hover {
    background: var(--bimt-blue-dark);
}

.bimt-search button:active {
    transform: scale(.97);
}

/* ---------- Category tabs ---------- */

.bimt-tabs-wrap {
    margin: 0 0 32px;
}

.bimt-tabs {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 4px 4px 10px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.bimt-tabs::-webkit-scrollbar {
    display: none;
}

.bimt-tab {
    display: inline-block;
    flex: 0 0 auto;
    padding: 10px 20px;
    border-radius: 999px;
    border: 1px solid var(--bimt-border);
    background: #fff;
    color: var(--bimt-ink);
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: all .15s ease;
}

.bimt-tab:hover {
    border-color: var(--bimt-blue);
    color: var(--bimt-blue);
    transform: translateY(-1px);
}

.bimt-tab.is-active {
    background: var(--bimt-blue);
    border-color: var(--bimt-blue);
    color: #fff;
    box-shadow: 0 6px 16px rgba(29, 78, 216, .28);
}

/* ---------- Card grid (listing) ---------- */

.bimt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.bimt-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--bimt-border);
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform .15s ease, box-shadow .15s ease;
}

.bimt-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(17, 24, 39, .08);
}

.bimt-card__media {
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--bimt-blue) 0%, var(--bimt-blue-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.bimt-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bimt-card__media-fallback span {
    color: #fff;
    font-size: 40px;
    font-weight: 800;
    opacity: .85;
}

.bimt-card__body {
    padding: 16px 18px 8px;
    flex: 1;
}

.bimt-card__headline {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 8px;
}

.bimt-card__badge {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--bimt-blue) 0%, var(--bimt-blue-dark) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 15px;
}

.bimt-card__title {
    font-size: 16.5px;
    font-weight: 800;
    color: var(--bimt-ink);
    margin: 0;
    line-height: 1.3;
}

.bimt-card__desc {
    font-size: 13.5px;
    color: var(--bimt-muted);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bimt-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px 16px;
}

.bimt-card__price {
    font-weight: 800;
    color: var(--bimt-blue);
}

.bimt-card__cta {
    font-size: 12px;
    font-weight: 700;
    color: var(--bimt-orange);
}

.bimt-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--bimt-muted);
    padding: 40px 0;
}

.bimt-loadmore-wrap {
    text-align: center;
    margin-top: 32px;
}

/* ---------- Buttons ---------- */

.bimt-btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.bimt-btn--primary {
    background: var(--bimt-orange);
    color: #fff;
}

.bimt-btn--primary:hover {
    background: var(--bimt-orange-dark);
}

.bimt-btn--primary:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.bimt-btn--outline {
    background: #fff;
    color: var(--bimt-blue);
    border-color: var(--bimt-blue);
}

.bimt-btn--outline:hover {
    background: var(--bimt-blue);
    color: #fff;
}

.bimt-btn--block {
    display: block;
    width: 100%;
}

/* ---------- Banners ---------- */

.bimt-wrap {
    max-width: 900px;
    margin: 0 auto 16px;
    padding: 0 16px;
}

.bimt-banner {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 14px;
}

.bimt-banner--success {
    background: green;
    color: white;
    border: 1px solid #A7F3D0;
    margin-top: 20px;
    text-align: center;
}

.bimt-banner--error {
    background: #FF0000;
    color: white;
    border: 1px solid #A7F3D0;
    margin-top: 20px;
    text-align: center;
}

/* ---------- Detail page ---------- */

/* Full-width by design: training pages are often complete marketing landing
   pages (their own hero, sections, multiple CTAs) authored entirely by the
   admin via Header HTML / Content HTML. We do not constrain or box them —
   each admin page manages its own inner max-width/centering (e.g. via a
   `.rft-wrap` style container inside their own markup). */
.bimt-header-html,
.bimt-content-html {
    width: 100%;
    margin: 0;
    padding: 0;
}

.bimt-content-html img {
    max-width: 100%;
    height: auto;
}

/* Slim sticky "Pay Now" fallback bar. Hidden until the user scrolls, and hidden
   again near the very bottom of the page — never overlaps meaningful content,
   only ever sits in the empty strip below the viewport's last content line. */
.bimt-sticky-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: #fff;
    border-top: 1px solid var(--bimt-border);
    box-shadow: 0 -8px 24px rgba(17, 24, 39, .08);
    padding: 12px 20px;
    transform: translateY(100%);
    transition: transform .2s ease;
}

.bimt-sticky-bar.is-visible {
    transform: translateY(0);
}

.bimt-sticky-bar__price {
    font-weight: 800;
    color: var(--bimt-blue);
    font-size: 16px;
}

.bimt-sticky-bar .bimt-btn {
    padding: 10px 22px;
    font-size: 13px;
}

@media (max-width: 480px) {
    .bimt-sticky-bar {
        flex-direction: column;
        gap: 8px;
        padding: 10px 16px;
    }
}

/* ---------- Pre-payment profile popup ----------
   Deliberately self-contained (no dependency on the theme's .field/.label/.control
   classes) — this site has aggressive global CSS overrides on native form markup,
   which is what caused labels to disappear when this reused theme classes. */

.bimt-profile-form {
    font-family: inherit;
    padding: 4px 2px 2px;
}

.bimt-profile-intro {
    font-size: 14px;
    color: var(--bimt-muted);
    margin: 0 0 20px;
}

.bimt-profile-field {
    margin-bottom: 16px;
    flex: 1;
    min-width: 0;
}

.bimt-profile-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.bimt-profile-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--bimt-ink);
    margin: 0 0 6px;
}

.bimt-profile-required {
    color: var(--bimt-orange);
}

.bimt-profile-input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 7px 14px;
    font-size: 14px;
    font-family: inherit;
    color: var(--bimt-ink);
    background: #fff;
    border: 1px solid var(--bimt-border);
    border-radius: 8px;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.bimt-profile-input:focus {
    border-color: var(--bimt-blue);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, .12);
}

.bimt-profile-actions {
    margin-top: 8px;
}

@media (max-width: 600px) {
    .bimt-profile-row {
        flex-direction: column;
        gap: 0;
    }
}

/* Reclaims the modal card's own box styling — this site's global CSS strips
   max-width/padding/shadow off generic containers (same pattern seen on the
   landing page CSS), so these are pinned explicitly via modalClass rather than
   trusting Magento_Ui's default modal-popup styles to survive untouched. */
.bimt-profile-modal-popup .modal-inner-wrap {
    max-width: 640px !important;
    width: 92% !important;
    border-radius: 14px !important;
    box-shadow: 0 30px 80px rgba(17, 24, 39, .35) !important;
    background: #fff !important;
}

.bimt-profile-modal-popup .modal-content {
    padding: 28px 30px !important;
}

.bimt-profile-modal-popup .modal-header {
    padding: 24px 30px 0 !important;
}

.bimt-profile-modal-popup .modal-title {
    font-weight: 800 !important;
    color: var(--bimt-ink) !important;
}
