div.article-frame,
div.article-versions {
  margin: 2em 1em;

  p {
    margin: 0.5em;
  }
}
.reorder-container {
  border: 1px solid #1e1e1e;
}
.reorder-row {
  padding: 0.5rem;
  border: 0.5px solid #1e1e1e;
  &:nth-child(2n) {
    background-color: #eee;
  }
}
.active {
  background-color: lightgray !important;
}
.insert-before {
  border-top: 3px solid rgb(236, 32, 127);
}
.insert-after {
  border-bottom: 3px solid rgb(236, 32, 127);
}
.headline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  .button {
    padding: 0.5rem;
    color: black;
    font-weight: 600;
    background-color: lightgray;
    height: 100%;
    border-radius: 5px;
    text-decoration: none;
    &:hover {
      background-color: darkgray;
      font-weight: bold;
    }
  }
}

div.article {
  border: 1px solid lightgray;
  background-color: whitesmoke;
  padding: 0 1rem 1rem 1rem;
}
div.version_history {
  ul {
    margin: 0;
  }
  span.time {
    font-style: italic;
  }
  .version {
    margin: 0.5rem 0;
    .one-diff {
      padding-left: 1.5rem;
    }
    .current {
      color: rgb(10, 116, 10);
    }
  }
}
#assets {
  margin: 2em 1em;

  p,
  a {
    margin: 0.5em;
  }

  .asset {
    padding: 1em;
    border: 1px solid black;
    background-color: whitesmoke;
    margin-bottom: 0.5rem;
    
    video{
      width: 100%;
    }

    div.asset-data {
      width: 100%;
      display: flex;
      justify-content: space-between;
    }

    div.asset-controls {
      display: flex;

      button {
        margin: 0 0.3em;
      }

      a {
        text-decoration: none;
      }
    }

    div.asset-files {
      .info {
        display: inline-block;
      }
      div.page-links {
        display: flex;
        flex-wrap: wrap;
        button {
          background: none !important;
          border: none;
          padding: 0 !important;
          font-size: 16px;
          margin: 0 10px;
          cursor: pointer;
        }
      }

      div.image {
        margin: 15px;

        div.controls {
          margin-bottom: 15px;
          display: flex;
          justify-content: space-between;

          div.prev-next {
            display: flex;
          }

          button {
            margin: 0;
            border: 0;
            padding: 0;
            font-size: 1.5rem;
          }
        }
        img {
          width: 400px;
          max-width: 60%;
        }
      }
    }
    .alert {
      padding: 0.5rem 0;
      font-size: 1.1rem;
    }
  }
}

form.asset {
  padding: 0.5em 1em !important;
}
/* copy paste from gynfakultaet*/
div.card {
    container-type: inline-size;
    .subtitle,
    .category,
    .title {
      font-weight: 600;
    }
    .title {
      color: black;
    }
    .subtitle, .category {
      color: darkgray;
      margin: 1.5cqw 0;
    }
  }
  div.card {
    min-width: 50cqw;
    height: 55cqw;
    margin: 2cqw;
    box-shadow: 0 4px 8px 4px
      color-mix(in srgb, darkgray, transparent 80%);
    border: none;
    img {
      height: 50cqw;
      width: 100%;
      object-fit: cover;
    }
    .info {
      padding: 3cqw;
    }
    .title {
      display: block;
      margin: 0;
      font-size: 6cqw;
      overflow: hidden;
      text-overflow: ellipsis;
      max-height: 3lh;
    }
    .subtitle {
      font-size: 5cqw;
      display: inline-block;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      width: 100%;
    }
  }
  div.card.contain img{
    object-fit: contain;
  }
  div.card.cover{
    object-fit: cover;
    &.top img{
      object-position: top;
    }
    &.bottom img{
      object-position: bottom;
    }
  }
  .boxes{
    position: relative;
    display: flex;
  }
  .boxes div.card img{
    height: 65cqw;
  }
  .boxes div.card.no_text img{
    height: 100cqw;
  }

  @container content (width >= 600px) {
    .content {
      .container:has(article) {
      div.card {
        min-width: 28cqw;
        height: 28cqw;
      }
    }
  }}

/* end copy paste from gynfakultaet*/
/* overwriting styles so that it works for praxisservice*/

div.card {
  min-width: 210px;
  width: 210px;
  height: 210px;
}
.direct-upload {
  display: flex;
  position: relative;
  padding: 2px 4px;
  margin: 0 3px 3px 0;
  border: 1px solid rgba(0, 0, 0, 0.3);
  border-radius: 3px;
}

.direct-upload--pending {
  opacity: 0.6;
}

.direct-upload__progress {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  opacity: 0.2;
  background: #0076ff;
  transition: width 120ms ease-out, opacity 60ms 60ms ease-in;
  transform: translate3d(0, 0, 0);
}

