/*
Theme Name: Kadence Child
Template: kadence
Version: 1.0.0
Description: Child theme for Kadence - Apertus LMS
*/

/* =====================
   Typography & Colors
   ===================== */
body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #3B3F41;
}

/* =====================
   Login page
   ===================== */
.login-page-column > .kt-inside-inner-col {
  min-height: calc(100vh - 122px - 16rem);
}

/* =====================
   Box shadow
   ===================== */
.entry.single-entry {
  box-shadow: none !important;
}

/* =====================
   LearnDash content width
   ===================== */
.learndash-wrapper .ld-focus .ld-focus-main .ld-focus-content {
  margin: 0 auto !important;
  max-width: none !important;
  padding: 3em 2em !important;
}

/* =====================
   Tabs
   ===================== */
.learndash-wrapper .wp-block-kadence-tabs .kt-tabs-title-list li.kt-tab-title-active a.kt-tab-title {
  border-bottom: 2px solid #3B3F41 !important;
  box-shadow: none !important;
}

.kt-tabs-layout-vtabs > .kt-tabs-title-list {
  padding-top: 23px !important;
}

/* =====================
   Tables
   ===================== */
.entry-content table {
  border-collapse: collapse;
  width: 100%;
}

.entry-content table th,
.entry-content table td {
  border: 1px solid #D0D1D2 !important;
  padding: 10px 14px;
  text-align: center;
  vertical-align: middle;
}

.entry-content table th {
  font-weight: bold;
  background: none;
  color: #3B3F41;
}

.wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
  background: none;
}

.wp-block-table thead {
  border-bottom: 0 !important;
}

.wp-block-table.is-style-stripes {
  border-bottom: 0 !important;
}

/* =====================
   Gallery
   ===================== */
.wp-block-kadence-advancedgallery.frame-construction-gallery ul {
  justify-content: center;
}

/* =====================
   Modal frame-types
   ===================== */

.htr-modal-content-wrap {
padding: 20px !important;
}

dialog.htr-modal-content {
  min-height: 500px !important;
}

dialog.htr-modal-content .htr-modal-content-wrap {
  max-height: 80vh !important;
  overflow-y: auto !important;
}

dialog.htr-modal-content .htr-modal-content-wrap {
  width: 100% !important;
  overflow-y: auto !important;
  max-height: 80vh !important;
  padding: 40px !important;
}

.kb-gallery-ul {
  justify-content: center;
}

dialog.htr-modal-content .kb-gallery-ul {
  justify-content: center;
}

dialog.htr-modal-content img {
    object-fit: contain !important;
}

button.htr-modal-trigger {
  padding: 6px 26px;
  font-size: initial;
  font-weight: initial;
}

button.htr-modal-trigger:not(:last-of-type) {
  margin-bottom: 9px;
}

.tablepress caption {
  display: none;
}

// Enqueue admin CSS for apt-admin role
add_action('admin_enqueue_scripts', function() {
    $user = wp_get_current_user();
    if (in_array('apertus_tech_administrator', (array)$user->roles)) {
        wp_add_inline_style('wp-admin', '
            #toplevel_page_kadence-starter,
            #menu-posts-ld-coupon,
            #menu-posts-sfwd-transactions,
            #menu-appearance,
            #menu-tools,
            #menu-settings,
            #toplevel_page_members,
            .submenu-ldlms-setup,
            .submenu-ldlms-certificates,
            .submenu-ldlms-groups,
            .submenu-ldlms-exams,
            .submenu-ldlms-help { display: none !important; }
        ');
    }
});