html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  background-color: #f8f9fa;
}

.blog-hero {
    width: 100%;
    height: 220px;
    margin: 0;
    background-position: center;
    background-size: cover;
    overflow: hidden;
    box-shadow: 0 .125rem .25rem rgba(0,0,0,.075);
}

.blog-hero-caption {
    height: 100%;
    padding: 1rem 1.5rem;
    background: transparent;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,.85);
}
.blog-hero-photo-caption { position: absolute; left: .75rem; bottom: .35rem; color: #000; text-shadow: 1px 1px 0 #fff, -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff; }
.blog-hero { position: relative; }
.hero-crop { max-width: 100%; max-height: 500px; overflow: hidden; position: relative; background: #f8f9fa; }
.hero-crop img { display: block; max-width: 100%; max-height: 500px; user-select: none; -webkit-user-drag: none; }
.hero-crop-mirrored { transform: scaleX(-1); }
.hero-crop-box { position: absolute; border: 2px solid #0d6efd; background: rgba(13,110,253,.15); }

.blog-hero-title {
    display: block;
    color: #fff;
    font-size: 1.75rem;
    font-weight: 700;
    text-decoration: none;
}

.blog-hero-subtitle { font-size: 1.05rem; font-weight: 700; }
.blog-hero-name { font-size: .95rem; font-weight: 700; }

.blog-content img { max-width: 100%; height: auto; }
.blog-content p:last-child { margin-bottom: 0; }
.markdown-content > :first-child { margin-top: 0; }
.markdown-content > :last-child { margin-bottom: 0; }
.markdown-content blockquote {
    border-left: .25rem solid var(--bs-border-color);
    color: var(--bs-secondary-color);
    margin: 1rem 0;
    padding-left: 1rem;
}
.markdown-content ul, .markdown-content ol { padding-left: 1.5rem; }
.blog-thumbnail { width: 82px; height: 82px; object-fit: cover; }
.blog-photo-thumb { width: 96px; height: 96px; object-fit: cover; }
.blog-photo-preview {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 350px;
    object-fit: contain;
}
.photo-thumb-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; max-height: 520px; overflow-y: auto; padding: .25rem; }
.photo-thumb-button { border: 2px solid transparent; border-radius: .375rem; background: transparent; padding: 0; overflow: hidden; cursor: pointer; }
.photo-thumb-button img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.photo-thumb-button:hover, .photo-thumb-button.active { border-color: var(--bs-primary); }
.photo-viewer img { max-height: 620px; width: auto; max-width: 100%; object-fit: contain; }
.photo-picker { max-height: 300px; overflow-y: auto; border: 1px solid var(--bs-border-color); border-radius: .375rem; padding: .75rem; }
.photo-picker-album + .photo-picker-album { border-top: 1px solid var(--bs-border-color); margin-top: .75rem; padding-top: .75rem; }
.photo-picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(69px, 1fr)); gap: .5rem; }
.photo-picker-item { border: 2px solid transparent; border-radius: .375rem; padding: 0; background: transparent; overflow: hidden; }
.photo-picker-item img { display: block; width: 69px; height: 69px; object-fit: cover; }
.photo-picker-item:hover, .photo-picker-item.selected { border-color: var(--bs-primary); }
.article-photo-card { display: flex; flex-direction: column; gap: .75rem; align-items: flex-start; }
.article-photo-preview { width: 96px; height: 96px; border: 1px solid var(--bs-border-color); border-radius: .375rem; display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--bs-light); text-align: center; font-size: .8rem; }
.article-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.article-photo-panel { width: 100%; }

