/* ==========================================================================
   I PAW END-USER APPLICATION STYLESHEET (assets/css/style.css)
   ========================================================================== */

html {
      font-size: 17.5px;
    }
    * {
      box-sizing: border-box;
      font-family: 'Cairo', 'Tajawal', sans-serif;
      -webkit-tap-highlight-color: transparent;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
    }
    html, body {
      margin: 0;
      padding: 0;
      background-color: #E2E8F0;
      color: #1F2937;
      height: 100dvh;
      max-height: 100dvh;
      overflow: hidden;
      display: flex;
      flex-direction: column;
    }
    body.admin-mode-active {
      height: auto;
      max-height: none;
      overflow-y: auto;
    }
    ::-webkit-scrollbar {
      width: 5px;
      height: 5px;
    }
    ::-webkit-scrollbar-track {
      background: rgba(0,0,0,0.03);
    }
    ::-webkit-scrollbar-thumb {
      background: rgba(47,66,84,0.3);
      border-radius: 9999px;
    }

    /* Production Multi-Screen Responsive Web-App Container — Flush to Bottom (#1) */
    #workspaceContainer {
      flex: 1 1 0%;
      min-height: 0;
      width: 100%;
      display: flex;
      align-items: stretch;
      justify-content: center;
      overflow: hidden;
    }
    #userAppWrapper {
      width: 100%;
      height: 100%;
      display: flex;
      align-items: stretch;
      justify-content: center;
      overflow: hidden;
    }
    .ipaw-full-shell, .ipaw-phone-shell {
      width: 100%;
      max-width: min(100vw, 560px);
      height: 100%;
      max-height: 100%;
      margin: 0 auto;
      background: #FFFFFF;
      position: relative;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      box-shadow: 0 0 45px rgba(0,0,0,0.14);
    }
    .ipaw-phone-shell {
      max-width: 440px;
    }
    @media (min-width: 640px) and (max-width: 1024px) {
      .ipaw-full-shell {
        max-width: 620px;
      }
    }
    @media (max-width: 639px) {
      .ipaw-full-shell, .ipaw-phone-shell {
        max-width: 100%;
        box-shadow: none;
      }
    }
    .ipaw-scroll-area {
      flex: 1 1 0%;
      min-height: 0;
      width: 100%;
      overflow-y: auto;
      overflow-x: hidden;
      padding-bottom: 14px;
      position: relative;
      -webkit-overflow-scrolling: touch;
      touch-action: pan-y;
    }

    /* Smooth & Fast Page Transitions */
    @keyframes ipawPageEnter {
      0% {
        opacity: 0.25;
        transform: translateY(6px);
      }
      100% {
        opacity: 1;
        transform: translateY(0);
      }
    }
    .ipaw-page-animate {
      animation: ipawPageEnter 0.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    }

    /* Dedicated Bottom Navigation Bar Block — flush at very bottom with 0 gap (#1, #2) */
    #fixedBottomNavMount {
      flex: 0 0 auto;
      width: 100%;
      margin: 0 !important;
      padding: 0 !important;
      background: #FFFFFF;
      position: relative;
      bottom: 0;
      z-index: 50;
    }
    .ipaw-bottom-nav {
      position: relative;
      bottom: 0;
      left: 0;
      right: 0;
      margin: 0 !important;
      width: 100%;
      height: 68px;
      background: #FFFFFF;
      border-top: 1.5px solid #E2E8F0;
      border-top-left-radius: 20px;
      border-top-right-radius: 20px;
      display: flex;
      flex-direction: row-reverse;
      direction: ltr;
      align-items: center;
      justify-content: space-between;
      padding: 0 clamp(8px, 2.5vw, 18px);
      z-index: 50;
      box-shadow: 0 -4px 18px rgba(0,0,0,0.07);
      overflow: visible;
    }
    /* High Z-Index Modal & Popup System — ALWAYS above navbar, search header, and floating buttons (#2, #15) */
    #globalModalOverlay {
      position: fixed !important;
      inset: 0 !important;
      z-index: 99999 !important;
      background: rgba(15, 23, 42, 0.72) !important;
      backdrop-filter: blur(4px);
      overflow-y: auto !important;
      overscroll-behavior: contain;
      -webkit-overflow-scrolling: touch;
      touch-action: pan-y;
      padding: 14px;
    }
    #globalModalBox {
      position: relative !important;
      z-index: 100000 !important;
      max-height: 88dvh !important;
      overflow-y: auto !important;
      overscroll-behavior: contain;
      -webkit-overflow-scrolling: touch;
      touch-action: pan-y;
      margin: auto;
    }
    #globalToast {
      position: fixed !important;
      z-index: 100005 !important;
      bottom: 80px !important;
      left: 16px !important;
    }
    /* Gliding Slate-Blue Background Pill that travels smoothly Left & Right */
    .ipaw-nav-glider {
      position: absolute;
      top: 10px;
      height: 48px;
      background: #34495E;
      border-radius: 9999px;
      z-index: 1;
      box-shadow: 0 5px 15px rgba(52, 73, 94, 0.32);
      transition: left 0.38s cubic-bezier(0.25, 1, 0.35, 1),
                  width 0.38s cubic-bezier(0.25, 1, 0.35, 1);
      pointer-events: none;
    }
    .ipaw-nav-btn {
      position: relative;
      z-index: 2;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 7px;
      height: 48px;
      padding: 0 10px;
      border-radius: 9999px;
      cursor: pointer;
      border: none;
      background: transparent !important;
      transition: padding 0.32s cubic-bezier(0.25, 1, 0.35, 1),
                  transform 0.22s ease;
      overflow: visible;
      flex-shrink: 0;
    }
    .ipaw-nav-btn.is-active {
      color: #FFFFFF;
      padding: 0 16px;
    }
    .ipaw-nav-label {
      font-family: 'Cairo', 'Tajawal', sans-serif;
      font-weight: 800;
      font-size: 14px;
      line-height: 1;
      color: #FFFFFF;
      white-space: nowrap;
      transition: opacity 0.25s ease;
    }

    /* Animated Notification & Friend Request Red Dot */
    @keyframes redDotPulse {
      0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 23, 68, 0.75); }
      70% { transform: scale(1.15); box-shadow: 0 0 0 7px rgba(255, 23, 68, 0); }
      100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 23, 68, 0); }
    }
    .notif-pulse-dot {
      position: absolute;
      top: 2px;
      right: 2px;
      width: 12px;
      height: 12px;
      border-radius: 9999px;
      background-color: #FF1744;
      border: 2px solid #FFFFFF;
      z-index: 20;
      animation: redDotPulse 1.5s infinite;
    }

    /* Sticky & Smoothly Compacting Top Challenges Slider */
    .challenges-sticky-header {
      position: sticky;
      top: 0;
      z-index: 35;
      background: rgba(255, 255, 255, 0.97);
      backdrop-filter: blur(8px);
      transition: padding 0.26s ease, box-shadow 0.26s ease;
    }
    .challenges-sticky-header.is-compact {
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.09);
    }
    .challenges-slider-track {
      display: flex;
      flex-direction: row;
      align-items: stretch;
      gap: 12px;
      overflow-x: auto;
      scroll-snap-type: x mandatory;
      scroll-behavior: smooth;
      padding: 12px 16px 10px 16px;
      -webkit-overflow-scrolling: touch;
      touch-action: pan-x;
      user-select: none;
      cursor: grab;
      transition: padding 0.26s ease;
    }
    .challenges-sticky-header.is-compact .challenges-slider-track {
      padding: 6px 14px 6px 14px;
    }
    .challenges-slider-track:active {
      cursor: grabbing;
    }
    .challenge-slide-card {
      width: 88%;
      flex-shrink: 0;
      scroll-snap-align: center;
      border-radius: 20px;
      padding: 14px 16px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      cursor: pointer;
      transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, padding 0.26s ease;
      position: relative;
      overflow: hidden;
    }
    .challenges-sticky-header.is-compact .challenge-slide-card {
      padding: 7px 12px;
      border-radius: 16px;
    }
    .challenge-slide-card .chal-avatar-img {
      width: 92px;
      height: 92px;
      transition: width 0.26s ease, height 0.26s ease;
    }
    .challenges-sticky-header.is-compact .challenge-slide-card .chal-avatar-img {
      width: 52px;
      height: 52px;
    }
    .challenges-sticky-header.is-compact .challenge-slide-card .chal-desc-text {
      display: none;
    }
    .challenges-sticky-header.is-compact .challenge-slide-card .chal-meta-row {
      margin-top: 2px !important;
    }
    .challenge-slide-card.is-selected {
      background-color: #00FFC6;
      border: 2px solid #00D6A7;
      box-shadow: 0 6px 18px rgba(0, 214, 167, 0.25);
    }
    .challenge-slide-card.is-unselected {
      background-color: #C8C8C8;
      border: 2px solid #B2B2B2;
      box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    }

    /* Horizontal Cards Slider for Lost Animals, Found Animals, & Animal Adoption */
    .pets-cards-slider-track {
      display: flex;
      flex-direction: row;
      align-items: stretch;
      gap: 14px;
      overflow-x: auto;
      scroll-snap-type: x mandatory;
      scroll-behavior: smooth;
      padding: 28px 16px 12px 16px;
      -webkit-overflow-scrolling: touch;
      touch-action: pan-x;
      user-select: none;
    }
    .pet-card-slide {
      width: 91%;
      flex-shrink: 0;
      scroll-snap-align: center;
    }

    /* Dark Band Behind User Pets: ends at ~20% of the top of the bone, while 80% of the bone protrudes onto the white area below */
    .ipaw-pets-dark-band {
      width: 100%;
      background-color: #263442;
      padding: 14px 12px 0 12px;
      margin-bottom: 52px;
      position: relative;
      z-index: 10;
      overflow: visible;
    }

    /* Large Pet Bone Nameplate matching image_d4aa97.jpg & I Paw - Paw Home.png */
    .pet-bone-wrapper {
      position: relative;
      width: 170px;
      height: 60px;
      margin-top: -28px;
      margin-bottom: -48px;
      z-index: 20;
      display: flex;
      align-items: center;
      justify-content: center;
      filter: drop-shadow(0 5px 9px rgba(0,0,0,0.25));
    }
    .no-pet-add-badge {
      margin-bottom: -48px;
      position: relative;
      z-index: 20;
    }
    .pet-bone-wrapper svg {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
    }
    .pet-bone-text {
      position: relative;
      z-index: 2;
      font-family: 'Cairo', 'Fredoka', 'Baloo Bhaijaan 2', sans-serif;
      color: #FFFDF7;
      font-weight: 800;
      font-size: 20px;
      line-height: 1;
      letter-spacing: 0.5px;
      text-align: center;
      padding: 0 20px;
      transform: translateY(-1px);
      display: flex;
      align-items: center;
      justify-content: center;
      height: 100%;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 154px;
      text-shadow: 0 2px 4px rgba(0, 0, 0, 0.45), 0 0 10px rgba(249, 227, 170, 0.28);
    }
    .ipaw-count-badge {
      display: flex !important;
      align-items: center !important;
      justify-content: center !important;
      line-height: 1 !important;
      padding-top: 1px !important;
      font-family: 'Cairo', sans-serif !important;
    }
    /* Free Rich Content Editor & Article Body Styling */
    .ipaw-rich-article img {
      border-radius: 14px;
      margin: 10px auto;
      max-width: 100%;
      height: auto;
      display: block;
      box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    }
    .ipaw-rich-article h2, .ipaw-rich-article h3 {
      font-weight: 800;
      color: #2F4254;
      margin-top: 10px;
      margin-bottom: 6px;
    }
    .ipaw-rich-article p {
      margin-bottom: 8px;
      line-height: 1.85;
    }

    .bone-plate {
      position: relative;
      background: #34495E;
      color: #FFFFFF;
      font-weight: 800;
      font-size: 16px;
      padding: 5px 24px;
      border-radius: 999px;
      border: 2px solid #F9E3AA;
      display: inline-block;
      margin-top: -18px;
      z-index: 5;
    }

    /* Section Bone Header Image (Lost, Found, Adoption) */
    .section-bone-img-wrap {
      position: relative;
      margin: -30px auto 10px auto;
      z-index: 12;
      display: flex;
      justify-content: center;
      align-items: center;
    }
    .section-bone-img-wrap img {
      height: 52px;
      width: auto;
      object-fit: contain;
      filter: drop-shadow(0 3px 6px rgba(0,0,0,0.12));
    }

    /* Lost Pet Resolved ("تم ايجاده") Grayscale & Diagonal Stamp */
    .lost-found-resolved-card {
      filter: grayscale(100%);
      opacity: 0.78;
      position: relative;
      transition: all 0.3s ease;
    }
    .found-diagonal-stamp {
      position: absolute;
      inset: 0;
      z-index: 25;
      display: flex;
      align-items: center;
      justify-content: center;
      pointer-events: none;
      overflow: hidden;
      border-radius: 24px;
      background: rgba(30, 41, 59, 0.18);
    }
    .found-diagonal-stamp span {
      transform: rotate(-18deg);
      font-size: 34px;
      font-weight: 900;
      color: #FFFFFF;
      background: rgba(34, 45, 61, 0.9);
      border: 3px solid #F9E3AA;
      padding: 8px 36px;
      border-radius: 16px;
      box-shadow: 0 10px 25px rgba(0,0,0,0.45);
      letter-spacing: 1px;
      white-space: nowrap;
    }

    /* Harmonious & Balanced Challenges "شارك !" Button */
    .ipaw-join-challenge-btn {
      background: #34495E;
      border: 3px solid #F9E3AA;
      border-radius: 9999px;
      height: 54px;
      min-width: 205px;
      padding: 0 26px 0 12px;
      display: inline-flex;
      flex-direction: row;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      box-shadow: 0 8px 22px rgba(0,0,0,0.38);
      cursor: pointer;
      transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s ease;
      direction: ltr;
    }
    .ipaw-join-challenge-btn:hover {
      transform: scale(1.05);
      background: #2B3D4F;
    }
    .ipaw-join-challenge-btn:active {
      transform: scale(0.96);
    }
    .ipaw-join-star-circle {
      width: 34px;
      height: 34px;
      border-radius: 9999px;
      background: #FFCC00;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      box-shadow: inset 0 -2px 4px rgba(0,0,0,0.15);
    }
    .ipaw-join-label {
      color: #FFFFFF;
      font-family: 'Cairo', 'Tajawal', sans-serif;
      font-weight: 900;
      font-size: 21px;
      line-height: 1;
      flex: 1;
      text-align: center;
      display: flex;
      align-items: center;
      justify-content: center;
      padding-top: 1px;
    }

    /* Clicker active press animation */
    .clicker-btn-zone {
      transition: transform 0.08s ease;
      cursor: pointer;
    }
    .clicker-btn-zone:active, .clicker-pressed {
      transform: scale(0.95);
    }
    @keyframes pulseRing {
      0% { transform: scale(0.8); opacity: 0.9; }
      100% { transform: scale(1.9); opacity: 0; }
    }
    .clicker-ripple {
      animation: pulseRing 0.55s ease-out forwards;
    }
    .no-scrollbar::-webkit-scrollbar {
      display: none;
    }
    .no-scrollbar {
      -ms-overflow-style: none;
      scrollbar-width: none;
    }
    .leaflet-container {
      font-family: 'Tajawal', 'Cairo', sans-serif !important;
      z-index: 10 !important;
    }

.standalone-prod-hide { display: none !important; }
#adminAppWrapper { display: none !important; }
