/******************************************************************************
 * Cascading-Style-Sheets file for Admidio
 *
 * @copyright The Admidio Team
 * @see https://www.admidio.org/
 * @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License v2.0 only
 *
 * Here you can edit the look and feel of Admidio
 *
 *****************************************************************************/

:root {
    --admidio-header-font-color: #ffffff;
    --admidio-header-link-color: #263340;
    --admidio-header-link-color-hover: #000000;
    --admidio-menu-bg-color-hover: #3d5266;
    --admidio-menu-font-color-hover: #ffffff;
    --admidio-clamp-text-lines: 0;
    --bs-primary: #349aaa;
    --bs-primary-rgb: 52, 154, 170;
    --bs-secondary: #263340;
    --bs-secondary-rgb: 38, 51, 64;
    --bs-tertiary: #e9ecef;
    --bs-tertiary-rgb: 233, 236, 269;
    --bs-success: #04e01a;
    --bs-body-color: #263340;
    --bs-body-bg: #ffffff;
    --bs-link-color: var(--bs-primary);
    --bs-link-color-rgb: var(--bs-primary-rgb);
    --bs-link-hover-color: color-mix(in srgb, var(--bs-link-color) 80%, white);
    --bs-link-hover-color-rgb: color-mix(in srgb, rgb(var(--bs-link-color-rgb)) 80%, white);
    --bs-focus-ring-color: #c4e9ef;
}

#adm_main_navbar {
    color: var(--admidio-header-font-color);
    background-color: var(--bs-primary);
    min-height: 4rem;
    position: sticky;
    padding-bottom: 0;
    font-weight: bold;
    font-size: 1.7rem;
    padding-top: 0;
}

#adm_main_navbar .navbar-brand img {
    margin-right: 1rem;
}

#adm_navbar_nav a, #adm_main_navbar .dropdown-toggle {
    color: var(--admidio-header-link-color);
    font-size: 1rem
}

#adm_navbar_nav a:hover, #adm_main_navbar .dropdown-toggle {
    color: var(--admidio-header-link-color-hover);
}

@media (max-width: 767px)
{
    /* navbar should not be fixed at top if in mobile view */
    #adm_main_navbar.fixed-top
    {
        position: relative;
        top: auto;
    }
}

#adm_dropdown_user_photo .dropdown-menu {
    padding: 1rem;
    width: 250px;
}

.admidio-content-col {
    padding: 0;
}

