@import url('https://fonts.googleapis.com/css2?family=Spinnaker&display=swap');

body {
  font-family: "Spinnaker", sans-serif;
  font-size: 11pt;
  margin: 20px auto;
  padding: 0 20px;
  box-sizing: border-box;
}

h1 {
  text-align: center;
  font-size: 1.7em;
  margin: 28px;
  font-weight: 400;
}

#wlmSubForm,
#authorInfo,
#submissionType,
#submissionFullLength,
#submissionsFlash,
#flashFormFields,
#generalInfo,
#submitBlock {
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
    gap: 15px;
}

@keyframes formPulse {
  0% { background-color: rgba(0, 0, 0, 0); }
  50% { background-color: rgba(0, 0, 0, 0.1); }
  100% { background-color: rgba(0, 0, 0, 0); }
}

#flashFormFields.pulse {
  animation: formPulse 1s ease-out;
}

#authorInfo,
#submissionType,
#generalInfo,
#submitBlock {
  max-width: 500px;
  width: 100%;
}

#submissionFullLength,
#submissionsFlash {
  max-width: 532px;
  width: 100%;
  padding: 16px;
  border: 1px solid #dddddd;
  background: #f9f9f9;
  box-sizing: border-box;
}

.label {
  margin-bottom: 8px;
  font-weight: bold;
}

.sublabel {
  font-weight: normal;
  font-style: italic;
  font-size: 9pt;
}

.required {
  color: red;
}

.checkItem {
  font-size: 10pt;
  display: grid;
  gap: 5px;
  grid-template-columns: auto 1fr;
  align-items: start;
}

input[type='text'],
input[type='email'],
input[type='tel'],
textarea {
  padding: 5px 10px;
  width: 100%;
  max-width: 500px;
  box-sizing: border-box;
  font-family: "Spinnaker", sans-serif;
  font-size: 11pt;
}

textarea {
  height: 80px;
  resize: none;
}

.submit {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border: none;
  background: green;
  color: white;
  width: fit-content;
  font-family: "Spinnaker", sans-serif;
  border-radius: 3px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.submit:hover {
  background: rgb(0, 100, 0);
}

.submit[disabled] {
  background: gray;
}

.confirmation {
  max-width: 600px;
  width: calc(100% - 40px);
  margin: 0 auto;
  background-color: #f0f8f0;
  border: 2px solid #4CAF50;
  border-radius: 5px;
  padding: 20px;
}
.confirmation h1 {
  color: #2e7d32;
  margin-top: 0;
}

.wlm-banner-logo {
  display: block;
  width: 100%;
  max-width: 650px;
  height: auto;
  margin: 0 auto 20px;
}

/* Hide header elements when embedded in iframe */
body.iframe-mode .wlm-banner-logo,
body.iframe-mode > h1 {
  display: none;
}

.submissionSectionTitleWrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.infoIcon {
  cursor: help;
}

/* Flash-specific styles */
.submissionSectionTitle {
  font-weight: bold;
  color: #666;
}

#chooseFileBtn,
#addFlashPieceBtn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border: none;
  background: green;
  color: white;
  width: fit-content;
  font-family: "Spinnaker", sans-serif;
  border-radius: 3px;
  cursor: pointer;
  transition: background-color 0.2s;
}

#addFlashPieceBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#chooseFileBtn:hover,
#addFlashPieceBtn:not(:disabled):hover {
  background: rgb(0, 100, 0);
}

#fileNameDisplay {
  display: flex;
  align-items: center;
  margin-left: 8px;
  color: #666;
  font-size: 10pt;
}

#flashPiecesList:not(:empty) {
  margin-top: 12px;
  /* color: #666; */
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
}

#flashPiecesList .flashListLabel {
  display: flex;
  font-weight: 700;
  align-items: center;
}

#flashPiecesQueue {
  display: flex;
  flex-direction: column;
  margin-top: 0.5em;
}

#flashPiecesQueue .flashPiece {
  display: grid;
  grid-template-columns: 76px 1fr 30px;
  border: 1px solid #dddddd;
  border-top: 0;
  background-color: #efefef;
}

#flashPiecesQueue .flashPiece:hover {
  background-color: #cccccc;
}

#flashPiecesQueue .flashPiece:first-child {
  border-top: 1px solid #dddddd;;
}

#flashPiecesQueue .flashPiece.ready {
  border-color: green;
  background-color: #bfe5bc;
}

#flashPiecesQueue .flashPiece.ready:hover {
  background-color: #a9cda7;
}

#flashPiecesQueue .flashPiece > div {
  padding: 5px 10px;
}

.flashPiece .flashPieceOrderNumber {
  font-weight: bold;
  opacity: 30%;
}

.flashPiece.ready .flashPieceOrderNumber,
.flashPiece.inProgress .flashPieceOrderNumber {
  opacity: 100%;
}

.flashPiece .flashPieceQueuedPieceTitle {
  font-style: italic;
  opacity: 30%;
}

.flashPiece.ready .flashPieceQueuedPieceTitle,
.flashPiece.inProgress .flashPieceQueuedPieceTitle {
  font-style: normal;
  opacity: 100%;
}

.flashPieceQueuedIcon {
  display: flex;
  justify-content: center;
  opacity: 20%;
}

#flashPiecesQueue .flashPiece.ready .flashPieceQueuedIcon {
  display: flex;
  align-items: center;
  opacity: 100%;
  color: green;
  cursor: pointer;
}

#flashPiecesQueue .flashPiece.ready .flashPieceQueuedIcon:hover {
  color: darkgreen;
}

.numberedStep {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 10px;
}

.stepNumber {
  font-weight: bold;
}

.flashPieceItem {
  padding: 3px 9px;
  display: flex;
  border: 1px solid green;
  background: #bfe5bc;
  color: green;
  font-family: "Spinnaker","Inter","Roboto",Arial,sans-serif;
  border-radius: 17px;
  font-size: 10pt;
  text-transform: uppercase;
  gap: 5px;
  align-items: center;
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
}

.flashPieceItem .flashListItemLabel {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  max-width: 100%;
  pointer-events: none;
}

.divider {
  border: none;
  border-bottom: 1px solid #dddddd;
  margin: 4px 0 0;
}

.removePiece {
  cursor: pointer;
  opacity: 0.7;
}

.removePiece:hover {
  opacity: 1;
}

.output {
  color: firebrick;
  font-size: 10pt;
}