/*
 * Online booking pages (book_appt.jsp, book_appt_group.jsp, book_empeded.jsp)
 * - Header: blue bar only as wide as the page content, not the full screen.
 * - Tech / time / service pickers: instead of popups, each one is shown as its
 *   own screen on the same page (booking form hidden), with a back arrow.
 *   Behaviour is in /js/appt/booking-screens.js
 */

/* ---------------------------------------------------------------- header */
.topbar.header-menu {
  background: #DEF0F6;
  padding-left: 0;
  padding-right: 0;
}
.topbar.header-menu > .container {
  background: #218748;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------------------------------------------------------------- page background
 * One white column (same width as the header / form) from the header down to
 * the footer, instead of white boxes on the light blue page background.
 */
main.main-container {
  --booking-col: 100%;
  background: #f6f9f6; /* NEWLIFE: page tint (50% of #ecf3ec) */
  min-height: 100vh;
  padding-bottom: 115px; /* room for the fixed CANCEL / SUBMIT bar + "Power by" */
}
@media (min-width: 576px) { main.main-container { --booking-col: 540px; } }
@media (min-width: 768px) { main.main-container { --booking-col: 720px; } }
@media (min-width: 992px) { main.main-container { --booking-col: 960px; } }
@media (min-width: 1200px) { main.main-container { --booking-col: 1140px; } }
main.main-container .site-footer {
  margin-bottom: 0;
}
.button-bottom > .container {
  background: #fff;
}
/* "Power by NEWLIFEPOS" is moved (booking-screens.js) to the bottom of the fixed
   CANCEL / SUBMIT bar, so it is always the last line of the page */
.button-bottom .site-footer.in-bottom-bar {
  margin: 0 !important;
  padding: 2px 0 6px !important;
  background: #fff;
}
.button-bottom .site-footer.in-bottom-bar .container {
  padding: 0;
}

/* ---------------------------------------------------------------- picker screens */
.inline-picker {
  display: none;
  background: #fff;
  min-height: calc(100vh - 55px);
  width: 100%;
  margin: 55px auto 0;
}
/* same width as the booking form / header (Bootstrap .container) */
@media (min-width: 576px) { .inline-picker { max-width: 540px; } }
@media (min-width: 768px) { .inline-picker { max-width: 720px; } }
@media (min-width: 992px) { .inline-picker { max-width: 960px; } }
@media (min-width: 1200px) { .inline-picker { max-width: 1140px; } }

.inline-picker .picker-dialog,
.inline-picker .picker-content {
  width: 100%;
  margin: 0;
  max-width: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.inline-picker .header-center {
  position: sticky;
  top: 55px;
  z-index: 5;
  display: flex;
  align-items: center;
  background: #fff;
  border-bottom: 1px solid #e3f1f5;
  border-radius: 0;
  padding: 0;
}
.inline-picker .modal-header {
  flex: 1;
  padding: 14px 15px 14px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.inline-picker .modal-title {
  font-size: 17px;
  margin: 0;
  color: #218748 !important;
}
.inline-picker .picker-back {
  border: 0;
  background: transparent;
  color: #218748;
  font-size: 20px;
  padding: 10px 15px;
  cursor: pointer;
  line-height: 1;
}
.inline-picker .modal-body {
  padding-bottom: 90px;
}
.inline-picker .picker-done {
  position: sticky;
  bottom: 0;
  padding: 12px 15px;
  background: #fff;
  border-top: 1px solid #e3f1f5;
}
.inline-picker .picker-done .btn {
  width: 100%;
}
body.picker-open main.main-container {
  display: none !important;
}
[data-inline-picker] {
  cursor: pointer;
}

/* ---------------------------------------------------------------- top message banner
 * Errors / info shown at the top of the page (under the header) instead of a
 * popup dialog. See showTopMessage() in /js/appt/booking-screens.js
 */
.top-message {
  display: none;
  position: fixed;
  top: 55px;
  left: 0;
  right: 0;
  z-index: 1035;
  pointer-events: none;
}
.top-message .top-message-box {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 auto;
  padding: 12px 15px;
  background: #fdecec;
  border-left: 4px solid #d92d20;
  color: #9b1c1c;
  font-size: 15px;
  line-height: 1.4;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}
.top-message.top-message-info .top-message-box {
  background: #ecf3ec;
  border-left-color: #218748;
  color: #17602f;
}
.top-message .top-message-icon {
  font-size: 18px;
  line-height: 1.2;
}
.top-message .top-message-text {
  flex: 1;
  word-break: break-word;
}
.top-message .top-message-text a {
  color: inherit;
  font-weight: bold;
  text-decoration: underline;
}
.top-message .top-message-close {
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 22px;
  line-height: 1;
  padding: 0 2px;
  cursor: pointer;
  opacity: 0.7;
}
.top-message .top-message-close:hover {
  opacity: 1;
}
@media (min-width: 576px) { .top-message .top-message-box { max-width: 540px; } }
@media (min-width: 768px) { .top-message .top-message-box { max-width: 720px; } }
@media (min-width: 992px) { .top-message .top-message-box { max-width: 960px; } }
@media (min-width: 1200px) { .top-message .top-message-box { max-width: 1140px; } }

/* ---------------------------------------------------------------- buttons (NEWLIFE)
 * One shorter height (40px) for RESET, NEXT, CANCEL, SUBMIT and the result buttons
 * (BOOK NEW, UPDATE, CANCEL APPT). Icons that sat at a fixed "top" are centred.
 */
.btn-red-small, .btn-next, .btn-reset, .btn-red, .btn-red-bg, .btn-blue-bg, .btn.btn-action {
  height: 40px;
  padding: 0 14px !important;
  font-size: 16px !important;
  line-height: 38px !important;
  border-radius: 8px !important;
}
.btn-red-small .position-arrow-left,
.btn-next .position-arrow-right {
  top: 50% !important;
  transform: translateY(-50%);
}

/* ---------------------------------------------------------------- CANCEL / SUBMIT bar
 * Hidden until the booking can be submitted (booking-actions.js adds .bk-wait while the
 * page still marks SUBMIT "disabled-btn"). Then: small CANCEL on the left, wide SUBMIT
 * filling the rest, both with an icon. The icon follows the label: NEXT -> arrow, SUBMIT -> check.
 */
.cancel-submit.bk-actions {
  display: flex !important;
  gap: 12px;
  padding: 12px 15px;
  border-top: 1px solid #e3ebe3;
  animation: bk-actions-in 0.2s ease-out;
}
.cancel-submit.bk-actions.bk-wait,
.button-bottom .cancel-submit:not(.bk-actions) {
  /* hidden by default: no flash while the page loads, before booking-actions.js decides */
  display: none !important;
}
@keyframes bk-actions-in {
  from { transform: translateY(6px); opacity: 0; }
  to   { transform: translateY(0);   opacity: 1; }
}
.cancel-submit.bk-actions #cancelBtn {
  flex: 0 0 auto;
  width: auto;
  min-width: 110px;
}
.cancel-submit.bk-actions #submitBtn {
  flex: 1 1 auto;
  width: auto;
  max-width: 420px;
  margin-left: auto;
}
.cancel-submit.bk-actions #cancelBtn::before,
.cancel-submit.bk-actions #submitBtn::before,
.cancel-submit.bk-actions #submitBtn[data-label="next"]::after {
  font-family: FontAwesome;
  font-weight: normal;
  font-size: 15px;
}
.cancel-submit.bk-actions #cancelBtn::before { content: "\f00d"; margin-right: 8px; }               /* fa-times */
.cancel-submit.bk-actions #submitBtn::before { content: "\f274"; margin-right: 8px; }               /* fa-calendar-check-o */
.cancel-submit.bk-actions #submitBtn[data-label="next"]::before { content: none; }
.cancel-submit.bk-actions #submitBtn[data-label="next"]::after { content: "\f061"; margin-left: 8px; } /* fa-arrow-right */
.cancel-submit.bk-actions #cancelBtn:hover { background: #fdecec; }
.cancel-submit.bk-actions #submitBtn:hover { background: #1b733c; border-color: #1b733c; }

