/* Frontend mobile adaptations + fixed bottom nav */

.fe-mobile-bottom-nav,
.fe-home-fab {
  display: none;
}

@media (max-width: 991.98px) {
  .fe-home-fab {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    right: 16px;
    bottom: calc(78px + env(safe-area-inset-bottom, 0px));
    z-index: 1210;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #2C9CDB;
    color: #FFFFFF !important;
    text-decoration: none !important;
    box-shadow: 0 8px 20px rgba(44, 156, 219, 0.45);
    -webkit-tap-highlight-color: transparent;
  }

  .fe-home-fab i {
    font-size: 22px;
    line-height: 1;
  }

  .fe-home-fab.is-active,
  .fe-home-fab:active {
    background: #1E86C2;
  }

  .fe-mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1200;
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    min-height: 64px;
    padding: 6px 2px calc(6px + env(safe-area-inset-bottom, 0px));
    background: #1E293B;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 -6px 20px rgba(16, 24, 40, 0.2);
  }

  .fe-mobile-bottom-nav__item {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 2px;
    color: #94A3B8;
    text-decoration: none !important;
    font-size: 9px;
    font-weight: 600;
    line-height: 1.15;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
  }

  .fe-mobile-bottom-nav__item i {
    font-size: 17px;
  }

  .fe-mobile-bottom-nav__item span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .fe-mobile-bottom-nav__item.is-active {
    color: #FFFFFF;
  }

  .fe-mobile-bottom-nav__item.is-active i {
    color: #2C9CDB;
  }

  body.pm-home {
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
  }

  #pm-header .pm-main-menu-item .pm-main-navigation {
    display: none !important;
  }

  #pm-header .pm-header-btn {
    display: none !important;
  }

  #pm-header .pm-logo img {
    height: 34px !important;
  }

  #pm-header .fe-header-brand {
    display: flex !important;
    align-items: center !important;
    gap: 8px;
    float: left;
    max-width: calc(100% - 110px);
  }

  #pm-header .fe-header-back {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(132, 204, 71, 0.14);
    color: #84CC47 !important;
    text-decoration: none !important;
    -webkit-tap-highlight-color: transparent;
  }

  #pm-header .fe-header-back:active {
    background: rgba(132, 204, 71, 0.26);
  }

  #pm-header .fe-header-back i {
    font-size: 1rem;
    line-height: 1;
  }

  /* Top-right bar: [install] [hamburger] */
  #pm-header .pm-mobile_menu {
    position: static !important;
  }

  #pm-header .fe-mobile-top-actions {
    position: absolute !important;
    top: 8px !important;
    right: 12px !important;
    z-index: 30;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px;
  }

  #pm-header .fe-mobile-top-actions .pm-mobile_menu_button,
  #pm-header .pm-mobile_menu_button {
    position: static !important;
    top: auto !important;
    right: auto !important;
    width: 42px !important;
    height: 42px !important;
    line-height: 42px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    font-size: 22px !important;
  }

  #pm-header .fe-pwa-install {
    position: static !important;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(44, 156, 219, 0.12);
    color: #2C9CDB;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    box-shadow: none;
    flex: 0 0 auto;
    order: 0;
  }

  #pm-header .fe-mobile-top-actions .pm-mobile_menu_button {
    order: 1;
  }

  #pm-header .fe-pwa-install[hidden] {
    display: none !important;
  }

  #pm-header .fe-pwa-install:active {
    background: rgba(44, 156, 219, 0.22);
  }

  .pm-main-header.pm-sticky-menu .fe-pwa-install {
    background: rgba(44, 156, 219, 0.2);
    color: #FFFFFF;
  }

  .fe-pwa-prompt {
    position: fixed;
    inset: 0;
    z-index: 1400;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px));
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
  }

  .fe-pwa-prompt.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .fe-pwa-prompt[hidden] {
    display: none !important;
  }

  .fe-pwa-prompt__sheet {
    width: 100%;
    max-width: 420px;
    background: #1A1A1A;
    border: 1px solid #2A2A2A;
    border-radius: 22px;
    padding: 22px 18px 16px;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.45);
    transform: translateY(18px);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .fe-pwa-prompt.is-open .fe-pwa-prompt__sheet {
    transform: translateY(0);
  }

  .fe-pwa-prompt__panel[hidden] {
    display: none !important;
  }

  .fe-pwa-prompt__sheet h3 {
    margin: 0 0 8px;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.25;
    color: #FFFFFF;
  }

  .fe-pwa-prompt__text,
  .fe-pwa-prompt__steps li {
    margin: 0;
    color: #A3A3A3;
    font-size: 0.95rem;
    line-height: 1.45;
  }

  .fe-pwa-prompt__steps {
    margin: 12px 0 0;
    padding-left: 1.2rem;
  }

  .fe-pwa-prompt__steps li + li {
    margin-top: 6px;
  }

  .fe-pwa-prompt__actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
  }

  .fe-pwa-prompt__btn {
    flex: 1;
    min-height: 46px;
    border: 0;
    border-radius: 12px;
    font-size: 0.98rem;
    font-weight: 700;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
  }

  .fe-pwa-prompt__btn:active {
    transform: scale(0.98);
  }

  .fe-pwa-prompt__btn--primary {
    background: #84CC47;
    color: #000000;
  }

  .fe-pwa-prompt__btn--primary:active {
    background: #6AAF2E;
  }

  .fe-pwa-prompt__btn--ghost {
    background: #333333;
    color: #FFFFFF;
  }

  .fe-pwa-prompt__btn--ghost:active {
    background: #444444;
  }

  .fe-pwa-prompt__btn--full {
    flex: 1 1 100%;
  }

  html.fe-pwa-prompt-open,
  html.fe-pwa-prompt-open body {
    overflow: hidden;
  }

  .main,
  .main[data-mobile-height] {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .container {
    max-width: 100% !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .form-control,
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="password"],
  select {
    font-size: 16px !important;
    min-height: 44px;
  }

  .btn,
  button.btn {
    min-height: 44px;
  }

  img {
    max-width: 100%;
    height: auto;
  }

  .language-label,
  #m-main-nav,
  #m-main-nav a,
  #m-main-nav a.language-label,
  .pm-mobile_menu_content .pm-mobile-main-navigation .navbar-nav li a,
  .fe-mobile-bottom-nav__item,
  .fe-mobile-bottom-nav__item span {
    text-transform: none !important;
  }

  #m-main-nav a,
  .pm-mobile_menu_content .pm-mobile-main-navigation .navbar-nav li a {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    text-align: left !important;
  }

  #m-main-nav a > i,
  #m-main-nav a > .fe-menu-flag,
  .pm-mobile_menu_content .pm-mobile-main-navigation .navbar-nav li a > i {
    flex: 0 0 22px;
    width: 22px;
    text-align: center;
    font-size: 1rem;
    color: #84CC47;
    line-height: 1;
  }

  #m-main-nav a > .fe-menu-flag {
    font-style: normal;
    font-size: 1.05rem;
  }

  /* Home CTA buttons: full-width mobile with icons */
  .fe-home-actions {
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100%;
    gap: 14px;
    margin-top: 12px;
  }

  .fe-home-actions .fe-action-btn,
  .fe-home-actions .ei-banner-btn {
    width: 100% !important;
    margin: 0 !important;
  }

  #pm-banner-1 .pm-banner-content .pm-banner-text .fe-home-actions .fe-action-link,
  #pm-banner-1 .pm-banner-content .pm-banner-text .fe-home-actions .ei-banner-btn a,
  .pm-banner-section-1 .pm-banner-content .pm-banner-text .fe-home-actions a.fe-action-link {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 56px !important;
    padding: 16px 20px !important;
    line-height: 1.2 !important;
    border-radius: 16px !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    text-align: center !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
    box-shadow: 0 8px 18px rgba(30, 41, 59, 0.12);
    overflow: hidden;
  }

  #pm-banner-1 .pm-banner-content .pm-banner-text .fe-home-actions .fe-action-link i,
  .pm-banner-section-1 .pm-banner-content .pm-banner-text .fe-home-actions a.fe-action-link i {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 1.35em;
    font-size: 1.2rem !important;
    line-height: 1 !important;
  }

  #pm-banner-1 .pm-banner-content .pm-banner-text .fe-home-actions .fe-action-link span,
  .pm-banner-section-1 .pm-banner-content .pm-banner-text .fe-home-actions a.fe-action-link span {
    display: inline !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
  }

  .fe-home-actions .fe-action-btn:last-child .fe-action-link {
    background: #1E293B !important;
    color: #fff !important;
  }

  #pm-banner-1.pm-banner-section-1 {
    padding: 88px 0 24px !important;
    overflow-x: hidden !important;
  }

  #pm-banner-1 .pm-banner-content,
  #pm-banner-1 .pm-banner-text {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  /* Hero image: flow under copy, above CTAs */
  #pm-banner-1 .pm-banenr-img,
  .pm-banner-section-1 .pm-banner-content .pm-banenr-img {
    display: flex !important;
    position: static !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 4px auto 16px !important;
    padding: 0 !important;
    justify-content: center !important;
    align-items: center !important;
    pointer-events: none;
  }

  #pm-banner-1 .pm-banenr-img img,
  .pm-banner-section-1 .pm-banner-content .pm-banenr-img img {
    display: block !important;
    width: min(72vw, 280px) !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 38vh !important;
    object-fit: contain !important;
    margin: 0 auto !important;
  }

  #pm-banner-1 .pm-banner-text h2 {
    font-size: 1.55rem !important;
    line-height: 1.25 !important;
  }

  #pm-banner-1 .pm-banner-text p {
    font-size: 0.95rem !important;
  }

  #pm-banner-1 .vedioPreview,
  #pm-banner-1 .pm-banenr-vedio {
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 16px;
    justify-content: center !important;
  }

  #pm-banner-1 .vedioPreview video,
  #pm-banner-1 #preview {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 12px;
  }

  #pm-banner-1 .row > .d-flex {
    flex-direction: column !important;
  }

  /* Pre-registered / return visitor form */
  .fe-prereg-page.custom-css-step,
  .custom-css-step.fe-prereg-page {
    padding-top: 72px !important;
    padding-bottom: 24px !important;
  }

  .custom-prereg .fe-prereg-card,
  .custom-prereg .card.fe-prereg-card {
    margin-top: 12px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  .custom-prereg .card-body {
    padding: 0 !important;
  }

  .fe-prereg-heading {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
  }

  .fe-prereg-heading__icon {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(44, 156, 219, 0.12);
    color: #2C9CDB;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
  }

  .custom-prereg .card .card-body .left-side h4,
  .fe-prereg-heading h4 {
    font-size: 1.25rem !important;
    line-height: 1.3 !important;
    margin: 0 !important;
    color: #1E293B !important;
    font-weight: 700 !important;
  }

  .custom-prereg .card .card-body .left-side {
    max-width: 100% !important;
    width: 100% !important;
    flex: 0 0 100% !important;
  }

  .custom-prereg .card .card-body .left-side .heading {
    font-size: 0.85rem !important;
    margin-bottom: 8px;
    display: block;
  }

  .fe-prereg-input {
    position: relative;
  }

  .fe-prereg-input > i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94A3B8;
    font-size: 0.95rem;
    pointer-events: none;
    z-index: 2;
  }

  .fe-prereg-input .form-control,
  .custom-prereg .card .card-body .left-side .fe-prereg-input .form-control {
    padding-left: 42px !important;
    height: 52px !important;
    min-height: 52px !important;
    border-radius: 14px !important;
    font-size: 16px !important;
  }

  .fe-prereg-actions {
    margin-top: 20px !important;
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
  }

  .fe-prereg-actions > [class*="col-"] {
    flex: 1 1 0;
    max-width: none;
    padding-left: 0;
    padding-right: 0;
    width: auto;
  }

  .fe-prereg-btn,
  .custom-prereg .card .card-body .left-side .fe-prereg-btn.btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    float: none !important;
    width: 100% !important;
    min-height: 52px !important;
    padding: 12px 14px !important;
    border-radius: 14px !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    white-space: nowrap;
  }

  .fe-prereg-btn i {
    font-size: 0.95rem;
    line-height: 1;
  }

  .fe-prereg-image,
  .custom-prereg .card .card-body .fe-prereg-image.right-image {
    display: flex !important;
    justify-content: center;
    max-width: 100% !important;
    width: 100% !important;
    flex: 0 0 100% !important;
    margin: 8px auto 18px !important;
    order: -1;
  }

  .fe-prereg-image img,
  .custom-prereg .card .card-body .fe-prereg-image img {
    width: min(70vw, 240px) !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 28vh !important;
    object-fit: contain !important;
  }

  .custom-prereg .save > .row {
    display: flex;
    flex-direction: column;
  }

  /* Checkout result / ID card */
  .fe-checkout-page .fe-checkout-result {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    margin-top: 16px;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .fe-checkout-page .fe-checkout-result .card,
  .fe-checkout-page .fe-checkout-result .card-body {
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
  }

  .fe-checkout-page .id-card-holder,
  .fe-checkout-page .img-cards {
    width: 100% !important;
    max-width: 100% !important;
    display: flex;
    justify-content: center;
  }

  .fe-checkout-page .id-card {
    width: 100% !important;
    max-width: 340px !important;
    margin: 0 auto !important;
  }

  .fe-checkout-page .fe-checkout-confirm {
    display: flex;
    justify-content: center;
    margin-top: 16px !important;
  }

  .fe-checkout-page .fe-checkout-confirm .checkout.fe-prereg-btn,
  .fe-checkout-page a.checkout.fe-prereg-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100% !important;
    max-width: 340px;
    min-height: 52px !important;
    line-height: 1.2 !important;
    padding: 14px 18px !important;
    border-radius: 14px !important;
    text-decoration: none !important;
  }

  .fe-checkout-page .not-data {
    font-size: 0.95rem;
    padding: 12px 8px;
  }
}

/* Desktop/tablet: keep icons inline on the same buttons */
@media (min-width: 992px) {
  .fe-home-actions .fe-action-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
  }

  .fe-home-actions .fe-action-link i {
    font-size: 1rem;
  }
}
