@import "foundation/base";

@media #{$small-only} {
  #inbox {
    display: grid;
    grid:
      "folder" auto
      "messages" auto
      / 1fr;
    width: 100%;
  }

  #folder_btn {
    display: block;
    cursor: pointer;

    h3 {
      display: inline-block;
    }
  }
  .folder_collapsed .folders {
    display: none;
  }
  .folder_expanded .folders {
    display: block;
  }

  #folder_list {
    padding: 0.25rem;
  }

  #inbox_compose {
    margin-top: 0.5em;
    input.inline,
    select.inline,
    .autocomplete-container.inline input {
      width: 100%;
    }
  }

  .pages ul.pagination li a {
    padding: 0.05rem 0.5rem 0.05rem;
  }
}

@media #{$medium-only} {
  #inbox {
    display: grid;
    grid:
      "folder" auto
      "messages" auto
      / 1fr;
    width: 100%;
  }

  #folder_btn {
    display: block;
    cursor: pointer;

    h3 {
      display: inline-block;
    }
  }
  .folder_collapsed .folders {
    display: none;
  }
  .folder_expanded .folders {
    display: block;
  }

  #folder_list {
    padding: 0.25rem;
  }

  #inbox_compose {
    margin-top: 0.5em;
    input.inline,
    select.inline,
    .autocomplete-container.inline input {
      width: 100%;
    }
  }
}

@media #{$small-only} {
  .pages,
  .actions {
    text-align: center;
  }

  #action_row {
    display: grid;
    grid:
      "pages pages pages" auto
      "checkbox actions actions" auto
      / 2em auto 1fr;
  }

  .inbox_item_row {
    display: grid;
    grid:
      "checkbox time" auto
      "message message" auto
      / 2em 1fr;
    padding: 5px;

    .item {
      padding-left: 0.5em;
    }
  }
}

@media #{$medium-up} {
  #action_row {
    display: grid;
    grid:
      "checkbox actions pages" auto
      / 2em 1fr auto;
  }

  .pages {
    text-align: right;
  }

  .inbox_item_row {
    display: grid;
    grid:
      "checkbox message time" auto
      / 2em 1fr 8.5em;
    padding: 5px;
  }
}

@media #{$large-up} {
  #inbox {
    display: grid;
    grid-template-areas: "folder messages";
    grid-template-rows: auto;
    grid-template-columns: auto 1fr;
    width: 100%;
    grid-column-gap: 1em;
    column-gap: 1em;
  }

  #folder_btn {
    display: none;
  }
  #folder_list.even {
    background-color: transparent;
  }
}

#folder-btn.no-js {
  display: none;
}
.folders.no-js {
  display: block;
}

.action_button.no-js {
  display: none;
}

.selected_filter {
  display: none;
}
.entry-tags {
  text-align: right;
  font-style: italic;
}
.folders {
  margin-top: 0;
}

#folder_list li img {
  vertical-align: middle;
}

.links {
  text-align: center;
}
#action_row {
  ul,
  button,
  input {
    margin-bottom: 5px;
  }
  padding: 0.75rem 0.25rem 0.5rem 0.25rem;
}

#inbox_folders {
  grid-area: folder;
}

.compose_btn {
  width: 100%;
}

#inbox_folders li {
  margin-bottom: 0;
  ul {
    margin-top: 0;
  }
}

#inbox_folders .links {
  margin-bottom: 1em;
}

#inbox_messages {
  grid-area: messages;
  width: 100%;
}

.actions {
  grid-area: actions;
}

.actions-all {
  grid-area: actions-all;
  text-align: right;
  padding-right: 0.5rem;
}

.pages {
  grid-area: pages;
}

.checkbox {
  grid-area: checkbox;
  text-align: center;
}

.time {
  grid-area: time;
  font-size: smaller;
  margin-left: 0.5em;
  margin-right: 0.5em;
}

.item {
  grid-area: message;
  overflow-wrap: anywhere;
  word-break: normal;
}

.inbox_collapse {
  display: none;
}

#compose_header_fields,
#compose_icon {
  display: inline-block;
}

#compose {
  display: grid;
  grid-template-columns: 100px 1fr;
  grid-column-gap: 1em;
  column-gap: 1em;
}

#metainfo {
  grid-column-end: span 2;
}

#compose_header_fields label,
#compose_icon {
  padding-right: 0.5em;
}

#compose .pkg {
  display: grid;
  grid-template-columns: auto 1fr;
}

.qr-icon a,
.qr-icon button {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  margin: 0;
  background: 0;
  cursor: pointer;
}

.item-empty { 
  font-size: 3em; 
  text-align: center; 
  opacity: .6; 
  padding: 2rem;
}

.unread {
  font-weight: bold;
}

.inbox_item_row {
  border-width: 1px 0 0 0;
}

.inbox_item_row:first-of-type{
  border-width: 0;
}