/* PR #30 — one photo workbench with every tool available immediately. */

.photo-workbench {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(111, 155, 255, .18);
}

.photo-workbench.hidden {
  display: none !important;
}

.photo-workbench__intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .75rem;
}

.photo-workbench__intro h4 {
  margin: .12rem 0 0;
  color: #fff;
  font-size: 1rem;
}

.photo-workbench__intro > span {
  color: #95a3c3;
  font-size: .74rem;
  font-weight: 700;
}

.photo-workbench__tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid rgba(111, 155, 255, .18);
  border-radius: 13px;
  background: rgba(7, 13, 31, .34);
}

.photo-workbench__tabs > button {
  display: grid;
  grid-template-columns: 28px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  gap: .05rem .5rem;
  min-height: 68px;
  padding: .7rem;
  border: 0;
  border-right: 1px solid rgba(111, 155, 255, .13);
  border-radius: 0;
  background: transparent;
  color: #fff;
  text-align: left;
  cursor: pointer;
}

.photo-workbench__tabs > button:last-child {
  border-right: 0;
}

.photo-workbench__tabs > button:hover,
.photo-workbench__tabs > button:focus-visible {
  background: rgba(79, 140, 255, .07);
  box-shadow: inset 0 -2px 0 rgba(123, 249, 200, .45);
  outline: none;
}

.photo-workbench__tabs > button.is-active {
  background: rgba(123, 249, 200, .075);
  box-shadow: inset 0 -3px 0 #7bf9c8;
}

.photo-workbench__tabs > button:disabled {
  opacity: .55;
  cursor: wait;
}

.photo-workbench__tabs > button > span {
  grid-row: 1 / 3;
  color: #7bf9c8;
  font-size: 1rem;
  text-align: center;
}

.photo-workbench__tabs strong {
  font-size: .82rem;
}

.photo-workbench__tabs small {
  color: #aab6d1;
  font-size: .66rem;
  line-height: 1.25;
}

.photo-workbench__status {
  margin: .58rem 0 0;
  color: #8f9dbc;
  font-size: .73rem;
  line-height: 1.45;
}

.photo-workbench #options {
  margin-top: .85rem;
  padding: .9rem 0 0;
  border: 0;
  border-top: 1px solid rgba(111, 155, 255, .12);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.photo-workbench #options .preset-row {
  margin-top: 0;
}

.photo-workbench #options .stats {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.25rem;
}

.photo-workbench #options .stats p,
.photo-workbench #savingsRow p {
  margin: .55rem 0 0;
}

.photo-workbench #options .actions {
  margin-top: .75rem;
}

.photo-workbench .photo-quick-panel:not(.is-crop) {
  margin-top: .85rem;
  border-top: 1px solid rgba(111, 155, 255, .12);
  border-bottom: 0;
}

.photo-workbench__output {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: .95rem;
  padding-top: .95rem;
  border-top: 1px solid rgba(111, 155, 255, .14);
}

.photo-workbench__output.hidden {
  display: none !important;
}

.photo-workbench__output-copy {
  display: grid;
  gap: .18rem;
  min-width: 0;
}

.photo-workbench__output-copy strong {
  color: #7bf9c8;
  font-size: .86rem;
}

.photo-workbench__output-copy span {
  color: #aab6d1;
  font-size: .72rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.photo-workbench__output-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .55rem;
  flex: 0 0 auto;
}

.original-preview-copy {
  min-width: 0;
}

.original-preview-grid {
  align-items: start;
}

@media (max-width: 860px) {
  .photo-workbench__tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .photo-workbench__tabs > button:nth-child(2) {
    border-right: 0;
  }

  .photo-workbench__tabs > button:nth-child(-n+2) {
    border-bottom: 1px solid rgba(111, 155, 255, .13);
  }

  .photo-workbench__output {
    align-items: stretch;
    flex-direction: column;
  }

  .photo-workbench__output-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 700px) {
  .photo-workbench__intro {
    align-items: flex-start;
    flex-direction: column;
    gap: .2rem;
    text-align: left;
  }

  .photo-workbench__intro > span {
    display: none;
  }

  .photo-workbench__tabs > button {
    min-height: 64px;
    padding: .62rem;
  }

  .photo-workbench__output-actions,
  .photo-workbench__output-actions .btn {
    width: 100%;
  }

  .workspace-desktop-action {
    display: none !important;
  }
}

@media (max-width: 380px) {
  .photo-workbench__tabs {
    grid-template-columns: 1fr;
  }

  .photo-workbench__tabs > button {
    border-right: 0;
    border-bottom: 1px solid rgba(111, 155, 255, .13);
  }

  .photo-workbench__tabs > button:last-child {
    border-bottom: 0;
  }
}
