/*
 * Ehliyethane Mobil 1.68 - Ezan Vakti app canvas on an ordinary WP page.
 * IMPORTANT: Only enabled with the eh-ezan-app-canvas body class.
 * Native OS status and navigation bars are intentionally left to Android.
 */
html:has(body.eh-ezan-app-canvas) {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: clip !important;
  background: #f4f8f8 !important;
}
body.eh-ezan-app-canvas {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: 100dvh !important;
  overflow-x: clip !important;
  background: #f4f8f8 !important;
}
body.eh-ezan-app-canvas *,
body.eh-ezan-app-canvas *::before,
body.eh-ezan-app-canvas *::after {
  box-sizing: border-box;
}
/* WordPress masthead, footer and sidebars must not reserve space in the app. */
body.eh-ezan-app-canvas #wpadminbar,
body.eh-ezan-app-canvas .skip-content,
body.eh-ezan-app-canvas #site-header,
body.eh-ezan-app-canvas #site-footer,
body.eh-ezan-app-canvas #sidebar-left,
body.eh-ezan-app-canvas #sidebar-right,
body.eh-ezan-app-canvas #sidebar-above-main,
body.eh-ezan-app-canvas #sidebar-below-header,
body.eh-ezan-app-canvas #breadcrumbs,
body.eh-ezan-app-canvas .post-header,
body.eh-ezan-app-canvas .featured-image,
body.eh-ezan-app-canvas .post-byline,
body.eh-ezan-app-canvas .post-meta,
body.eh-ezan-app-canvas #comments,
body.eh-ezan-app-canvas .comments,
body.eh-ezan-app-canvas .pagination {
  display: none !important;
}
/* Mission News theme's 5.556% gutters, floating grid columns, page borders. */
body.eh-ezan-app-canvas #overflow-container,
body.eh-ezan-app-canvas #max-width,
body.eh-ezan-app-canvas .overflow-container,
body.eh-ezan-app-canvas .max-width,
body.eh-ezan-app-canvas .content-container,
body.eh-ezan-app-canvas .layout-container,
body.eh-ezan-app-canvas #main,
body.eh-ezan-app-canvas .main,
body.eh-ezan-app-canvas #loop-container,
body.eh-ezan-app-canvas .loop-container,
body.eh-ezan-app-canvas .loop-container > .entry,
body.eh-ezan-app-canvas .loop-container > .page,
body.eh-ezan-app-canvas .loop-container article,
body.eh-ezan-app-canvas .post-content,
body.eh-ezan-app-canvas .entry-content {
  display: block !important;
  position: static !important;
  float: none !important;
  clear: none !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}
