/* LS Training ⇄ OpenCart 4 integration overrides. Loaded LAST so it wins
   over both the WP theme (ls-theme.css) and the old OC theme (oc-custom.css). */

/* ===== OC4 integration fixes (added during LS theme port) =====
   OpenCart 4's default stylesheet turns #container into an absolutely
   positioned, viewport-wide sticky-footer wrapper. Inside the LS chrome
   (#imain is a 960px centered column) that breaks the layout, so restore
   normal flow. */
#container { position: static; width: auto; min-height: 0; margin-bottom: 0; }
#content, #column-left, #column-right { padding-bottom: 0; }
/* OC4 also pins <footer> to the viewport bottom — restore normal flow for the LS footer */
footer#footer { position: static; border: 0; padding-top: 0; bottom: auto; }

/* ===== LS course-grid integration with OC4 (match live lstrainingco.com) ===== */
#column-left .sidebar { width: auto; margin-right: 0; float: none; }
#column-left #question-widget { margin-left: 0; }

.product-grid { width: auto; overflow: hidden; margin-top: 20px; }
.product-grid > div.product-thumb {
  border: 1px solid #dedede; float: left; width: 31%; margin: 0 2% 20px 0;
  padding: 16px 14px 0 14px; box-sizing: border-box;
}
.product-grid .product-thumb .name { min-height: 50px; }
.product-grid .product-thumb .name a { color: #136fc5; line-height: 1.4; text-decoration: none; }
.product-grid .product-thumb .description { display: block; overflow: hidden; font-size: 12px; line-height: 1.4; min-height: 110px; }

/* gray Cost / Add-to-Cart footer bar, like live */
.cost-hrs-cart { background: #f7f7f7; clear: both; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 -14px; padding: 14px; border-top: 1px solid #dedede; }
.cost-hrs-cart .price { margin: 0; font-size: 12px; color: #1e749c; font-weight: 700; }
.cost-hrs-cart .price .title { font-size: 10px !important; color: #777; text-transform: uppercase; font-weight: 700; display: block; padding-bottom: 6px; }
.cost-hrs-cart .cart { margin: 0; flex: none; }
.cost-hrs-cart .cart .button { display: inline-block; width: auto; background: #1e749c; color: #fff; border: 0; border-radius: 4px; padding: 6px 12px; font-size: 11px; font-weight: 700; line-height: 1.4; cursor: pointer; white-space: nowrap; }
.cost-hrs-cart .cart .button:hover { background: #155b7c; }
.pagination-wrap { clear: both; padding-top: 20px; }

/* The old WP/OC theme floats #content with a fixed margin-left (it assumed a
   different sidebar mechanism). In OC4's bootstrap flex row that leaves a huge
   gap and squeezes the grid — restore normal flex-column behaviour. */
#product-category #content, #product-product #content { float: none !important; margin-left: 0 !important; width: auto !important; }

/* OC4 makes .product-thumb .button absolutely positioned (hover-reveal cart strip).
   Our course card reuses the .button class for a normal inline Add-to-Cart button. */
.cost-hrs-cart .cart { display: inline-flex; width: auto; }
.cost-hrs-cart .cart .button { position: static; bottom: auto; width: auto; display: inline-block; }

/* keep 3-up rows aligned even when card heights differ (float wrap glitch) */
.product-grid > div.product-thumb:nth-child(3n+1) { clear: left; }

/* ===== account / form pages styled like live ===== */
/* OC4 ul-breadcrumbs -> live's text breadcrumbs (Home » Account » Login) */
ul.breadcrumb { display: block; margin: 0 0 10px; padding: 0; background: none; }
ul.breadcrumb li { display: inline; padding: 0; margin: 0; list-style: none !important; }
ul.breadcrumb li + li:before { content: " \00bb "; color: #ccc; }
ul.breadcrumb li a { text-decoration: none; }
ul.breadcrumb li:before { content: none; }
/* fieldsets like the old theme's h2 + .content boxes */
#content fieldset { border: 1px solid #eee; background: #fff; padding: 12px; margin-bottom: 20px; }
#content legend { float: none; width: auto; font: 700 16px 'Open Sans', sans-serif; color: #2a2a2a; padding: 0 6px; margin-bottom: 8px; }
/* inputs sized like live (not full-width bootstrap) */
#content form .form-control, #content form .form-select { display: inline-block; width: auto; min-width: 240px; }
#content form textarea.form-control { min-width: 400px; }
/* primary buttons in LS blue */
#content .btn-primary { background-color: #1e749c; border-color: #1e749c; }
#content .btn-primary:hover { background-color: #155b7c; border-color: #155b7c; }
/* neutralise OC4's gray breadcrumb bar -> plain text like live */
.breadcrumb { background: none !important; border: 0 !important; padding: 0 !important; border-radius: 0; box-shadow: none; }
/* normalise .button anchors/inputs (old css height:17px clips text) */
a.button, input.button, button.button { display: inline-block; height: auto !important; padding: 8px 16px !important; color: #fff !important; background: #1e749c; border: 0; border-radius: 4px; line-height: 1.2; text-decoration: none !important; cursor: pointer; font-weight: 700; }
a.button:hover, input.button:hover, button.button:hover { background: #155b7c; }
/* keep the compact card button size in course grids */
.cost-hrs-cart .cart .button { padding: 6px 12px !important; font-size: 11px; }
/* kill OC4's chevron breadcrumb decorations; live uses plain "Home » Account" text */
ul.breadcrumb > li.breadcrumb-item { padding: 0; text-shadow: none; white-space: normal; }
ul.breadcrumb > li.breadcrumb-item:after { display: none !important; }
ul.breadcrumb .breadcrumb-item + .breadcrumb-item::before { content: " \00bb " !important; float: none; padding: 0 6px 0 2px; color: #ccc; }
/* old css paints whole .required rows red+bold; live shows black labels with a red * only */
#content .row.required { color: inherit; font-weight: normal; }
#content .col-form-label { color: #404040; }
/* Subscribe Yes/No radios — keep label + radios on one line, like live */
#content .newsletter-radios { padding-top: 7px; }
#content .newsletter-radios label { display: inline-flex; align-items: center; margin: 0 24px 0 0; font-weight: normal; cursor: pointer; }
#content .newsletter-radios input[type="radio"] { width: auto; margin: 0 6px 0 0; vertical-align: middle; }

/* Right-column "Account" navigation box (matches live my-account sidebar) */
#column-right .box.account-menu { border: 1px solid #e0e0e0; background: #fff; margin-bottom: 20px; }
#column-right .box.account-menu .box-heading { font-weight: 700; color: #2a2a2a; padding: 10px 12px; border-bottom: 1px solid #e0e0e0; background: #f7f7f7; }
#column-right .box.account-menu .box-content { padding: 8px 0; }
#column-right .box.account-menu ul { list-style: none !important; margin: 0 !important; padding: 0 !important; }
#column-right .box.account-menu ul li { list-style: none !important; margin: 0 !important; }
#column-right .box.account-menu ul li a { display: block; padding: 6px 12px; color: #888; text-decoration: none; }
#column-right .box.account-menu ul li a:hover { color: #1e749c; }

/* Course dashboard + home pages — match live: ~240px left sidebar + content fills the rest
   (the legacy float .row/.col grid fights Bootstrap, leaving column-left too wide) */
#account-courses .row, #account-courses-history .row, #common-home .row { display: block; }
#account-courses #column-left, #account-courses-history #column-left, #common-home #column-left {
  float: left; width: 200px; max-width: 200px; margin-right: 30px; padding: 0; flex: none;
}
/* inner .sidebar is pinned to 240px by #main .sidebar — let it follow the column */
#account-courses #column-left .sidebar, #account-courses-history #column-left .sidebar, #common-home #column-left .sidebar {
  width: 100% !important; margin-right: 0 !important;
}
#account-courses #content, #account-courses-history #content, #common-home #content {
  float: none; width: auto !important; max-width: none; overflow: hidden; padding: 20px 40px; flex: none;
}

/* Privacy Policy popup — match live's colorbox look (white box, bold title, scrollable body, grey footer with X at bottom-right) */
#modal-information.ls-policy-modal .modal-content { border: 3px solid #8a8a8a; border-radius: 0; box-shadow: 0 0 0 4px #e0e0e0, 0 0 28px rgba(0,0,0,0.7); }
/* darker overlay behind the popup, like live's colorbox */
.modal-backdrop.show { opacity: 0.8; }
#modal-information.ls-policy-modal .modal-header { border-bottom: 0; padding: 22px 24px 6px; }
#modal-information.ls-policy-modal .modal-title { font: 700 28px 'Open Sans', sans-serif; color: #2a2a2a; }
#modal-information.ls-policy-modal .modal-body { max-height: 460px; overflow-y: auto; padding: 6px 24px 18px; color: #444; line-height: 1.5; }
#modal-information.ls-policy-modal .modal-body p, #modal-information.ls-policy-modal .modal-body div { color: #444; }
#modal-information.ls-policy-modal .modal-footer { background: #ededed; border-top: 1px solid #e0e0e0; padding: 10px 18px; display: flex; justify-content: flex-end; }
#modal-information.ls-policy-modal .ls-modal-close { border: 0; background: none; font-size: 20px; line-height: 1; color: #8a8a8a; cursor: pointer; padding: 2px 6px; }
#modal-information.ls-policy-modal .ls-modal-close:hover { color: #333; }

/* ===== LS course/test system (ported from live) ===== */
.btn.blu { background:#1e749c; color:#fff; font:bold 13px 'Open Sans',sans-serif; padding:10px 13px; margin:6px 0; border-radius:5px; text-decoration:none !important; display:inline-block; }
.btn.blu:hover { background:#155b7c; color:#fff; }
.course-status { background:#f7f7f7; padding:10px; border:1px solid #ddd; margin-bottom:20px; }
.course-status table { width:100%; }
.course-status th { text-transform:uppercase; font-weight:700; font-size:11px; text-align:left; }
.course-status td { color:#1e749c; font-weight:700; font-size:16px; padding:6px 0; }
.course-status .entry-title { font:bold 24px 'Open Sans',sans-serif; color:#2a2a2a; margin:0; }
#course-details { margin:0; padding:0; }
#course-details li { list-style:none; }
/* test page */
/* clear:both matches the old template's inline style block — without it the
   Previous/Next bar rides up between the floated image and question text */
.lstrain-test hr, .lstrain-test .tops { clear:both; }
.lstrain-test .tops { overflow:hidden; }
.lstrain-test .tops a { color:#1c759e; font:bold 14px Arial; }
.lstrain-test .next_link { margin-left:10px; }
.lstrain-test .top_left { float:left; }
.lstrain-test .top_right { float:right; }
.lstrain-test .float_left { float:left; }
.lstrain-test .float_right { float:right; width:600px; }
.lstrain-test .detail, .lstrain-test .question { color:#515151; font:14px Arial,sans-serif; }
.lstrain-test .question { background:#f7f7f7; padding:15px; border:1px solid #ddd; margin-bottom:15px; }
.lstrain-test .question_title { font-weight:bold; margin-bottom:10px; }
.lstrain-test td { padding:5px; }
.lstrain-test .course-complete-banner { background:#eaf7d9; border:1px solid #bbdf8d; padding:15px; margin-bottom:15px; border-radius:5px; }
/* grade page */
#account-grade .fail_pass { color:#44a20b; font:bold 24px Arial,sans-serif; text-align:center; }
#account-grade .score { font:16px Arial,sans-serif; text-align:center; }
#account-grade .question { background:#f7f7f7; padding:25px; border:1px solid #ddd; }
.certificate { position:relative; display:inline-block; width:45px; height:37px; background:url(images/icon_certificate.png) no-repeat left top; margin-top:-20px; padding-left:10px; }
