/*
 * Smart Com visual theme for Forma LMS standard template
 *
 * Installation target:
 *   html/templates/standard/style/custom.css
 *
 * Designed as a non-destructive override layer. It does not replace Forma LMS
 * core styles and can be removed by deleting this file and clearing caches.
 */

:root {
  --smartcom-navy-950: #071b2b;
  --smartcom-navy-900: #0b263b;
  --smartcom-navy-800: #123b56;
  --smartcom-teal-700: #007f86;
  --smartcom-teal-600: #009aa2;
  --smartcom-teal-500: #19aeb4;
  --smartcom-cyan-100: #dff5f6;
  --smartcom-blue-100: #e9f2f7;
  --smartcom-slate-900: #17242d;
  --smartcom-slate-700: #445866;
  --smartcom-slate-500: #70828e;
  --smartcom-slate-300: #c9d4da;
  --smartcom-slate-200: #dde5e9;
  --smartcom-slate-100: #f2f6f8;
  --smartcom-white: #ffffff;
  --smartcom-success: #23865c;
  --smartcom-warning: #b87500;
  --smartcom-danger: #b23a48;

  /* Forma LMS variables used by current standard-template styles. */
  --color-primary: var(--smartcom-teal-700);
  --color-primary-hover: var(--smartcom-teal-600);
  --color-primary-active: var(--smartcom-navy-800);
  --color-secondary: var(--smartcom-navy-900);
  --color-5: var(--smartcom-warning);

  --smartcom-radius-sm: 4px;
  --smartcom-radius-md: 8px;
  --smartcom-radius-lg: 14px;
  --smartcom-shadow-sm: 0 2px 8px rgba(7, 27, 43, 0.08);
  --smartcom-shadow-md: 0 10px 28px rgba(7, 27, 43, 0.12);
}

/* Typography and general surface */
html,
body {
  background: var(--smartcom-slate-100);
  color: var(--smartcom-slate-900);
  font-family: "Nunito Sans", "Segoe UI", Arial, Helvetica, sans-serif;
}

body {
  line-height: 1.55;
}

a {
  color: var(--smartcom-teal-700);
}

a:hover,
a:focus {
  color: var(--smartcom-navy-800);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--smartcom-navy-900);
  font-weight: 700;
  letter-spacing: -0.012em;
}

::selection {
  color: var(--smartcom-white);
  background: var(--smartcom-teal-700);
}

/* Accessible keyboard focus */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus,
[tabindex]:focus {
  outline: 3px solid rgba(25, 174, 180, 0.38) !important;
  outline-offset: 2px;
}

/* Header and corporate wordmark */
.layout_header {
  min-height: 82px;
  padding: 12px 24px;
  border-bottom: 4px solid var(--smartcom-teal-600);
  background:
    linear-gradient(110deg, var(--smartcom-navy-950) 0%, var(--smartcom-navy-900) 62%, var(--smartcom-navy-800) 100%);
  box-shadow: var(--smartcom-shadow-sm);
}

.layout_header .left_logo {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
}

.layout_header .left_logo img {
  max-height: 52px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

/*
 * Optional CSS wordmark. Add class "smartcom-brand" to any header element if
 * your installation does not use an uploaded logo.
 */
.smartcom-brand {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  gap: 13px;
  color: var(--smartcom-white) !important;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.035em;
  text-decoration: none !important;
}

.smartcom-brand::before {
  width: 42px;
  height: 42px;
  content: "";
  border-radius: 50%;
  background:
    linear-gradient(135deg, transparent 42%, var(--smartcom-white) 43% 53%, transparent 54%),
    linear-gradient(45deg, var(--smartcom-teal-500) 0 48%, var(--smartcom-white) 49% 55%, var(--smartcom-teal-500) 56%);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.28);
}

/* Main navigation */
.navbar,
.navbar-inverse,
.layout_menu_over,
#main_menu,
#main-menu {
  border-color: transparent;
  background-color: var(--smartcom-navy-900);
}

.navbar-inverse .navbar-nav > li > a,
.navbar-inverse .navbar-brand,
#main_menu a,
#main-menu a {
  color: rgba(255, 255, 255, 0.9);
}

.navbar-inverse .navbar-nav > li > a:hover,
.navbar-inverse .navbar-nav > li > a:focus,
.navbar-inverse .navbar-nav > .active > a,
.navbar-inverse .navbar-nav > .active > a:hover,
.navbar-inverse .navbar-nav > .active > a:focus,
#main_menu a:hover,
#main-menu a:hover {
  color: var(--smartcom-white);
  background: var(--smartcom-teal-700);
}

.navbar-toggle {
  border-color: rgba(255,255,255,.4) !important;
}

