.app_version {
    color: #616161;
    padding-top: 10px;
    border-top: solid 1px #ddd;
    width: 100%;
}

.app_version_label {
    font-style: italic;
    text-align: center;
    margin: auto;
}

@media screen and (min-height: 900px) {
    .app_version {
        position: absolute;
        bottom: 3px;
        border-top: 0px;
        width: 100%;
    }
}

.ui.table td.right-aligned {
    text-align: right;
}

.ui.table th.right-aligned {
    text-align: right;
}

.right-aligned {
    text-align: right;
}

.ui.table td.center-aligned {
    text-align: center;
}

.ui.table th.center-aligned {
    text-align: center;
}

.center-aligned {
    text-align: center;
}

.collapsed {
    display: none !important;
}

tr.inactive_member, tr.inactive_member > td, tr.inactive_member > td > a {
    color: #d0d0d0;
}

.ui.label.inactive_member {
    color: #d0d0d0;
}

.ui.item.inactive_member {
    color: #d0d0d0;
}

.ui.button.inactive_member {
    color: #d0d0d0;
}

/* Restrict number of items in some dropdown qualified with 'short' class by limiting the height. */
.ui.short.dropdown .menu {
    max-height: 200px !important;
}

.ui.container {
    margin-left: 7px;
    margin-right: 7px;
}

audio, video {
    width: 100%;
    max-width: 1280px;
    max-height: 720px;
}

/* --- Flexbox app layout --- */
body.myclub-app {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* --- Sidebar --- */
#app-sidebar {
    width: 150px;
    min-width: 150px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    overflow-x: hidden;
    transition: width 0.25s ease, min-width 0.25s ease;
    z-index: 102;
    display: flex;
    flex-direction: column;
    border-radius: 0 !important;
}

#app-sidebar .item:first-child,
#app-sidebar .item:last-child {
    border-radius: 0 !important;
}

#app-sidebar .sidebar-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

#app-sidebar .sidebar-footer {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Override .app_version global positioning inside sidebar footer */
#app-sidebar .sidebar-footer .app_version {
    position: static !important;
    border-top: 0 !important;
    padding-top: 6px !important;
    bottom: auto !important;
}

#app-sidebar .header .content {
    overflow: hidden;
}

#app-sidebar .header img.sidebar-logo {
    max-width: 100%;
    transition: max-width 0.25s ease;
}

#app-sidebar .item {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

#app-sidebar .item > i.icon {
    display: block;
    font-size: 1.5em !important;
    margin: 0 auto 0.25rem !important;
    width: auto !important;
    height: auto !important;
    opacity: 1;
}

#app-sidebar .sidebar-label {
    font-size: 0.85em;
}

/* --- Sidebar collapsed state --- */
body.sidebar-collapsed #app-sidebar {
    width: 60px;
    min-width: 60px;
}

body.sidebar-collapsed #app-sidebar .sidebar-label {
    display: none;
}

body.sidebar-collapsed #app-sidebar .header img.sidebar-logo {
    max-width: 40px;
}

body.sidebar-collapsed #app-sidebar .app_version {
    display: none;
}

body.sidebar-collapsed #sidebar-toggle i.icon {
    transform: rotate(180deg);
}

/* Anti-flash: collapse sidebar before DOMContentLoaded */
html.sidebar-will-collapse #app-sidebar {
    width: 60px;
    min-width: 60px;
    transition: none;
}
html.sidebar-will-collapse #app-sidebar .sidebar-label {
    display: none;
}
html.sidebar-will-collapse #app-sidebar .app_version {
    display: none;
}
html.sidebar-will-collapse .app-main {
    margin-left: 60px;
    transition: none;
}

/* --- Toggle button --- */
#sidebar-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(0, 0, 0, 0.4);
    padding: 0.6em;
    width: 100%;
    text-align: center;
    transition: color 0.15s ease;
}

#sidebar-toggle:hover {
    color: rgba(0, 0, 0, 0.8);
}

#sidebar-toggle:focus-visible {
    outline: 2px solid #2185d0;
    outline-offset: -2px;
}

#sidebar-toggle i.icon {
    transition: transform 0.25s ease;
    margin: 0 !important;
}

/* --- Main content area --- */
.app-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    margin-left: 150px;
    transition: margin-left 0.25s ease;
}

body.sidebar-collapsed .app-main {
    margin-left: 60px;
}

/* --- Top menu --- */
#top-menu {
    border-radius: 0 !important;
    margin: 0 !important;
    border-top: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    flex-shrink: 0;
}

/* Breathing room between top menu and page content */
#page > .ui.fluid.container {
    padding-top: 1em;
    padding-bottom: 1em;
}

.mobile-only {
    display: none !important;
}

/* --- Sidebar overlay (mobile) --- */
#sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 101;
}

/* --- Intermediate breakpoint: tablets / small laptops (769-1100px) --- */
/* Force collapsed layout in this zone without modifying user's localStorage */
@media screen and (min-width: 769px) and (max-width: 1100px) {
    body.myclub-app #app-sidebar {
        width: 60px !important;
        min-width: 60px !important;
    }
    body.myclub-app .app-main {
        margin-left: 60px !important;
    }
    body.myclub-app #app-sidebar .sidebar-label {
        display: none !important;
    }
    body.myclub-app #app-sidebar .header img.sidebar-logo {
        max-width: 40px !important;
    }
    body.myclub-app #app-sidebar .app_version {
        display: none !important;
    }
    /* Hide toggle in this zone - the layout is forced */
    body.myclub-app #sidebar-toggle {
        display: none !important;
    }
    /* Footer is empty in this zone - remove visual separator */
    body.myclub-app #app-sidebar .sidebar-footer {
        border-top: 0 !important;
    }
}