.admidio-content, .admidio-reduced {
    order: 1;
    padding-left: 1rem;
    padding-right: 1rem;
    max-width: 1000px;
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
    word-break: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.admidio-max-content {
    max-width: none;
}

/***********************************/
/* Sidebar Navigation */
/***********************************/
.admidio-sidebar {
    padding: 0;
    background-color: var(--bs-secondary);
    overflow-y: auto;
}

.admidio-module-headline {
    margin-top: 1rem;
}

.admidio-headline-mobile-menu {
    width: 100%;
    font-size: 1.1rem;
    color: var(--bs-secondary);
    letter-spacing: 2px;
}

.admidio-headline-mobile-menu .btn {
    padding: 0;
}

.admidio-menu-list {
    overflow-y: auto;
}

.admidio-menu-list a {
    color: var(--bs-tertiary);
}

.admidio-menu-list a:hover {
    color: var(--admidio-menu-font-color-hover);
    background-color: var(--admidio-menu-bg-color-hover);
}

@media (min-width: 768px)
{
    /* sidebar should only be there in non mobile view */
    .admidio-sidebar {
        position: sticky;
        top: 4rem;
        z-index: 1000;
        height: calc(100vh - 4rem);
    }

    .admidio-menu-list {
        display: block !important;
    }
}

.admidio-menu-header {
    font-weight: bold;
    text-transform: uppercase;
    padding: 0.5rem 1rem;
    margin: 0;
    color: rgba(222, 222, 222, 0.65);
}

/***********************************/
/* page function menu */
/***********************************/

.admidio-menu-function-node .nav-link {
    margin-right: 1.5rem;
    margin-top: 1rem;
    background-color: var(--bs-link-color);
}

@media (max-width: 767px) {
    .admidio-menu-function-node .nav-link {
        width: 150px;
        margin-right: 1rem;
    }
}

/***********************************/
/* Default tags */
/***********************************/

a {
    text-decoration: none;
}

.btn, .btn:hover {
    color: var(--bs-body-bg);
    overflow-wrap: normal;
    word-wrap: normal;
    word-break: normal;
    hyphens: none;
}

.btn-primary {
    background-color: var(--bs-link-color);
    border-color: var(--bs-link-color);
}

.dropdown-toggle {
    white-space: normal;
}

.btn-primary:hover {
    background-color: var(--bs-link-hover-color);
    border-color: var(--bs-link-hover-color);
}

.btn-primary.disabled, .btn-primary:disabled {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.btn-outline-primary, .btn-outline-primary:hover {
    color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
}

.btn-check:checked + .btn {
    color: var(--bs-body-bg) !important;
    background-color: var(--bs-secondary);
    border-color: var(--bs-secondary) !important;
}

/* default distance between elements */
.admidio-blog, .admidio-field-group, .pagination,
.admidio-info-created-edited, .admidio-img-presenter,
.navbar-filter, .table-responsive, .admidio-menu-function-node,
.dt-container, .admidio-margin-bottom, .admidio-content-header,
.admidio-content-subheader, .tab-content {
    margin-bottom: 2rem;
}

.admidio-tabbed-field-group, .admidio-accordion-field-group {
    margin-bottom: 1rem;
}

.admidio-tabbed-field-group:has( > .list-group), .admidio-accordion-field-group:has( > .list-group),
.admidio-tabbed-field-group .table-responsive, .admidio-accordion-field-group .table-responsive,
.admidio-tabbed-field-group .table-responsive .dt-container, .admidio-accordion-field-group .table-responsive .dt-container {
    margin-bottom: 0;
}

/* add 5px distance to all icons within a icon text combination */
.admidio-icon-chain, .nav-link .bi, .btn .bi, .alert .bi,
.admidio-profile-user-right .bi, .checkbox .bi, input[type="radio"],
.accordion .bi, .form-control-static > .bi, .icon-link .bi  {
    margin-right: 0.5rem;
}

.admidio-icon {
    padding: 3px;
}

.icon-link .bi {
    height: initial;
}

.admidio-icon-link {
    padding: 3px;
    cursor: pointer;
}

.admidio-icon-link:hover {
    padding: 3px;
    border-radius: 50%;
    background-color: var(--bs-tertiary);
    filter: brightness(92%);
}

.alert-info {
    background-color: color-mix(in srgb, var(--bs-primary) 40%, white);
    border-color: color-mix(in srgb, var(--bs-primary) 70%, white);
}

/* show vertical btn group in mobile view */
@media (max-width: 500px)
{
    .btn-group {
        display: block;
    }

    .btn-group .btn {
        display: block;
        float: none;
        width: 100%;
    }
}

/***********************************/
/* Mark mandatory fields */
/***********************************/
.admidio-form-group-required .col-form-label:after,
.admidio-form-group-required .form-label:after,
.admidio-form-group-required > .form-check-label:after,
.admidio-form-required-notice span:after {
    font-family: "bootstrap-icons", serif;
    font-size: 6pt;
    content: "\F287";
    color: #d91515;
    white-space: nowrap;
    vertical-align: super;
    margin-left: 3px;
}

.admidio-form-required-notice {
    font-size: 9pt;
    margin: 0.5rem 0;
    text-align: right;
    width: 100%;
    display: inline-block;
    max-width: 1000px;
}

/***********************************/
/* Forms */
/***********************************/

.form-control:focus, .form-select:focus, button:focus,
.select2-container--bootstrap-5.select2-container--focus .select2-selection {
    border-color: var(--bs-link-hover-color);
}

.form-switch .form-check-input, .form-check-inline input:checked {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);

}

input[type=date], input[type=number] {
    max-width: 180px;
}

input[type=time] {
    max-width: 100px;
}

.form-switch .form-check-input:not(:checked) {
    background-color: white !important;
    border-color: #999999 !important;
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba(125,125,125,1.0)'/></svg>");
}

.btn-primary:focus {
    background-color: var(--bs-link-color) !important;
    border-color: var(--bs-link-color) !important;;
}

label {
    font-weight: bold;
}

.form-separator-line {
    border-top: 2px solid;
    margin-bottom: 0;
}

.form-separator-line + label {
    font-size: 1.25em;
}

@media (min-width: 768px) {
    .form-control-small {
        width: 50%;
    }
}

.form-control-static {
    margin-bottom: 0;
}

.ck-editor__editable_inline {
    min-height: 300px;
}

@media (min-width: 768px) {
    .admidio-form-membership-period .admidio-form-group {
            word-wrap: normal !important;
            word-break: normal !important;
            padding: 0 !important;
            margin: 0 !important;
    }
}

/***********************************/
/* Cards */
/***********************************/

.admidio-blog, .admidio-field-group, .admidio-tabbed-field-group, .admidio-accordion-field-group, .admidio-blog .card-header, .admidio-blog .card-body,
.admidio-blog .card-footer, .admidio-field-group .card-header, .admidio-field-group .card-body,
.admidio-field-group .card-footer, .admidio-tabbed-field-group .card-header, .admidio-tabbed-field-group .card-body,
.admidio-tabbed-field-group .card-footer, .admidio-accordion-field-group .card-header, .admidio-accordion-field-group .card-body,
.admidio-accordion-field-group .card-footer {
    border: none;
    background-color: var(--bs-tertiary);
}

.card-header {
    font-weight: bold;
    font-size: 150%;
}

.card-header .bi {
    margin-right: 0.5rem;
}

.card-header .float-end .bi {
    margin-right: 0;
}

.admidio-blog .card-footer {
    font-size: 80%;
}

.admidio-field-group .list-group-item {
    border: none;
    background-color: var(--bs-tertiary);
    padding: 0 0 1rem 0;
}

.admidio-field-group .list-group-item .list-group-item {
    padding: 0;
}

.admidio-tabs {
    flex-wrap: nowrap;     /* never wrap */
    width: 100%;
}

.admidio-tabs .nav-item, .admidio-tabs .nav-link {
    display: flex;
}

.admidio-tabs .nav-link {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    max-width: 250px;
}

.admidio-tabs .dropdown-toggle {
    white-space: normal;
    text-align: center;
    align-content: center;
}

.admidio-tabbed-field-group .card-body, .admidio-accordion-field-group .card-body {
    border-radius: var(--bs-card-inner-border-radius);
}

.admidio-tabbed-field-group .card-body .list-group-item, .admidio-accordion-field-group .card-body .list-group-item {
    background-color: var(--bs-tertiary);
}

.admidio-tabbed-field-group .list-group-item, .admidio-accordion-field-group .list-group-item {
    border: none;
    padding: 0 0 1rem 0;
}

.admidio-tabbed-field-group .button, .admidio-accordion-field-group .button {
    padding: 0.5rem 0.5rem 0.5rem 0.5rem;
}

.admidio-tabbed-field-group .list-group-item .list-group-item, .admidio-accordion-field-group .list-group-item .list-group-item {
    padding: 0;
}

.card .admidio-info-created-edited {
    margin-bottom: 0;
    margin-top: 0;
}

.card-footer .admidio-info-created-edited {
    font-size: 100% !important;
}

.admidio-blog-comment .card-header, .admidio-blog-comment .card-body, .admidio-blog-comment .card-footer {
    background-color: var(--bs-tertiary);
}

.admidio-blog-comment .card-header {
    font-size: 120%;
    padding-bottom: 0;
}

.admidio-blog-comment {
    margin-bottom: 1rem;
}

.admidio-blog .card-body > .btn {
    margin-top: 1rem;
    display: block;
    text-align: left;
}

.admidio-card {
    border: none;
    background-color: var(--bs-tertiary);
    margin: 1rem 0;
    height: 95%;
}

.admidio-blog img, .admidio-card img {
    max-width: 100%;
    height: auto;
}

.admidio-card li {
    padding-left: 0;
    padding-right: 0;
    background-color: var(--bs-tertiary);
}

/***********************************/
/* Tabs */
/***********************************/

.tab-content {
    padding: 1rem 1rem 0 1rem;
}

.tab-content:has( > .tab-pane > .accordion) {
    padding: unset;
}

/***********************************/
/* Accordion */
/***********************************/

.accordion {
    --bs-accordion-bg: var(--bs-body-bg);
    --bs-accordion-btn-color: var(--bs-link-color);
    --bs-accordion-active-color: var(--bs-tertiary);
    --bs-accordion-active-bg: var(--bs-secondary);
}

.accordion-button::after {
    background-image: none !important;
    background-color: var(--bs-accordion-btn-color);
    mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='black'><path fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/></svg>") no-repeat center;
}

.accordion-button:not(.collapsed)::after {
    background-color: var(--bs-accordion-active-color);
}

.accordion-body {
    padding: 1rem 1rem 0 1rem;
}

.accordion-button {
    font-size: 1.3rem;
}

.accordion-button:focus {
    box-shadow: none;
}

.tab-content .accordion .accordion-item:first-child {
    border-top: unset;
}

.tab-content .accordion .accordion-item:last-child {
    border-bottom: unset;
}

.tab-content .accordion .accordion-item {
    border-left: unset;
    border-right: unset;
}

.tab-content .accordion .accordion-item:first-of-type > .accordion-header .accordion-button {
    border-radius: unset;
}


/***********************************/
/* Navbar */
/***********************************/

.navbar {
    --bs-navbar-padding-x: 1rem;
}

.navbar-filter {
    background-color: var(--bs-tertiary);
}

.nav-tabs {
    margin-bottom: 0;
}

.nav-tabs .nav-link {
    background-color: var(--bs-tertiary);
    border-color: var(--bs-nav-tabs-border-color);
    font-weight: bold;
}

.navbar .admidio-form-group {
    margin-right: 0.5rem;
}

/***********************************/
/* Tables */
/***********************************/

.table td, .table th {
    color: var(--bs-secondary);
}

.table-hover tbody tr td .admidio-functions {
    visibility: hidden;
}

.table-hover tbody tr:hover td .admidio-functions {
    visibility: visible;
}

/***********************************/
/* Various settings */
/***********************************/

.admidio-opacity-reduced {
    opacity: 0.4;
}

.list-unstyled li {
    padding-top: 0.5rem;
}

.admidio-info-created {
    display: block;
}

.admidio-info-created-edited {
    font-size: 80%;
}

.dropdown-item {
    color: var(--bs-secondary);
    background: var(--bs-body-bg);
}

.popover {
    --bs-popover-bg: var(--bs-body-bg);
    --bs-popover-header-bg: var(--bs-tertiary);
}

.tooltip {
    --bs-tooltip-bg: var(--bs-secondary);
}

.breadcrumb {
    --bs-breadcrumb-bg: var(--bs-tertiary);
    --bs-breadcrumb-padding-y: 0.75rem;
    --bs-breadcrumb-padding-x: 1rem;
}

.breadcrumb-item {
    display: block;
}

.badge {
    --bs-badge-padding-y: .25em;
    --bs-badge-padding-x: .5em;
    margin-left: 0.5rem;
}

.page-item.active .page-link {
    background-color: var(--bs-secondary);
    border-color: var(--bs-secondary);
}

#adm_imprint {
    margin-bottom: 2rem;
    font-size: 80%;
    overflow-wrap: normal;
    word-wrap: normal;
    word-break: normal;
    hyphens: none;
}