.navbar-toggle:hover,
.navbar-toggle:focus {
  background: var(--smartcom-teal-700) !important;
}

/* Page layout */
#lms_main_container,
.layout_colum_container,
#middlearea,
.std_block,
.container-fluid {
  background-color: transparent;
}

#lms_main_container {
  padding-top: 1.5rem;
  padding-bottom: 2rem;
}

.std_block,
.box,
.panel,
.dashboard-card,
.card {
  border: 1px solid var(--smartcom-slate-200);
  border-radius: var(--smartcom-radius-md);
  background: var(--smartcom-white);
  box-shadow: var(--smartcom-shadow-sm);
}

.std_block {
  padding: 1.25rem !important;
}

/* Titles and section headers */
.page-header,
.title,
.title_block,
.section_title,
p.section_title {
  border-bottom-color: var(--smartcom-teal-600) !important;
}

.page-header h1,
.title h1,
.title_block h1,
.title_block h2 {
  color: var(--smartcom-navy-900);
}

p.section_title {
  padding: .55rem .75rem;
  border-left: 4px solid var(--smartcom-teal-600);
  border-bottom: 0 !important;
  border-radius: 0 var(--smartcom-radius-sm) var(--smartcom-radius-sm) 0;
  background: var(--smartcom-blue-100);
}

/* Buttons */
.btn,
.button,
input[type="submit"],
input[type="button"],
button {
  border-radius: var(--smartcom-radius-sm);
  font-weight: 700;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.btn-primary,
.button-primary,
input[type="submit"],
input[type="button"].primary,
button.primary,
.subscribed {
  border-color: var(--smartcom-teal-700) !important;
  background: var(--smartcom-teal-700) !important;
  color: var(--smartcom-white) !important;
}

.btn-primary:hover,
.btn-primary:focus,
.button-primary:hover,
.button-primary:focus,
input[type="submit"]:hover,
input[type="submit"]:focus,
button.primary:hover,
button.primary:focus {
  border-color: var(--smartcom-navy-800) !important;
  background: var(--smartcom-navy-800) !important;
  box-shadow: 0 4px 12px rgba(0, 127, 134, .22);
}

.btn-default,
.button-secondary {
  border-color: var(--smartcom-slate-300);
  background: var(--smartcom-white);
  color: var(--smartcom-navy-900);
}

.btn-default:hover,
.btn-default:focus,
.button-secondary:hover,
.button-secondary:focus {
  border-color: var(--smartcom-teal-700);
  background: var(--smartcom-cyan-100);
  color: var(--smartcom-navy-900);
}

.btn-danger,
.button-danger {
  border-color: var(--smartcom-danger) !important;
  background: var(--smartcom-danger) !important;
}

/* Forms */
.form-control,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="search"],
select,
textarea {
  min-height: 38px;
  border: 1px solid var(--smartcom-slate-300);
  border-radius: var(--smartcom-radius-sm);
  background: var(--smartcom-white);
  color: var(--smartcom-slate-900);
  box-shadow: inset 0 1px 2px rgba(7, 27, 43, .04);
}

.form-control:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: var(--smartcom-teal-600) !important;
  box-shadow: 0 0 0 3px rgba(25, 174, 180, .16) !important;
}

label,
.form-label {
  color: var(--smartcom-navy-900);
  font-weight: 700;
}

/* Tables and YUI data tables */
table,
.table,
.yui-dt table {
  border-color: var(--smartcom-slate-200);
  background: var(--smartcom-white);
}

.table > thead > tr > th,
.yui-dt thead th,
th {
  border-color: var(--smartcom-slate-300) !important;
  background: var(--smartcom-navy-900) !important;
  color: var(--smartcom-white) !important;
  font-weight: 700;
}

.table-striped > tbody > tr:nth-of-type(odd),
.yui-dt tr.yui-dt-odd {
  background: var(--smartcom-slate-100);
}

.table-hover > tbody > tr:hover,
.yui-dt tbody tr:hover {
  background: var(--smartcom-cyan-100);
}

/* Course cards and catalogue */
.edition_container,
.dash-course {
  margin: .8rem 0;
  padding: 1rem;
  border: 1px solid var(--smartcom-slate-200);
  border-left: 5px solid var(--smartcom-teal-600);
  border-radius: var(--smartcom-radius-md);
  background: var(--smartcom-white);
  box-shadow: var(--smartcom-shadow-sm);
}

.dash-course img.clogo {
  border-color: var(--smartcom-slate-200);
  border-radius: var(--smartcom-radius-sm);
  background: var(--smartcom-white);
}