.direct-upload--complete .direct-upload__progress {
  opacity: 0.4;
}
.direct-upload--complete  {
  background-color: aqua;
}

.direct-upload--error {
  border-color: red;
}

input[type="file"][data-direct-upload-url][disabled] {
  display: none;
}
#flash {
  position: fixed;
  display: block;
  width: 100%;
  top: 0;
  .alert {
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    color: #242424;
    background-color: #97d3ea;
  }
  .alert-danger {
    background-color: #ee7868;
  }
  .alert-danger,
  .alert-warning {
    animation: appear 2s both;
  }
  .alert-info {
    animation: appear-then-fade 4s both;
  }
  p {
    display: inline-block;
    padding: 0;
    margin: 0;
  }
  .close {
    background: none;
    border: none;
    padding: 0;
  }
}
main #flash {
  top: 2vw;
  left: 2vw;
  right: 2vw;
  width: inherit;
}
@keyframes appear-then-fade {
  0%,
  100% {
    opacity: 0;
  }
  5%,
  60% {
    opacity: 1;
  }
}
@keyframes appear {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
footer {
  display: flex;
  padding: 0.5em;
  & > * {
    flex: 1;
    margin: 0.2em 0.5em;
  }
  a {
    text-align: right;
    max-width: 100px;
    text-decoration: none;
    font-weight: bold;
    color: black;
    &:hover {
      background-color: darkgray;
      font-weight: bold;
    }
  }

  div.locales {
    display: flex;
    gap: 1rem;

    div.current {
      background-color: darkgray;
    }
  }
}
fieldset {
  display: block;
  border-width: 0;
  display: flex;
  gap: 1em;

  select {
    width: 100%;
  }

  label {
    flex: 1;
    text-align: right;
    &.error {
      color: red;
    }
  }

  input,
  textarea,
  select,
  div.direct-upload,
  p {
    flex: 3;
  }

  div.input_with_errors {
    flex: 3;

    input,
    textarea,
    select {
      width: 100%;
    }

    span {
      display: block;
      color: red;
    }
  }
}
textarea.code {
  width: 100%;
  height: 300px;
  font-size: 80%;
  overflow-x: auto;
  font-family: "Courier New", Courier, monospace;
  white-space: nowrap;
}
header {
  border-bottom: 1px solid darkgrey;
  #logo {
    text-align: center;
    font-size: 2em;
    padding: 0.5em 0;
  }

  #menu,
  #menu2 {
    display: flex;
    a {
      flex: 1;
      text-align: center;
      text-decoration: none;
      font-weight: bold;
      color: black;
      padding: 0.5em;
      background-color: rgb(212, 212, 212);
      &:hover {
        background-color: darkgray;
        font-weight: bold;
      }
    }
  }
  #menu{
    a{
      max-width: 100px;
    }
  }
  #menu2{
    a {
      font-size: 80%;
    }
  }
}
fieldset {
  &.multiple {
    display: flex;
    flex-wrap: wrap;
  }

  &.upload {
    display: flex;
    justify-content: center;

    div.loader {
      display: none;
      border: 6px solid #f3f3f3; /* Light grey */
      border-top: 6px solid #3498db; /* Blue */
      border-radius: 50%;
      width: 20px;
      height: 20px;
      animation: spin 2s linear infinite;

      &.show {
        display: block;
      }
    }
  }
}

form.import-files {
  .direct-upload {
    font-size: 10px;
    width: 100px;
    height: 30px;
    flex: none;
    overflow: hidden;
    display: flex;
    align-items: center;
  }

  .direct-upload--success,
  .direct-upload--failure {
    position: relative;
    overflow: visible;
    &::before {
      position: absolute;
      color: white;
      top: -0.5rem;
      right: -0.5rem;
      width: 1rem;
      height: 1rem;
      border-width: 1px;
      border-style: solid;
      border-radius: 50%;
      text-align: center;
      font-size: 1rem;
      font-weight: bold;
      display: flex;
      justify-content: end;
      align-items: center;
    }
    div.direct-upload__progress {
      display: none;
    }
    span {
      color: white;
    }
  }

  .direct-upload--success {
    background-color: #4bb543;
    border-color: #2f722b;

    &::before {
      content: "✔";
      background-color: #4bb543;
      border-color: #2f722b;
    }
  }

  .direct-upload--failure {
    background-color: #db0e0e;
    border-color: #c40e0e;

    &::before {
      content: "✘";
      background-color: #db0e0e;
      border-color: #c40e0e;
    }
  }
}

