/*
 * Shared layout rules for every page, in both languages. Loaded after style.css / style.ar.css and the coustom files
 * (resources/views/layouts/styles.blade.php), so the same spacing applies to English and Arabic.
 */

/*
 * Page content lines up with the header on every screen size. The theme sets 1rem = 10px, which shrinks
 * Bootstrap's container padding (0.75rem) to 7.5px: text sat 8px from the screen edge on phones while the header
 * sat at 15px. Containers get the same 1.5rem (15px) the theme already uses from 1200px up.
 */
.container,
.container-fluid,
.container-sm,
.container-md,
.container-lg,
.container-xl,
.container-xxl {
  padding-right: 1.5rem;
  padding-left: 1.5rem;
}

/*
 * Footer link lists: the arrow sits on the first line of its link, centred with the text. The theme bottom-aligned
 * a 20px-high arrow against taller text lines, which left every arrow about 4px low (and the Arabic file set its own
 * line heights per screen size).
 */
.footer-area .widget-posts .posts-item li a {
  align-items: flex-start;
}
.footer-area .widget-posts .posts-item li a .icon {
  flex: none;
  position: static;
  line-height: inherit;
}

/*
 * Back to top, in the footer: a red circle centred on the line above the copyright, ringed in the footer's white so
 * the line stops either side of it. The arrow nudges up on hover.
 */
.footer-area .footer-to-top {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--main-color, #DC2626);
  color: #fff;
  box-shadow: 0 0 0 8px #fff, 0 10px 24px -10px rgba(220, 38, 38, .7);
  transform: translate(-50%, -50%);
  transition: background-color .25s ease, box-shadow .25s ease, transform .35s cubic-bezier(.22, 1, .36, 1);
}
.footer-area .footer-to-top svg {
  width: 20px;
  height: 20px;
  transition: transform .35s cubic-bezier(.22, 1, .36, 1);
}
.footer-area .footer-to-top:hover,
.footer-area .footer-to-top:focus-visible {
  color: #fff;
  background: #B91C1C;
  box-shadow: 0 0 0 8px #fff, 0 14px 28px -12px rgba(220, 38, 38, .55);
  transform: translate(-50%, calc(-50% - 3px));
}
.footer-area .footer-to-top:hover svg,
.footer-area .footer-to-top:focus-visible svg {
  transform: translateY(-2px);
}
.footer-area .footer-to-top:focus-visible {
  outline: 2px solid #1F2937;
  outline-offset: 10px;
}
/* The copyright clears the circle's lower half. */
.footer-area .footer-bottom {
  padding-top: 56px;
}
@media (max-width: 767.98px) {
  .footer-area .footer-to-top {
    width: 44px;
    height: 44px;
  }
  .footer-area .footer-bottom {
    padding-top: 42px;
  }
}
/* Narrow phones: the copyright ends above the chat icon (css/chat-launcher.css), which would cover its last words. */
@media (max-width: 480px) {
  .footer-area .footer-bottom {
    padding-bottom: 100px;
  }
}

/*
 * Home page quick links (Search our medical network, Request a medical approval, Raise a complaint): below 992px the
 * icon stacks above the label, so the side margin it uses next to the label on desktop would push it off-centre.
 */
@media (max-width: 991.98px) {
  .service-link .icon.flex-column > i {
    margin-right: 0 !important;
    margin-left: 0 !important;
  }
}

/*
 * In-page dialogs: every confirmation and message (site-dialogs.js, and the form messages that already used
 * SweetAlert2), in the site's colours and type instead of the browser's own boxes. SweetAlert sizes everything in em
 * from a 1rem popup, which is 10px here (the theme's 62.5% root), so the popup sets the base size. Its own rules use
 * :where(), so these plain class selectors take over.
 */
/* Above everything, the chatbot's frame (999999) included, while it asks. */
.swal2-container { z-index: 1000000; }
.swal2-container.swal2-backdrop-show { background: rgba(17, 24, 39, .5); }
.swal2-container .swal2-popup {
  width: 30em;
  padding: 2.2em 2em 2em;
  border-radius: 1.6rem;
  color: #4B5563;
  font-size: 1.6rem;
  box-shadow: 0 2.4rem 6rem -1.6rem rgba(17, 24, 39, .5);
}
.swal2-container .swal2-icon { margin: .2em auto 1em; }
.swal2-container .swal2-title {
  padding: 0;
  color: #1F2937;
  font-size: 1.4em;
  font-weight: 700;
  line-height: 1.35;
}
.swal2-container .swal2-html-container {
  margin: .6em 0 0;
  padding: 0;
  color: #4B5563;
  font-size: 1em;
  line-height: 1.65;
}
.swal2-container .swal2-actions { gap: .75em; width: 100%; margin: 1.7em 0 0; padding: 0; }
.swal2-container .swal2-styled {
  margin: 0;
  padding: .8em 1.6em;
  border-radius: 1em;
  font-size: .95em;
  font-weight: 600;
  line-height: 1.3;
  transition: background-color .2s ease, box-shadow .2s ease;
}
.swal2-container .swal2-styled.swal2-confirm { background-color: #DC2626; }
.swal2-container .swal2-styled.swal2-confirm:hover { background-image: none; background-color: #B91C1C; }
.swal2-container .swal2-styled.swal2-confirm:focus { box-shadow: 0 0 0 3px rgba(220, 38, 38, .35); }
.swal2-container .swal2-styled.swal2-cancel {
  background-color: #fff;
  color: #1F2937;
  box-shadow: inset 0 0 0 1px #D1D5DB;
}
.swal2-container .swal2-styled.swal2-cancel:hover { background-image: none; background-color: #F3F4F6; }
.swal2-container .swal2-styled.swal2-cancel:focus { box-shadow: inset 0 0 0 1px #D1D5DB, 0 0 0 3px rgba(17, 24, 39, .22); }
/* Icons in the site's colours: navy questions, red warnings and errors, a calmer green for success. */
.swal2-container .swal2-icon.swal2-question,
.swal2-container .swal2-icon.swal2-info { border-color: rgba(17, 24, 39, .22); color: #1F2937; }
.swal2-container .swal2-icon.swal2-warning { border-color: rgba(220, 38, 38, .3); color: #DC2626; }
.swal2-container .swal2-icon.swal2-error { border-color: rgba(220, 38, 38, .45); color: #DC2626; }
.swal2-container .swal2-icon.swal2-error [class^="swal2-x-mark-line"] { background-color: #DC2626; }
.swal2-container .swal2-icon.swal2-success { border-color: #1f9d6b; color: #1f9d6b; }
.swal2-container .swal2-icon.swal2-success .swal2-success-ring { border-color: rgba(31, 157, 107, .3); }
.swal2-container .swal2-icon.swal2-success [class^="swal2-success-line"] { background-color: #1f9d6b; }
/* Phones: the buttons stack at full width, the action on top. */
@media (max-width: 479.98px) {
  .swal2-container .swal2-popup { padding: 1.8em 1.4em 1.4em; }
  .swal2-container .swal2-actions { flex-direction: column-reverse; }
  .swal2-container .swal2-styled { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .swal2-container .swal2-popup.swal2-show,
  .swal2-container .swal2-popup.swal2-hide { animation: none; }
}