/* ---------------------------------------------------------------- one card (NEWLIFE)
 * Salon info, the booking form and the CANCEL / SUBMIT bar are one white card on the
 * tinted page: no tinted gaps between them. The bar is no longer fixed to the bottom
 * of the screen; it sits right under the form, with "Power by NEWLIFEPOS" as the
 * card's last line (moved there by booking-screens.js / booking-actions.js).
 */
main.main-container {
  padding-bottom: 0;
}
main.main-container > .main-content {
  background: #fff;
  flex: 1 0 auto; /* card fills the screen height: CANCEL / SUBMIT + "Power by" sit at the bottom */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
main.main-container .box-content {
  box-shadow: none;
}
main.main-container #divBodyAppt,
main.main-container #divApptResult {
  margin-top: 0 !important;
}
main.main-container #divBodyAppt > .col-12 {
  padding-bottom: 0 !important;
}
main.main-container .button-bottom {
  position: static !important;
  width: auto;
}
main.main-container .button-bottom > .container {
  background: #fff;
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.12);
}

/* ---------------------------------------------------------------- booking result (NEWLIFE)
 * "BOOKING SUCCESSFULLY" in green with a check icon; BOOK NEW / UPDATE / CANCEL APPT with icons.
 * Icons are added here (by what each button does) so the markup of the three booking pages
 * and their dialogs stays as it is.
 */