form.import-data {
  .direct-upload {
    font-size: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    flex: 3;
  }
}
table.basic {
  margin-bottom: 0.5rem !important;
  th,
  td {
  font-size: 0.8rem;
    padding: 0.2rem !important;
    text-align: left;
  }
  .updated-entries {
    margin: 0.5rem 0 0.2rem 1rem;
    border: none;
    th,
    td {
      border: none;
    }
  }
}
.keywords{
    padding: 1rem 0;
    p{
        display: inline;
        cursor: pointer;
        padding: 0.2em 0.5em;
        margin: 0 0.2em;
        background-color: #f0f0f0;
        border-radius: 4px;
        line-height: 2;
        white-space: nowrap;
        &.selected{
            border: 2px solid #333333;
        }
    }
}
div.import:has(div.loading), div.asset:has(div.loading) {
    background-color: lightpink !important;
    div.loading {
      display: flex;
      align-items: center;
      margin-bottom: 0.5rem;
      img {
        width: 25px;
        margin-right: 5px;
        animation: spin 2s infinite linear;
      }
    }
  }
  
@keyframes spin {
0% {
    transform: rotate(0deg);
}
100% {
    transform: rotate(360deg);
}
}
 
div.statistics {
  margin: 1em;

  div.articles {
    margin-top: 1em;
    display: flex;
    flex-direction: row;
    justify-content: space-between;

    div.article {
      min-width: 18rem;
      height: 50rem;
    }
  }

  div.missing-asset-count {
    display: flex;
    justify-content: space-between;
    max-width: 40%;
    padding: 0.4rem;

    &:nth-child(even) {
      background-color: #e2e2e2;
    }
  }
}

div.failed-assets {
  margin-top: 1rem;
}
body {
  text-align: center;
  background-color: lightgray;
  font-family: "Open Sans", Helvetica, sans-serif;
  color: rgb(30, 30, 30);
  margin: 0;
  main {
    margin: 2em auto;
    max-width: 1000px;
    text-align: left;
    background-color: white;
    border: 1px solid darkgray;
    border-radius: 2px;

    & > footer,
    & > header {
      margin: 0;
      background-color: rgb(227, 227, 227);
    }
    div.content {
      container-name: content;
      container-type: inline-size;
      margin: 1rem;

      a {
        color: rgb(39 86 196);
        text-decoration: none;
        &:hover {
          text-decoration: underline;
        }
      }
      p,
      span,
      strong,
      a {
        &.alert {
          color: rgb(236, 32, 127);
        }
      }
    }
  }
}
#link-output {
  div {
    display: flex;
    align-items: center;
    gap: 1em;
    justify-content: flex-start;
    margin: 0.5em;
  }
  textarea {
    flex: 3;
    font-family: "Courier New", Courier, monospace;
    font-size: 75%;
    font-weight: 600;
    height: 200px;
  }
  button {
    flex: 1;
  }
}

.form-submit {
  textarea {
    color: white;
    background-color: rgb(216, 112, 147);
  }
}

div.import{
  border:1px solid darkgray;
  background-color: lightgray;
  margin:0.5rem 1rem;
  &>*{
    margin:0.2rem 0.5rem;

  }
}

div.added-article {
  display: flex;
  justify-content: space-between;

  button {
    margin: 0;
    padding:0;
    font-size:1.5rem;
    border: none;
    background: none !important;
    padding: 0 !important;
    color: #3391ff;
    font-size: 16px;
    margin: 0 10px;
    cursor: pointer;
  }
}
.permissions {
  span {
    margin-right: 2rem;
  }
  .options {
    margin-top: 2rem;
  }
}
.new-user,
.edit-user {
  input[type="email"] {
    padding: 0.2rem;
  }
  input[type="submit"] {
    margin-top: 1rem;
  }
}
.user-activation {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
div.list-all {
  display: flex;
  flex-direction: column;
}

form.list-block,
div.list-block {
  margin: 0.5em;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  p {
    width: 100%;
  }
}

table {
  border-collapse: collapse;
  vertical-align: middle;
  text-align: center;
  margin-bottom: 2rem;

  thead {
    background-color: #333;
    color: white;
    font-size: 1rem;
    letter-spacing: 2%;

    th {
      width: 20%;
    }
  }

  th,
  td {
    border: 1px solid black;
    padding: 8px;
  }
  th.vertical {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
  }

  td {
    &.Integer,
    &.BigDecimal {
      text-align: right;
    }

    &.String {
      text-align: left;
      .cell-content{
        display: flex;
        justify-content: space-between;
        img{
          max-height: 120px;
        }
      }
    }
  }

  caption {
    font-weight: bold;
    font-size: 20px;
    text-align: left;
    margin-bottom: 10px;
  }

  tbody tr:nth-child(odd) {
    background-color: #fff;
  }

  tbody tr:nth-child(even) {
    background-color: #eee;
  }
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *



 */