/* --- Mobile layout --- */
@media screen and (max-width: 768px) {
    body.myclub-app {
        flex-direction: column;
    }

    #app-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: 260px;
        min-width: 260px;
        height: 100%;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 103;
    }

    body.sidebar-mobile-open #app-sidebar {
        transform: translateX(0);
    }

    body.sidebar-mobile-open #sidebar-overlay {
        display: block;
    }

    .app-main {
        width: 100%;
        margin-left: 0;
        transition: none;
    }

    body.sidebar-collapsed .app-main {
        margin-left: 0;
    }

    .mobile-only {
        display: flex !important;
    }

    #sidebar-toggle {
        display: none;
    }

    /* Override collapsed state on mobile - always show full sidebar when open */
    body.sidebar-collapsed #app-sidebar {
        width: 260px;
        min-width: 260px;
    }
    body.sidebar-collapsed #app-sidebar .sidebar-label {
        display: inline;
    }
    body.sidebar-collapsed #app-sidebar .header img.sidebar-logo {
        max-width: 100%;
    }
}

input.dirty-field {
    background-color: #ffe9fd !important;
    background-image: url("img/loading.08e3f6096f3c.svg") !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center right !important;
    background-origin: content-box !important;
}

[data-tooltip]::after {
    word-wrap: break-word;
    white-space: pre-wrap !important;
    min-width: 20em;
    text-wrap: normal;
    display: block;
    position: page;
}

/* Work around the fact that FomanticUI does not allow label to be within a div section as we need it. */
.required.field > div > label::after {
    margin: -.2em 0 0 .2em;
    content: "*";
    color: #db2828;
}

.ui.form .field > div > label {
  display: inline;
  margin: 0 0 .28571429rem 0;
  font-size: .92857143em;
  font-weight: 700;
  text-transform: none;
}

.member-picture-container {
    height: 100%;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}
.member-picture {
    width: 6em; margin-right: 6px; display: inline-block; line-height: 1; vertical-align: baseline; flex-shrink: 0;
}
.member-picture-padding {
    height: 100%; display: inline-block; line-height: 1; vertical-align: baseline;
}

/* -----
Full screen management
*/

/* The Modal (background) */
#fullScreenModalContainer {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 999; /* Sit on top */
    padding: 0px; /* Location of the box */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0, 0, 0); /* Fallback color */
}

/* Modal Content (image) */
#fullScreenContent {
    margin: auto;
    display: block;
    width: auto;
    height: auto;
}

#fullScreenCaption {
    position: fixed;
    bottom: 10px;
    width: 100%;
    text-align: center;
    font-size: 1.5em;
    color: white;
    text-shadow: 1px 1px 1px black;
    line-height: 1.0em;
}

#closeFullScreenContent {
    position: fixed;
    top: 15px;
    right: 10px;
}

#previousFullScreenContent {
    position: fixed;
    top: 15px;
    right: 110px;
}

#nextFullScreenContent {
    position: fixed;
    top: 15px;
    right: 60px;
}

.full-screen-button {
    color: #bbb !important;
    transition: 0.3s;
}

.full-screen-button:hover,
.full-screen-button:focus {
    color: #f1f1f1 !important;
    text-decoration: none;
    cursor: pointer;
}

/* ----- */

/* 100% Image Width on Smaller Screens */
@media only screen and (max-width: 730px) {
    #fullScreenContent {
        width: 100%;
    }
}

/* Radio select without bullets */
.radio-choice-message {
    background: #c6e9f8;
    padding: 1em;
}

/* Radio select without bullets */
.radio-select {
    list-style: none;
}

/* Display delete checkbox and label inline with file name */
div.ui.field > a + input[type="checkbox"] {
    display: inline-flex;
    vertical-align: baseline;
    margin-left: 1em;
}

div.ui.field > input[type="checkbox"] + label {
    display: inline-flex;
}

div.myclub-completion-text-cardtext-class {
    font-size: 0.7em !important;
}

div.myclub-completion-value-cardtext-class {
    font-style: italic !important;
    font-size: 0.7em !important;
}

/* Autocompletion */

/*the container must be positioned relative:*/
.autocomplete {
    position: relative;
    display: inline-block;
    overflow: scroll;
}

.autocomplete-items {
    border: 1px solid #d4d4d4;
    border-bottom: none;
    border-top: none;
    z-index: 99;
    /*position the autocomplete items to be the same width as the container:*/
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fff;
    color: #222f3e;
    border-radius: 5px;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.2);
}

.autocomplete-items div {
    padding: 3px;
    cursor: pointer;
    font-size: 0.8em;
    /*background-color: #fff;
    border-bottom: 1px solid #d4d4d4;*/
}

/* when hovering an item:*/
.autocomplete-items div:hover {
    background-color: #e9e9e9;
}

/*when navigating through the items using the arrow keys:*/
.autocomplete-active {
    background-color: DodgerBlue !important;
    color: #ffffff;
}

/* Style the button like a link */
.icon-link-button {
    background: none;
    border: none;
    padding: 0;
    /*text-decoration: underline;*/
    cursor: pointer;
    /*font-size: 1em;*/
}

/* Tables */
table thead th.orderable > a {
    padding-right: 20px;
    background: url("img/arrow-inactive-up.2898c124b76b.png") right center no-repeat;
}

table thead th.orderable.asc > a {
    background-image: url("img/arrow-active-up.7891d6f2ce48.png");
}

table thead th.orderable.desc > a {
    background-image: url("img/arrow-active-down.ca0c866de58c.png");
}

.text-muted {
    color: #888;
}