body.eh-ezan-app-canvas .content-container::before,
body.eh-ezan-app-canvas .content-container::after,
body.eh-ezan-app-canvas .layout-container::before,
body.eh-ezan-app-canvas .layout-container::after {
  display: none !important;
  content: none !important;
}
/* Remove BOTH nested edges: theme wrapper and shortcode's 28px padding. */
body.eh-ezan-app-canvas .ev-app,
body.eh-ezan-app-canvas .evsm,
body.eh-ezan-app-canvas .evsm-app-screen,
body.eh-ezan-app-canvas .evsm-account,
body.eh-ezan-app-canvas .evsp {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  border-left: 0 !important;
  border-right: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
body.eh-ezan-app-canvas .ev-app {
  margin-top: 0 !important;
  border: 0 !important;
  padding-top: 0 !important;
  padding-bottom: max(0px,env(safe-area-inset-bottom)) !important;
  min-height: 100dvh !important;
  background: #f4f8f8 !important;
}
body.eh-ezan-app-canvas .ev-app > .ev-head,
body.eh-ezan-app-canvas .ev-app > .ev-weather {
  display: none !important;
}
body.eh-ezan-app-canvas .ev-app > .ev-countdown {
  display: block;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
}
body.eh-ezan-app-canvas .ev-app > .ev-prayers,
body.eh-ezan-app-canvas .ev-app > .ev-tools {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
body.eh-ezan-app-canvas .ev-app > .ev-prayers > *,
body.eh-ezan-app-canvas .ev-app > .ev-tools > * {
  min-width: 0;
}
body.eh-ezan-app-canvas .ev-app > .ev-settings-page {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}
body.eh-ezan-app-canvas .ev-app > .ev-panel {
  max-width: none !important;
}
body.eh-ezan-app-canvas #apk-create-native-banner-slot:not([data-apk-ad-ready="1"]) {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}
@media (max-width:720px) {
  body.eh-ezan-app-canvas .ev-app > .ev-prayers {
    grid-template-columns: repeat(3,minmax(0,1fr));
  }
  body.eh-ezan-app-canvas .ev-app > .ev-tools {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
}


/* Ehliyethane Mobil v1.69 - independent edge-to-edge fallback.
   The shortcode can be injected dynamically; do not depend on a theme
   body_class, ?ev_apk_home=1, or an early wp_enqueue_scripts check.
   Only the actual prayer home screen on mobile triggers this reset.
   Keep Android's OS status/nav bars and any native ad that loaded. */
@media screen and (max-width:1024px) {
  html:has(.ev-app:not(.ev-settings-shortcode)) {
    margin:0!important;padding:0!important;width:100%!important;
    max-width:100%!important;overflow-x:clip!important;
    background:#f4f8f8!important;
  }
  body:has(.ev-app:not(.ev-settings-shortcode)) {
    margin:0!important;padding:0!important;width:100%!important;
    max-width:100%!important;overflow-x:clip!important;
    background:#f4f8f8!important;
  }
  /* Remove all WordPress frame gutters even if no special body class was
     assigned (shortcode in a block, dynamic page, or alternate APK URL). */
  body:has(.ev-app:not(.ev-settings-shortcode)) :is(
    #wpadminbar,.skip-content,#site-header,#site-footer,
    #sidebar-left,#sidebar-right,#sidebar-above-main,#sidebar-below-header,
    #breadcrumbs,.post-header,.featured-image,.post-byline,.post-meta
  ) {display:none!important}
  body:has(.ev-app:not(.ev-settings-shortcode)) :is(
    #overflow-container,#max-width,.overflow-container,.max-width,
    .content-container,.layout-container,#main,.main,
    #loop-container,.loop-container,.loop-container>.entry,
    .loop-container>.page,.loop-container article,.post-content,.entry-content
  ) {
    display:block!important;float:none!important;clear:none!important;
    position:static!important;width:100%!important;max-width:none!important;
    min-width:0!important;min-height:0!important;height:auto!important;
    margin:0!important;padding:0!important;border:0!important;
    border-radius:0!important;box-shadow:none!important;
    background:transparent!important;
  }
  body:has(.ev-app:not(.ev-settings-shortcode)) :is(
    .content-container,.layout-container,.loop-container
  )::before,
  body:has(.ev-app:not(.ev-settings-shortcode)) :is(
    .content-container,.layout-container,.loop-container
  )::after {content:none!important;display:none!important}

  /* The 28px Ezan Vakti padding + 20px margin were still visible in the
     latest screenshot. Remove them on the app itself, not only on its theme. */
  .ev-app:not(.ev-settings-shortcode) {
    display:block!important;position:relative!important;
    box-sizing:border-box!important;
    margin:0!important;padding:0 0 env(safe-area-inset-bottom,0px)!important;
    border:0!important;border-radius:0!important;box-shadow:none!important;
    width:100%!important;max-width:none!important;min-width:0!important;
    min-height:100dvh!important;
    background:#f4f8f8!important;
  }
  .ev-app:not(.ev-settings-shortcode) > .ev-countdown {
    display:block!important;width:100%!important;max-width:none!important;
    margin:0!important;border:0!important;border-radius:0!important;
    box-shadow:none!important;
  }
  .ev-app:not(.ev-settings-shortcode) > :is(
    .ev-permission-warning,.ev-prayers,.ev-tools,.ev-settings-page
  ) {width:100%!important;max-width:none!important;min-width:0!important;
     margin-left:0!important;margin-right:0!important}
  .ev-app:not(.ev-settings-shortcode) > .ev-head,
  .ev-app:not(.ev-settings-shortcode) > .ev-weather {display:none!important}
  .ev-app:not(.ev-settings-shortcode) > .ev-prayers {
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
  .ev-app:not(.ev-settings-shortcode) > .ev-tools {
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  .ev-app:not(.ev-settings-shortcode) > .ev-prayers > *,
  .ev-app:not(.ev-settings-shortcode) > .ev-tools > * {min-width:0!important}
  /* No empty ad placeholder; a loaded ad keeps its normal flow height. */
  #apk-create-native-banner-slot:not([data-apk-ad-ready="1"]) {
    display:none!important;height:0!important;min-height:0!important;
    max-height:0!important;margin:0!important;padding:0!important;
  }
}


/* Ezan Vakti v1.10.64 / Ehliyethane Mobil v1.70
   Approved round-corner mockup, mobile home ONLY.  The page stays full-width;
   tiny optical insets belong to cards, not to the WordPress theme frame.
   No DOM, navigation, account, permission or advertisement behavior changes. */
@media screen and (max-width:1024px) {
  body:has(.ev-app:not(.ev-settings-open):not(.ev-settings-shortcode)) .ev-app:not(.ev-settings-open):not(.ev-settings-shortcode) {
    --ev-home-inset: clamp(6px,1.75vw,10px);
    width:100%!important;max-width:none!important;min-width:0!important;
    margin:0!important;
    padding:var(--ev-home-inset) var(--ev-home-inset) calc(96px + env(safe-area-inset-bottom,0px))!important;
    border:0!important;border-radius:0!important;box-shadow:none!important;
    background:#f4f8f8!important;overflow-x:clip!important;
  }
  body:has(.ev-app:not(.ev-settings-open):not(.ev-settings-shortcode)) .ev-app:not(.ev-settings-open):not(.ev-settings-shortcode) > .ev-countdown {
    display:flex!important;flex-direction:column!important;justify-content:space-between!important;
    align-items:center!important;
    width:100%!important;max-width:none!important;min-width:0!important;
    min-height:clamp(265px,70vw,370px)!important;
    margin:0!important;padding:16px clamp(12px,4vw,26px) 22px!important;
    border:0!important;
    border-radius:clamp(25px,7.4vw,38px)!important;
    background-color:var(--ev-accent,#087d79)!important;
    box-shadow:none!important;overflow:hidden!important;
  }
  body:has(.ev-app:not(.ev-settings-open):not(.ev-settings-shortcode)) .ev-app:not(.ev-settings-open):not(.ev-settings-shortcode) .ev-countdown::after{
    right:-4%!important;top:5%!important;font-size:clamp(160px,56vw,245px)!important;
    opacity:.085!important;
  }
  body:has(.ev-app:not(.ev-settings-open):not(.ev-settings-shortcode)) .ev-app:not(.ev-settings-open):not(.ev-settings-shortcode) .ev-morning-notice:not([hidden]) {
    align-self:flex-start!important;flex:0 0 auto!important;
    padding:6px 12px!important;margin:0 0 10px!important;
    border-radius:999px!important;background:#ffffff1b!important;
    border:1px solid #ffffff55!important;font-size:clamp(11px,3vw,13px)!important;
  }
  body:has(.ev-app:not(.ev-settings-open):not(.ev-settings-shortcode)) .ev-app:not(.ev-settings-open):not(.ev-settings-shortcode) .ev-morning-notice strong {
    font-size:1.08em!important;
  }
  body:has(.ev-app:not(.ev-settings-open):not(.ev-settings-shortcode)) .ev-app:not(.ev-settings-open):not(.ev-settings-shortcode) .ev-countdown > .ev-date {
    margin:3px 0 7px!important;font-size:clamp(14px,3.9vw,18px)!important;
    line-height:1.35!important;opacity:1!important;
  }
  body:has(.ev-app:not(.ev-settings-open):not(.ev-settings-shortcode)) .ev-app:not(.ev-settings-open):not(.ev-settings-shortcode) .ev-countdown > .ev-hijri {
    margin:0 0 7px!important;font-size:clamp(12px,3.4vw,15px)!important;
    line-height:1.35!important;opacity:.87!important;
  }
  body:has(.ev-app:not(.ev-settings-open):not(.ev-settings-shortcode)) .ev-app:not(.ev-settings-open):not(.ev-settings-shortcode) .ev-countdown > .ev-next {
    margin:8px 0 3px!important;padding:0!important;
    color:#fff!important;font-family:Georgia, 'Times New Roman', serif!important;
    font-size:clamp(21px,5.5vw,30px)!important;font-weight:500!important;line-height:1.2!important;
  }
  body:has(.ev-app:not(.ev-settings-open):not(.ev-settings-shortcode)) .ev-app:not(.ev-settings-open):not(.ev-settings-shortcode) .ev-countdown > .ev-clock {
    margin:2px 0 8px!important;font-size:clamp(41px,11.6vw,69px)!important;
    line-height:1.13!important;letter-spacing:.01em!important;
    font-weight:300!important;white-space:nowrap!important;
  }
  body:has(.ev-app:not(.ev-settings-open):not(.ev-settings-shortcode)) .ev-app:not(.ev-settings-open):not(.ev-settings-shortcode) .ev-countdown > .ev-target {
    margin:8px 0 0!important;font-size:clamp(14px,3.8vw,19px)!important;
    line-height:1.4!important;opacity:.94!important;
  }
  body:has(.ev-app:not(.ev-settings-open):not(.ev-settings-shortcode)) .ev-app:not(.ev-settings-open):not(.ev-settings-shortcode) > .ev-permission-warning:not([hidden]) {
    display:flex!important;flex-direction:column!important;align-items:flex-start!important;
    justify-content:center!important;gap:14px!important;
    margin:9px 0 0!important;padding:16px clamp(14px,5.5vw,24px)!important;
    min-height:0!important;width:100%!important;max-width:none!important;
    background:#fff1d7!important;color:#663d00!important;
    border:1px solid #dfb65c!important;border-radius:clamp(22px,6.5vw,32px)!important;
    animation:none!important;box-shadow:none!important;
  }
  body:has(.ev-app:not(.ev-settings-open):not(.ev-settings-shortcode)) .ev-app:not(.ev-settings-open):not(.ev-settings-shortcode) .ev-permission-warning-text {
    width:100%!important;min-width:0!important;
    font-size:clamp(14px,3.8vw,18px)!important;line-height:1.52!important;
    font-weight:700!important;animation:none!important;
  }
  body:has(.ev-app:not(.ev-settings-open):not(.ev-settings-shortcode)) .ev-app:not(.ev-settings-open):not(.ev-settings-shortcode) > .ev-permission-warning button {
    max-width:100%!important;min-height:44px!important;
    padding:10px 15px!important;margin:0!important;
    border-radius:17px!important;background:#fff!important;color:#1b5553!important;
    font-weight:700!important;white-space:normal!important;
  }
  body:has(.ev-app:not(.ev-settings-open):not(.ev-settings-shortcode)) .ev-app:not(.ev-settings-open):not(.ev-settings-shortcode) > .ev-prayers {
    display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:8px!important;width:100%!important;max-width:none!important;min-width:0!important;
    margin:9px 0 0!important;padding:0!important;
  }
  body:has(.ev-app:not(.ev-settings-open):not(.ev-settings-shortcode)) .ev-app:not(.ev-settings-open):not(.ev-settings-shortcode) > .ev-prayers > .ev-prayer {
    display:flex!important;flex-direction:column!important;justify-content:center!important;
    align-items:center!important;min-width:0!important;min-height:90px!important;
    margin:0!important;padding:12px 3px!important;
    border-radius:clamp(17px,5.5vw,23px)!important;
    border:1px solid #deebea!important;background:#fff!important;
    box-shadow:none!important;
  }
  body:has(.ev-app:not(.ev-settings-open):not(.ev-settings-shortcode)) .ev-app:not(.ev-settings-open):not(.ev-settings-shortcode) > .ev-prayers > .ev-prayer.active {
    border-color:var(--ev-accent,#087d79)!important;background:#e1f3ed!important;
  }
  body:has(.ev-app:not(.ev-settings-open):not(.ev-settings-shortcode)) .ev-app:not(.ev-settings-open):not(.ev-settings-shortcode) .ev-prayer span {
    font-size:clamp(12px,3.25vw,16px)!important;line-height:1.35!important;
  }
  body:has(.ev-app:not(.ev-settings-open):not(.ev-settings-shortcode)) .ev-app:not(.ev-settings-open):not(.ev-settings-shortcode) .ev-prayer strong {
    margin-top:4px!important;font-size:clamp(20px,6vw,29px)!important;
    line-height:1.18!important;white-space:nowrap!important;
  }
  body:has(.ev-app:not(.ev-settings-open):not(.ev-settings-shortcode)) .ev-app:not(.ev-settings-open):not(.ev-settings-shortcode) > .ev-tools {
    width:100%!important;max-width:none!important;margin:12px 0!important;
    gap:8px!important;
  }
  /* Keep the selected menu structure, but ensure pill edges match the mockup.
     The middle highlighted item stays circular and interactive. */
  body:has(.ev-app:not(.ev-settings-open):not(.ev-settings-shortcode)) #evs-mobile-menu.evs-mobile-nav {
    border-radius:999px!important;
    box-shadow:0 9px 28px #142d4e23!important;
  }
  body:has(.ev-app:not(.ev-settings-open):not(.ev-settings-shortcode)) #evs-mobile-menu.evs-mobile-nav > :not(.evs-menu-accent):not(.evs-menu-panel) {
    border-radius:clamp(16px,5vw,24px)!important;
  }
  body:has(.ev-app:not(.ev-settings-open):not(.ev-settings-shortcode)) #evs-mobile-menu.evs-mobile-nav > .evs-menu-accent {
    border-radius:50%!important;
  }
}
@media screen and (max-width:360px) {
  body:has(.ev-app:not(.ev-settings-open):not(.ev-settings-shortcode)) .ev-app:not(.ev-settings-open):not(.ev-settings-shortcode) > .ev-countdown {
    padding-inline:10px!important;
  }
  body:has(.ev-app:not(.ev-settings-open):not(.ev-settings-shortcode)) .ev-app:not(.ev-settings-open):not(.ev-settings-shortcode) > .ev-prayers {gap:6px!important;}
  body:has(.ev-app:not(.ev-settings-open):not(.ev-settings-shortcode)) .ev-app:not(.ev-settings-open):not(.ev-settings-shortcode) .ev-prayer strong{font-size:clamp(18px,6.1vw,23px)!important;}
}
@media screen and (max-width:420px) {
  body:has(.ev-app:not(.ev-settings-open):not(.ev-settings-shortcode)) #evs-mobile-menu.evs-mobile-nav > :not(.evs-menu-accent):not(.evs-menu-panel) {
    font-size:clamp(10px,2.8vw,12px)!important;
    overflow-wrap:normal!important;
    white-space:nowrap!important;
  }
}


/* v1.10.65 / theme v1.71 – robust edge-to-edge mobile Ezan Vakti landing.
   The rounded cards remain oval; only the *outer WordPress wrappers* lose gutters.
   No changes to settings, profiles, sub-pages, ads or the native Android bars. */
@media screen and (max-width:1024px) {
  html:has(body .ev-app:not(.ev-settings-open):not(.ev-settings-shortcode)),
  body:has(.ev-app:not(.ev-settings-open):not(.ev-settings-shortcode)) {
    box-sizing:border-box!important; margin:0!important; padding:0!important;
    width:100%!important;max-width:100%!important;overflow-x:clip!important;
    background:#f4f8f8!important;
  }
  /* Reset the ancestry, including block themes and page builders. An ancestor
     matches only when it actually contains this home screen. */
  body:has(.ev-app:not(.ev-settings-open):not(.ev-settings-shortcode))
    :is(div,section,main,article):has(.ev-app:not(.ev-settings-open):not(.ev-settings-shortcode)):not(.ev-app) {
    box-sizing:border-box!important; min-width:0!important; width:100%!important;
    max-width:none!important;margin:0!important;padding:0!important;
    border:0!important;box-shadow:none!important;
  }
  body:has(.ev-app:not(.ev-settings-open):not(.ev-settings-shortcode))
    .ev-app:not(.ev-settings-open):not(.ev-settings-shortcode) {
    box-sizing:border-box!important;
    --ev-home-inset:6px!important;
    width:100vw!important; max-width:100vw!important;
    min-width:0!important; margin:0 calc(50% - 50vw)!important;
    padding:6px 6px calc(96px + env(safe-area-inset-bottom,0px))!important;
    border:0!important;border-radius:0!important;
    box-shadow:none!important;background:#f4f8f8!important;
  }
  /* Keep the user-approved rounded cards, even after older fullbleed resets. */
  body:has(.ev-app:not(.ev-settings-open):not(.ev-settings-shortcode))
    .ev-app:not(.ev-settings-open):not(.ev-settings-shortcode) > .ev-countdown {
    width:100%!important;max-width:100%!important;margin:0!important;
    border-radius:clamp(25px,7.4vw,38px)!important;
  }
  body:has(.ev-app:not(.ev-settings-open):not(.ev-settings-shortcode))
    .ev-app:not(.ev-settings-open):not(.ev-settings-shortcode) > .ev-permission-warning:not([hidden]) {
    width:100%!important;max-width:100%!important;margin:9px 0 0!important;
    border-radius:clamp(22px,6.5vw,32px)!important;
  }
  body:has(.ev-app:not(.ev-settings-open):not(.ev-settings-shortcode))
    .ev-app:not(.ev-settings-open):not(.ev-settings-shortcode) > .ev-prayers {
    width:100%!important;max-width:100%!important;margin:9px 0 0!important;
  }
  body:has(.ev-app:not(.ev-settings-open):not(.ev-settings-shortcode))
    .ev-app:not(.ev-settings-open):not(.ev-settings-shortcode) > .ev-prayers > .ev-prayer {
    border-radius:clamp(17px,5.5vw,23px)!important;
  }
}
