/*
   Common styles of every page (the pages of the application and the public pages).
   The shell of the signed-in application is in app.css, the public pages (login, ...) are in login.css and every page
   adds its own file through the "Styles" section of the layout. ui.css (Componentator) is shared by all of them.
*/

/* Brand colors: red #E11D2E, black #0B0F14, white #FFFFFF. --color overrides the default of Componentator (its components use it). */
:root { --page-width: 960px; --color: #E11D2E; --brand-black: #0B0F14; --brand-white: #FFFFFF; }

/* the logos have a light and a dark variant, the dark mode shows the white one */
.logo-dark { display: none; }
.ui-dark .logo-light { display: none; }
.ui-dark .logo-dark { display: inline-block; }

.fa { -webkit-transform: none; }

html,body { margin: 0; padding: 0; overflow: hidden; }
body.custombody { background: #E0E0E0; }
/* ".ui-dark" alone loses to "body.custombody" on plain CSS specificity, it needs the same shape to win */
body.custombody.ui-dark { background: #1c1c1c; }

h3 { padding: 0; }
h3 i { margin-right: 8px; }

/* utilities */
.mt10 { margin-top: 10px; }
.mt20 { margin-top: 20px; }
.ml5 { margin-left: 5px; }
.bold { font-weight: bold !important; }
.pre { white-space: pre-wrap; word-break: break-word; }

.red { color: #f51e1e !important; }
.color { color: var(--color); }


/* hint under a field or a text */
.field-hint { font-size: 11px; color: #888; margin: 0 0 10px; line-height: 1.4; }
.ui-dark .field-hint { color: #808080; }
.field-warning { position: relative; margin: 2px 0 10px; padding: 6px 8px 6px 30px; font-size: 12px; line-height: 1.4; color: #B3261E; background: rgba(225, 29, 46, 0.07); border: 1px solid rgba(225, 29, 46, 0.35); border-radius: 4px; }
.field-warning::before { content: '!'; position: absolute; left: 8px; top: 6px; width: 16px; height: 16px; line-height: 16px; border-radius: 50%; text-align: center; font-size: 12px; font-weight: bold; color: #FFF; background: #E11D2E; }
.ui-dark .field-warning { color: #FF8A80; background: rgba(225, 29, 46, 0.14); border-color: rgba(225, 29, 46, 0.5); }

.empty { padding: 35px 20px; text-align: center; color: gray; }
.ui-dark .empty { color: #808080; }

/* badges */
.badge { font-size: 11px; padding: 1px 6px 2px; border-radius: 2px; background-color: #848484; line-height: 12px; vertical-align: middle; margin-top: -2px; position: relative; display: inline-block; color: white; }
.badge i { margin-right: 5px; }

@media (max-width: 768px) {
}

/* button inside a page or a form (the buttons of the toolbar and of the forms are styled by their components) */
.button { background: var(--color); border: 1px solid rgba(0,0,0,0.2); padding: 0 16px; color: white; height: 30px; font-weight: bold; border-radius: 3px; text-transform: uppercase; font-size: 12px; cursor: pointer; }
.button .fa { margin-right: 6px; }
.button:hover { opacity: 0.7; }
/* an icon in front of the text of a button never touches the text (an icon with its own margin class keeps it) */
button > i.ti:first-child:not(.mr5):not(.mr10):not(.ml5):not(.ml10),
a.button > i.ti:first-child:not(.mr5):not(.mr10):not(.ml5):not(.ml10) { margin-right: 6px; }
.button:disabled { opacity: 1; color: gray; background: #dcdcdc; border-color: #dcdcdc; cursor: not-allowed; }
/* the primary button is the brand red, so the dangerous one is an outline: it must not look like the main action */
.button.button-danger { background: #FFFFFF; color: var(--color); border: 1px solid var(--color); }
.ui-dark .button.button-danger { background: transparent; color: #FF6B78; border-color: #FF6B78; }
.ui-dark .button:disabled { color: #666; background: #303030; border-color: #303030; }

.mr5 { margin-right: 5px; }
.ml20 { margin-left: 20px; }
.mr20 { margin-right: 20px; }

/* the area of the chosen files, the drop layer of the files covers it while files are dragged over it */
.filepicker { position: relative; padding-bottom: 4px; }

/* the binders of the pages are blocks (the content of a detail is arranged under each other), the ones inside a text are marked as inline */
ui-bind { display: block; }
ui-bind.inline { display: inline; }
.ui-dark .ui-dragdropelement-area { background-color: rgba(60,60,60,0.5) !important; border-color: #A0A0A0; }
.ui-dark .ui-dragdropelement-area span { color: #E0E0E0; }

/* ===== Toast: a short confirmation of a done action ===== */
.toast { position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 20px); opacity: 0; z-index: 10000; background: #1E9E4C; color: #FFF; padding: 10px 18px; border-radius: 4px; font-size: 13px; font-weight: bold; box-shadow: 0 4px 14px rgba(0,0,0,0.25); transition: opacity .25s, transform .25s; pointer-events: none; max-width: 90%; }
.toast i { margin-right: 8px; }
.toast.toast-show { opacity: 1; transform: translate(-50%, 0); }
.ui-dark .toast { background: #25B05A; color: #08210F; box-shadow: 0 4px 14px rgba(0,0,0,0.6); }

/* the panel at the top of a section: the icon of the section and what the section is for (the look of the invitations to a role) */
.section-intro { display: flex; gap: 14px; align-items: flex-start; max-width: var(--page-width); margin: 0 auto 14px; padding: 14px 18px; border-radius: 10px; border: 1px solid #E0E0E0; background: #FFF; }
.section-intro > i { flex: 0 0 auto; font-size: 26px; color: var(--color); margin-top: 2px; }
.section-intro b { font-size: 14px; }
.section-intro p { margin: 4px 0 0 0; font-size: 13px; line-height: 1.5; color: #666; }
.ui-dark .section-intro { background: #262626; border-color: #3a3a3a; }
.ui-dark .section-intro p { color: #A0A0A0; }
.section-intro-wrap { padding-bottom: 0; }
/* the list under an intro in its own block starts right under it: the gap is the one under the intro on every page */
.section-intro-wrap + .padding, .section-intro-wrap ~ ui-bind > .padding { padding-top: 0; }

/* the spaces of a request to be added to a property (Views/Shared/_RequestSpaces): the public form and the new ownership */
.join-group { font-weight: bold; margin: 18px 0 2px; }
.join-space { border-left: 3px solid var(--color); padding-left: 10px; margin: 10px 0; }
.join-space-title { display: flex; align-items: center; justify-content: space-between; font-size: 12px; margin-bottom: 4px; }
.join-space-title > span { opacity: 0.7; }
.join-remove { border: 0; background: transparent; color: #888; font-size: 16px; line-height: 1; padding: 4px 6px; cursor: pointer; border-radius: 3px; }
.join-remove:hover { color: #D32F2F; background: rgba(128, 128, 128, 0.12); }
.join-add { background: transparent; color: var(--color); border: 1px dashed var(--color); border-radius: 3px; height: 30px; padding: 0 12px; cursor: pointer; margin-bottom: 14px; }
.join-add i { margin-right: 5px; }

/* the demo version: a strip on top of every page */
/* the top of the application is 22 px higher in the demo (the size of the top of the layout in _AppLayout) */
.demo-strip { display: flex; align-items: center; justify-content: center; gap: 6px; box-sizing: border-box; height: 22px; padding: 0 10px; background: #F59E0B; color: #1F1300; font-size: 12px; font-weight: bold; line-height: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.demo-version.nav-open .ui-layout > section[data-type="left"] { top: 82px !important; height: calc(100% - 142px) !important; }
.demo-strip > i { font-size: 13px; }