.admidio-info-icon {
    color: #4496dd;
    cursor: pointer;
    margin-left: 0.5rem;
}

#adm_profile_photo, #adm_inventory_item_picture {
    max-width: 300px;
    width: 100% !important;
    object-fit: cover !important;
}

.admidio-profile-user-right {
    cursor: help;
}

.admidio-event-highlight .card-header {
    background-color: var(--bs-secondary);
    color: var(--bs-tertiary);
}

tr.admidio-event-highlight {
    font-weight: bold;
}

.admidio-event-approval-state-attend {
    color: var(--bs-success);
}

.admidio-event-approval-state-tentative {
    color: var(--bs-info);
}

.admidio-event-approval-state-cancel {
    color: var(--bs-danger);
}

.card-img, .card-img-top {
    height: 200px !important;
    object-fit: cover !important;
}

.admidio-photos-thumbnail {
    margin-bottom: 2rem;
}

.admidio-photos-thumbnail .rounded {
    width: 100% !important;
    object-fit: cover !important;
}

.admidio-img-presenter img {
    max-width: 100%;
    height: auto;
}

.admidio-forum-entry-info {
    font-size: 80%;
}

.admidio-forum-topic p {
    margin: 0 !important;
}

#adm_password_strength {
    margin-top: 0.5rem;
}

