/* Reserve requests coming from the public site: the list screen, plus the navbar
   button and the centered popup that live in _Layout on every screen. */

#rqPage {
  width: var(--mainMargin);
  margin: auto;
}

#rqFilterContainer {
  margin-bottom: 1rem;
}

.rqFilterButtons {
  margin-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.rqFilterButtons .btn {
  font-size: 0.85rem;
}

/* Demo only: «ثبت درخواست نمونه», set apart from the filters by a dashed amber frame. */
.rqDemoBar {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.9rem;
  padding: 0.65rem 0.8rem;
  border: 1px dashed rgba(245, 158, 11, 0.55);
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.07);
}

.rqDemoBtn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: #d97706;
  border-color: #d97706;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: 8px;
}

.rqDemoBtn:hover,
.rqDemoBtn:focus {
  background-color: #b45309;
  border-color: #b45309;
  color: #fff;
}

.rqDemoHint {
  color: #fcd34d;
  font-size: 0.8rem;
  line-height: 1.7;
}

.rqEmpty {
  color: white;
  text-align: center;
  padding: 2rem 0;
}

#rqCards {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
}

.rqCard {
  background-color: white;
  border-radius: 8px;
  border-top: 5px solid #999;
  width: 23rem;
  padding: 0.8rem 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.rqCardHead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid #e2e2e2;
  padding-bottom: 0.5rem;
}

.rqName {
  font-weight: bold;
  font-size: 1.05rem;
}

.rqId {
  margin-right: auto;
  font-size: 0.75rem;
  color: #777;
}

.rqBadge {
  font-size: 0.75rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  color: white;
}

.rqCardBody {
  padding: 0.5rem 0;
}

.rqRow {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.22rem 0;
  border-bottom: 1px dashed #ededed;
  font-size: 0.88rem;
}

.rqLabel {
  color: #6b6b6b;
}

.rqValue {
  font-weight: bold;
}

.rqContact a {
  text-decoration: none;
  color: #1a4fd6;
}

.rqNote {
  margin-top: 0.6rem;
  background-color: #f5f5f5;
  border-radius: 6px;
  padding: 0.5rem 0.7rem;
  font-size: 0.85rem;
}

.rqNote p {
  margin: 0.25rem 0 0 0;
  white-space: pre-wrap;
}

.rqAdminNote {
  background-color: #fff6e0;
}

.rqCardFoot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding-top: 0.6rem;
  border-top: 1px solid #e2e2e2;
}

.rqCardFoot .btn {
  font-size: 0.82rem;
  padding: 0.3rem 0.8rem;
}

.rqClosedNote {
  font-size: 0.8rem;
  color: #777;
}

/* One colour per status, matching RequestReserveHelper.StatusClass. */
.rqStatusPending {
  border-top-color: #e0a800;
}

.rqStatusPending .rqBadge {
  background-color: #e0a800;
}

.rqStatusApproved {
  border-top-color: #1e7e34;
}

.rqStatusApproved .rqBadge {
  background-color: #1e7e34;
}

.rqStatusReserved {
  border-top-color: #2f5fd0;
}

.rqStatusReserved .rqBadge {
  background-color: #2f5fd0;
}

.rqStatusRejected {
  border-top-color: #b83f6a;
}

.rqStatusRejected .rqBadge {
  background-color: #b83f6a;
}

.rqStatusClosed {
  border-top-color: #9a9a9a;
  opacity: 0.85;
}

.rqStatusClosed .rqBadge {
  background-color: #9a9a9a;
}

#rqModalHint {
  font-size: 0.8rem;
  color: #6b6b6b;
  margin: 0.5rem 0 0 0;
}

#rqModalError {
  color: #c40000;
  font-size: 0.85rem;
  margin: 0.3rem 0 0 0;
}

.rqModalLabel {
  color: #222 !important;
  font-size: 0.9rem;
}

@media only screen and (max-width: 1024px) {
  #rqPage {
    width: 100%;
    padding: 0 1rem;
  }

  .rqCard {
    width: 100%;
  }
}

/* ============================ navbar button ============================ */

.rqNavBtn {
  background-color: #6c757d;
  color: white !important;
}

/* Anything at status 0 or 1 is still reception's to answer. */
.rqNavBlink {
  animation: rqBlink 1s steps(1, end) infinite;
  font-size: 1.05rem;
  font-weight: bold;
  transform: scale(1.06);
}

@keyframes rqBlink {
  0% {
    background-color: #c40000;
    color: white !important;
  }

  50% {
    background-color: #ffd400;
    color: #1a1a1a !important;
  }

  100% {
    background-color: #c40000;
    color: white !important;
  }
}

#rqNavCount:empty {
  display: none;
}

/* ============================ popup ============================ */

#rqPopup {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 1080;
  justify-content: center;
  align-items: center;
}

#rqPopup.rqPopupOpen {
  display: flex;
}

/* Sized against #rqPopup, not the viewport: on a zoomed phone the script shrinks #rqPopup to the
   part of the page actually on screen, and vw/vh would still measure the whole page. */
#rqPopupBox {
  background-color: white;
  border-radius: 10px;
  width: min(46rem, 92%);
  max-height: 86%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#rqPopupHead {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid #e2e2e2;
}

#rqPopupHead h5 {
  margin: 0;
  font-size: 1rem;
}

#rqPopupHead .rqPopupLink {
  margin-right: auto;
}

#rqPopupList {
  overflow-y: auto;
  padding: 0.8rem 1rem;
}

.rqPopupItem {
  border: 1px solid #e6e6e6;
  border-right: 4px solid #e0a800;
  border-radius: 6px;
  padding: 0.5rem 0.7rem;
  margin-bottom: 0.6rem;
  font-size: 0.85rem;
}

.rqPopupItem .rqPopupName {
  font-weight: bold;
  font-size: 0.95rem;
}

.rqPopupItem span {
  display: inline-block;
  margin-left: 0.9rem;
}

.rqPopupItem .rqLabel {
  margin-left: 0.25rem;
}

#rqPopupFoot {
  padding: 0.7rem 1rem;
  border-top: 1px solid #e2e2e2;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#rqPopupFoot p {
  margin: 0;
  font-size: 0.78rem;
  color: #777;
}
