/**
 * SLOT Masterplan Stylesheet
 *
 * @author Simon Bayer <simon.bayer@fau.de>
 */

 :root {
    --hover-color: #e2e2e2;
    --border-color: #c5c5c5;
    --focus-color: #007bff;
    --object-border: 2px solid var(--border-color);
    --object-background: #f4f4f4;
  }
  
  main {
    margin: 0 auto;
    padding: .8em;
    box-sizing: border-box;
  }
  
  /* OWNEDIT, drag n drop */
  .markzone {
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black */
  }

  @media only screen {
    main {
      max-width: 1280px;
    }
  }
  
  .masterplan-section {
    margin-top: 1em;
    margin-bottom: 2em;
  }
  
  .details-section {
    margin-top: -1em;
  }
  
  .details-wrapper {
    margin-bottom: 2em;
  }
  
  .masterplan-section > h3,
  .details-wrapper > h3 {
    margin: 1em 0;
  }
  
  .ects-progress {
      position: relative;
    border: var(--object-border);
    background-color: var(--object-background);
    /* OWNEDIT */
    border-radius: 5px;
  }
  
  .ects-progress > .progress {
    display: block;
    background-color: inherit;
    position: relative;
    padding: .2em;
    box-sizing: border-box;
    text-align: center;
    white-space: nowrap;
    background: var(--border-color);
    transition: width .8s cubic-bezier(0, 0, 0, 1);
  }
  
  .column-overview {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
  }
  
  .column-wrapper {
    width: 100%;
    min-width: 0;
    max-width: 15em;
  }
  
  .column-wrapper:not(:first-child) {
    margin-left: 3%;
  }
  
  .column-title {
    width: 100%;
    text-align: center;
    margin-bottom: .3em;
  }
  
  .column {
    box-sizing: border-box;
    width: 100%;
    height: 15em;
    overflow: hidden;
    background-color: var(--object-background);
    border: var(--object-border);
    position: relative;
    /* OWNEDIT */
    border-radius: 5px;
  }
  
  .column:hover {
    overflow: visible;
  }
  
  .column[data-hint]:not(:hover)::after {
    content: attr(data-hint);
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 3;
    text-align: center;
    padding-top: 1em;
    color: white;
    background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.6), 40%, transparent);
    text-shadow: 0 0 3px black;
  }
  
  .column-item {
    width: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    z-index: 1;
    position: relative;
  }
  
  .column-item:hover {
    overflow: visible;
    z-index: 2;
  }
  
  .column-item > .name {
    font-weight: bold;
    text-align: center;
    padding: .4em .5em;
    background-color: inherit;
  }
  
  .column-ects-label {
    z-index: 0;
    position: absolute;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    padding-bottom: 4px;
    color: var(--border-color);
    -webkit-user-select: none;
    user-select: none;
  }
  
  .column-ects-label.ects-line {
    border-bottom: var(--object-border);
    border-bottom-width: 1px;
  }
  
  .details-section {
    display: flex;
    flex-direction: row;
  }
  
  .details-space {
    width: 4em;
  }
  
  @media (max-width: 720px) {
    .details-section {
      flex-direction: column;
    }
  }
  
  .details-wrapper {
    width: 100%;
  }
  
  .details {
    background-color: var(--object-background);
    border: var(--object-border);
    /* OWNEDIT */
    border-radius: 5px;
  }
  
  .detail-item {
    padding: .5em;
    display: flex;
    flex-direction: column;
  }
  
  .detail-item > .item-details,
  .detail-item > .options {
    display: flex;
    flex-flow: row nowrap;
    width: 100%;
  }
  
  .item-details > .info {
    flex-grow: 1;
    flex-shrink: 1;
    overflow-x: hidden;
  }
  
  .item-details > .ects {
    flex-grow: 0;
    flex-shrink: 0;
    text-align: center;
    width: 3em;
    margin: 0 0.2em;
  }
  
  .item-details > .ects::after {
    content: 'ECTS';
    display: block;
  }
  
  .item-details > .info > .specialization-selection,
  .item-details > .ects::after {
    opacity: 0.8;
    font-size: 80%;
  }
  
  .item-details > .edit {
    flex-grow: 0;
    flex-shrink: 0;
  }
  
  .detail-item:hover {
    background-color: var(--hover-color);
  }
  
  .detail-item:not(.options-open):hover input:not(:disabled):not(:focus),
  .detail-item:hover select:not(:disabled):not(:focus) {
    text-decoration: underline;
    cursor: pointer;
  }
  
  .detail-item button.toggle-options {
    font-size: inherit;
    color: inherit;
  }
  
  .detail-item.options-open button.toggle-options, 
  .detail-item button.toggle-options:hover {
    opacity: .5;
  }
  
  .item-details div.item-name,
  .item-details div.item-ects,
  .item-details input.item-name,
  .item-details input.item-ects,
  .item-details select.item-specialization {
    outline: 0;
    margin: 0;
    border: 1px solid transparent;
    font-size: 100%;
    background-color: transparent;
    box-sizing: border-box;
    font-family: inherit;
    color: inherit;
    cursor: default;
  }
  
  .item-details input {
    width: 100%;
    text-align: inherit;
  }
  
  .detail-item.options-open > .item-details input {
    border: 1px solid var(--text-dark);
    background-color: white;
  }
  
  .detail-item > .item-details input:focus,
  .detail-item > .item-details select:focus {
    background-color: white;
    border: 1px solid var(--focus-color);
    cursor: text;
  }
  
  .detail-item:not(.options-open) > .options {
    display: none;
  }
  
  .detail-item > .options > .change-color {
    flex-grow: 1;
    flex-shrink: 1;
  }
  
  .detail-item > .options > .delete {
    flex-grow: 0;
    flex-shrink: 0;
  }
  
  .change-color > input[type=color] {
    width: 100%;
    height: 3ex;
    outline: 0;
    margin: 0;
    padding: 0;
    border: none;
    font-size: 100%;
    cursor: pointer;
    background-color: transparent;
    /* OWNEDIT */
    /* border-radius: 5px; */
  }
  
  button.delete-item {
    font-size: inherit;
    color: rgb(216, 0, 0);
    margin-left: .5em;
  }
  
  button.delete-item:hover {
    filter: brightness(.8);
  }
  
  table.specialization-details {
    border-collapse: collapse;
    width: 100%;
    overflow: hidden;
  }
  
  table.specialization-details > tr:hover {
    background-color: var(--hover-color);
  }
  
  table.specialization-details > tr > td {
    padding: .7em;
  }
  
  table.specialization-details > tr > td.ects {
    text-align: right;
  }
  
  .add-module-wrapper {
    background-color: var(--border-color);
  }
  
  .add-module-wrapper:not(.search-open) > .search-input,
  .add-module-wrapper:not(.search-open) > .search-results,
  .add-module-wrapper.search-open > .add-module-button {
    display: none;
  }
  
  .add-module-button {
    border: 0;
    margin: 0;
    width: 100%;
    padding: 1em;
    cursor: pointer;
    background-color: var(--border-color);
    color: inherit;
    /* OWNEDIT */
    border-radius: 5px;
  }
  
  .add-module-button:hover,
  .add-module-button:focus {
    filter: brightness(0.9);
  }
  
  .add-module-button:active {
    filter: brightness(0.8);
  }
  
  .search-input {
    width: 100%;
    padding: 1em 0 1em 1em;
    margin-bottom: 0;
    border: 2px solid var(--border-color);
    background: #ffffff;
    font-size: 100%;
    box-sizing: border-box;
    outline: 0;
  }
  
  .search-input:focus,
  .search-input:active {
    border-color: var(--focus-color);
  }
  
  .search-results {
    background-color: var(--object-background);
  }
  
  .search-results[data-hint]::before {
    content: attr(data-hint);
    display: block;
    padding: .5em;
    font-weight: bold;
  }
  
  .search-result {
    padding: .5em;
    cursor: pointer;
  }
  
  .search-result.disabled {
    cursor: default;
    opacity: .5;
  }
  
  .search-result.selected {
    background-color: inherit;
    filter: brightness(0.9);
  }
  
  .search-result {
    display: flex;
    flex-flow: row nowrap;
  }
  
  .search-result > .info {
    flex-grow: 1;
  }
  
  .search-result > .ects {
    flex-grow: 0;
    margin-left: .5em;
    text-align: center;
  }
  
  .search-result > .ects::after {
    content: 'ECTS';
    display: block;
  }
  
  .search-result > .info > .specializations,
  .search-result > .ects::after {
    opacity: 0.8;
    font-size: 80%;
  }
  
  .custom-result:not(:only-child) {
    border-top: 1px dashed var(--border-color);
  }
  
  .requirement {
    display: flex;
    flex-direction: row;
  }
  
  .requirement > .status {
    min-width: 1.5em;
  }
  
  .requirement.satisfied > .status > i.x,
  .requirement:not(.satisfied) > .status > i.check {
    display: none;
  }
  
  .masterplan-link {
    text-decoration: none;
    cursor: pointer;
    color: var(--focus-color);
    word-wrap: break-word;
  }
  
  .delete-button {
    outline: 0;
    border: 0;
    background-color: var(--border-color);
    padding: 1em;
    box-sizing: border-box;
    font-size: 100%;
    /* OWNEDIT */
    border-radius: 5px;
  }
  
  .delete-button:hover {
    background-color: rgb(216, 0, 0);
    color: white;
  }
  
  /* hide number-input buttons */
  input[type=number]::-webkit-outer-spin-button,
  input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }
  /* OWNEDIT */
  /* input[type=number] {
    -moz-appearance: textfield;
  } */
  
  select {
    -moz-appearance: none;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 0;
  }
  