#adm_password_strength_minimum {
    position: absolute;
    border: 9px solid transparent;
    border-left-color: var(--bs-body-color);
    border-right-width: 0;
    margin-top: 3px;
}

.progress {
    height: 1.5rem !important;
    background-color: var(--bs-tertiary);
    filter: brightness(92%);
}

/***********************************/
/* Overview page */
/***********************************/

.admidio-plugin-content .list-group-item {
    padding-left: 0;
}

#plgCalendarTable td.plgCalendarToday {
    background-color: var(--bs-body-color);
    border-radius: 5px;
    color: var(--bs-body-bg);
}

#plgCalendarTable td {
    text-align: center;
}

#plugin-login-form .btn {
    margin-bottom: 1rem;
}

/***********************************/
/* Preferences page */
/***********************************/

.admidio-preferences-group {
    width: 100%;
}

.admidio-preferences-group .list-group-item.nav-item {
    border-right: none;
    border-bottom: none;
    padding: 0 0 0 0;
}

.admidio-preferences-group .list-group-item.group-heading {
    width: 100%;
    border-bottom: none;
    border-top: var(--bs-list-group-border-width) solid var(--bs-list-group-border-color);
    border-top-left-radius: var(--bs-list-group-border-radius);
    border-top-right-radius: unset;
}