.bk-success-title {
  color: #218748 !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.bk-success-title::before {
  font-family: FontAwesome;
  font-weight: normal;
  content: "\f058"; /* fa-check-circle */
  font-size: 1.3em;
}
.btn.btn-action[onclick^="bookAnAppointment"]::before,
.btn.btn-action[onclick^="bookNew"]::before,
.btn.btn-action[onclick^="updateAppt"]::before,
.btn.btn-action[onclick^="cancelAppt"]::before {
  font-family: FontAwesome;
  font-weight: normal;
  font-size: 15px;
  margin-right: 8px;
}
.btn.btn-action[onclick^="bookAnAppointment"]::before,
.btn.btn-action[onclick^="bookNew"]::before { content: "\f271"; }    /* fa-calendar-plus-o: BOOK NEW */
.btn.btn-action[onclick^="updateAppt"]::before { content: "\f040"; } /* fa-pencil: UPDATE */
.btn.btn-action[onclick^="cancelAppt"]::before { content: "\f273"; } /* fa-calendar-times-o: CANCEL APPT */
.btn.btn-action {
  width: auto;
  min-width: 150px;
  white-space: nowrap;
}

/* Result buttons in the NEWLIFE colours: BOOK NEW solid green, UPDATE green outline,
   CANCEL APPT red outline (same red as CANCEL / RESET) */
.btn.btn-action[onclick^="bookAnAppointment"],
.btn.btn-action[onclick^="bookNew"] {
  background: #218748 !important;
  border: 1px solid #218748 !important;
  color: #fff !important;
}
.btn.btn-action[onclick^="bookAnAppointment"]:hover,
.btn.btn-action[onclick^="bookNew"]:hover {
  background: #1b733c !important;
  border-color: #1b733c !important;
}
.btn.btn-action[onclick^="updateAppt"] {
  background: #fff !important;
  border: 1px solid #218748 !important;
  color: #218748 !important;
}
.btn.btn-action[onclick^="updateAppt"]:hover {
  background: #ecf3ec !important;
}
.btn.btn-action[onclick^="cancelAppt"] {
  background: #fff !important;
  border: 1px solid #E74F4F !important;
  color: #E74F4F !important;
}
.btn.btn-action[onclick^="cancelAppt"]:hover {
  background: #fdecec !important;
}