.list-group-item-img {
    width: 80px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Google sign input button */
.gsi-material-button {
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    -webkit-appearance: none;
    background-color: WHITE;
    background-image: none;
    border: 1px solid #747775;
    -webkit-border-radius: 4px;
    border-radius: 4px;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    color: #1f1f1f;
    cursor: pointer;
    font-family: 'Roboto', arial, sans-serif;
    font-size: 14px;
    height: 40px;
    letter-spacing: 0.25px;
    outline: none;
    overflow: hidden;
    padding: 0 12px;
    position: relative;
    text-align: center;
    -webkit-transition: background-color .218s, border-color .218s, box-shadow .218s;
    transition: background-color .218s, border-color .218s, box-shadow .218s;
    vertical-align: middle;
    white-space: nowrap;
    width: auto;
    max-width: 400px;
    min-width: min-content;
}

.gsi-material-button .gsi-material-button-icon {
    height: 20px;
    margin-right: 10px;
    min-width: 20px;
    width: 20px;
}

.gsi-material-button .gsi-material-button-content-wrapper {
    -webkit-align-items: center;
    align-items: center;
    display: flex;
    -webkit-flex-direction: row;
    flex-direction: row;
    -webkit-flex-wrap: nowrap;
    flex-wrap: nowrap;
    height: 100%;
    justify-content: space-between;
    position: relative;
    width: 100%;
}

.gsi-material-button .gsi-material-button-contents {
    -webkit-flex-grow: 1;
    flex-grow: 1;
    font-family: 'Roboto', arial, sans-serif;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: top;
}

.gsi-material-button .gsi-material-button-state {
    -webkit-transition: opacity .218s;
    transition: opacity .218s;
    bottom: 0;
    left: 0;
    opacity: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.gsi-material-button:disabled {
    cursor: default;
    background-color: #ffffff61;
    border-color: #1f1f1f1f;
}

.gsi-material-button:disabled .gsi-material-button-contents {
    opacity: 38%;
}

.gsi-material-button:disabled .gsi-material-button-icon {
    opacity: 38%;
}

.gsi-material-button:not(:disabled):active .gsi-material-button-state,
.gsi-material-button:not(:disabled):focus .gsi-material-button-state {
    background-color: #303030;
    opacity: 12%;
}

.gsi-material-button:not(:disabled):hover {
    -webkit-box-shadow: 0 1px 2px 0 rgba(60, 64, 67, .30), 0 1px 3px 1px rgba(60, 64, 67, .15);
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, .30), 0 1px 3px 1px rgba(60, 64, 67, .15);
}

.gsi-material-button:not(:disabled):hover .gsi-material-button-state {
    background-color: #303030;
    opacity: 8%;
}

/* Location hierarchy */
.folder-tree .accordion-button::after {
    display: none;
}
/* Clear generic arrow styling */
.folder-toggle[aria-expanded="true"] .bi-folder::before {
    content: "\f3d8";
    color: #ffca2c !important;
}
/* Switch to open folder icon symbol */
.file-item:hover {
    background-color: rgba(13, 110, 253, 0.05);
    color: #0d6efd !important;
}

.spin {
    display: inline-block;
    animation: rotation 1s infinite linear;
}

@keyframes rotation {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Locations responsive grid/tree from Item page */
.location-scroll {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
}

.location-grid {
    width: max-content;
    min-width: 100%;
    font-family: inherit;
}

.location-grid .path-row { display: grid; align-items: center; gap: .25rem .5rem; grid-auto-flow: row; }
.location-grid .path-row { grid-auto-columns: 180px; grid-template-columns: repeat(var(--max-depth,4), 180px) auto; min-width: 100%; }
.location-grid .crumb { display:block; }
.location-grid .parents { display:none; }
.location-grid .leaf {
    position: sticky;
    right: 0;
    z-index: 1;
    width: max-content;
    min-width: 0;
    justify-self: end;
    background-color: var(--bs-card-bg, #fff);
    box-shadow: -0.25rem 0 0.5rem -0.35rem rgba(0, 0, 0, 0.35);
    white-space: nowrap;
}

.location-dropdown-portal {
    z-index: 1080;
}

/* Markdown editor */
.editor-toolbar {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-bottom: none;
    border-radius: 0.375rem 0.375rem 0 0;
    padding: 6px 8px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.editor-toolbar button {
    color: #495057 !important;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 0.25rem;
    width: 30px;
    height: 30px;
    line-height: 24px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: all 0.15s ease-in-out;
}

.editor-toolbar button:hover,
.editor-toolbar button.active {
    background: #e9ecef;
    border-color: #ced4da;
    color: #0d6efd !important;
    box-shadow: 0 0 0 0.125rem rgba(13, 110, 253, 0.08);
}

.editor-toolbar i,
.editor-toolbar .fa {
    color: inherit !important;
    font-size: 14px;
}

.CodeMirror {
    border: 1px solid #dee2e6;
    border-radius: 0 0 0.375rem 0.375rem;
    min-height: 260px;
    background: #ffffff;
    color: #212529;
}

.CodeMirror-focused {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
    outline: 0;
}