.admidio-preferences-group .list-group-item.group-last {
    margin-bottom: 1rem;
    border-bottom-left-radius: var(--bs-list-group-border-radius);
}

/***********************************/
/* Changelog configuration  */
/***********************************/

ul.changelog-tableselect-list {
    list-style-type: none;
}

/************************************/
/* subinfo form controls (showing/hiding rows) */
/************************************/

.subinfo-row .subinfo-sub-row label, .col-form-sublabel {
  padding-left: 2.5em;
  font-weight: normal;
}
.subinfo-sub-row, .subinfo-row {
  margin-bottom: 0 !important;
}
.subinfo_head {
  margin-bottom: 1.5rem;
}
.col-form-label.col-form-sublabel {
    padding-top: 2pt;
    padding-bottom: 2pt;
}

.subinfo-row .form-control-plaintext {
  width: 75%;
}
.subinfo-sub-row .form-control-plaintext {
  width: 75%;
  padding-bottom: 0;
  padding-top: 0;
}

/***********************************/
/* Clamp text */
/***********************************/
.clamp-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: var(--admidio-clamp-text-lines);
  line-clamp: var(--admidio-clamp-text-lines);
  overflow: hidden;
}

.clamp-text.expanded {
  -webkit-line-clamp: unset;
  line-clamp: unset;
  overflow: visible;
}