.dash-course h2,
.dash-course h2 a,
.edition_container h2,
.edition_container h2 a {
  color: var(--smartcom-navy-900) !important;
}

.dash-course h2 a:hover,
.edition_container h2 a:hover {
  color: var(--smartcom-teal-700) !important;
}

.edition_container .edition_subscribe,
.catalog_action {
  border-radius: var(--smartcom-radius-sm);
  background: var(--smartcom-slate-100);
}

.can_subscribe,
.edition_container .edition_subscribe a p {
  background: var(--smartcom-success) !important;
}

div.label_container {
  border-color: var(--smartcom-teal-600);
  border-radius: var(--smartcom-radius-md);
  background: var(--smartcom-white);
  box-shadow: var(--smartcom-shadow-sm);
}

span.label_description {
  border-top-color: var(--smartcom-teal-600);
}

/* Tabs */
.nav-tabs,
.yui-nav {
  border-bottom-color: var(--smartcom-teal-600) !important;
}

.nav-tabs > li > a,
.yui-nav li a {
  border-radius: var(--smartcom-radius-sm) var(--smartcom-radius-sm) 0 0;
  color: var(--smartcom-slate-700);
}

.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus,
.yui-nav li.selected a {
  border-color: var(--smartcom-teal-600) var(--smartcom-teal-600) transparent !important;
  background: var(--smartcom-white) !important;
  color: var(--smartcom-teal-700) !important;
  font-weight: 700;
}

/* Alerts */
.alert,
.notice,
.feedback {
  border-radius: var(--smartcom-radius-md);
}

.alert-info,
.notice-info {
  border-color: var(--smartcom-teal-500);
  background: var(--smartcom-cyan-100);
  color: var(--smartcom-navy-900);
}

.alert-success {
  border-color: var(--smartcom-success);
}

.alert-warning {
  border-color: var(--smartcom-warning);
}

.alert-danger,
.alert-error {
  border-color: var(--smartcom-danger);
}

/* Progress */
.progress {
  border-radius: 999px;
  background: var(--smartcom-slate-200);
  box-shadow: none;
}

.progress-bar {
  background: linear-gradient(90deg, var(--smartcom-teal-700), var(--smartcom-teal-500));
}

/* Modal and dropdown layers */
.modal-content,
.ui-dialog,
.yui-panel,
.dropdown-menu {
  border: 1px solid var(--smartcom-slate-200) !important;
  border-radius: var(--smartcom-radius-md) !important;
  box-shadow: var(--smartcom-shadow-md) !important;
}

.modal-header,
.ui-dialog-titlebar,
.yui-panel .hd {
  border-bottom: 3px solid var(--smartcom-teal-600) !important;
  background: var(--smartcom-navy-900) !important;
  color: var(--smartcom-white) !important;
}

.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus {
  background: var(--smartcom-cyan-100);
  color: var(--smartcom-navy-900);
}

/* Footer: retain mandatory Forma LMS credit */
.layout_footer,
.layout_footer_menu {
  background: var(--smartcom-navy-950);
  color: rgba(255,255,255,.74);
}

.layout_footer {
  min-height: 42px;
  height: auto;
  padding: 9px 0;
  border-top: 3px solid var(--smartcom-teal-600);
}

.layout_footer a,
.layout_footer .copyright,
.layout_footer .ownedby {
  color: rgba(255,255,255,.82);
}

.layout_footer a:hover,
.layout_footer a:focus {
  color: var(--smartcom-white);
}

/* Login surfaces */
.login-box,
.login-container,
#login-box,
#login_container {
  border: 1px solid var(--smartcom-slate-200);
  border-top: 5px solid var(--smartcom-teal-600);
  border-radius: var(--smartcom-radius-lg);
  background: var(--smartcom-white);
  box-shadow: var(--smartcom-shadow-md);
}

/* Administration */
.lms_management .area {
  border: 1px solid var(--smartcom-slate-300);
  border-radius: var(--smartcom-radius-md);
  background: var(--smartcom-slate-100);
}

.lms_management .area .area_block {
  border-color: var(--smartcom-slate-200);
  border-radius: var(--smartcom-radius-sm);
  background: var(--smartcom-white);
}

/* Responsive adjustments */
@media (max-width: 767px) {
  .layout_header {
    min-height: 66px;
    padding: 8px 14px;
  }

  .layout_header .left_logo img {
    max-height: 42px;
  }

  .std_block {
    padding: .85rem !important;
  }

  .edition_container,
  .dash-course {
    padding: .8rem;
  }
}

/* Print remains neutral */
@media print {
  body {
    background: #fff;
    color: #000;
  }

  .layout_header,
  .layout_footer {
    box-shadow: none;
  }
}
