:root {
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body.mr-app-store-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 0%, rgba(37, 99, 235, .13), transparent 34%),
    radial-gradient(circle at 100% 20%, rgba(124, 58, 237, .12), transparent 30%),
    #f4f7fb;
  color: #0f172a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.mr-app-store {
  --mr-store-accent: #111827;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 18px calc(42px + env(safe-area-inset-bottom));
}

.mr-app-store-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 190px;
  padding: 30px;
  border-radius: 30px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--mr-store-accent) 94%, #000 6%), color-mix(in srgb, var(--mr-store-accent) 70%, #4f46e5 30%));
  color: #fff;
  box-shadow: 0 26px 70px rgba(15, 23, 42, .22);
}

.mr-app-store-hero::before,
.mr-app-store-hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, .09);
  pointer-events: none;
}

.mr-app-store-hero::before {
  width: 280px;
  height: 280px;
  right: -85px;
  top: -145px;
}

.mr-app-store-hero::after {
  width: 180px;
  height: 180px;
  left: 45%;
  bottom: -130px;
}

.mr-app-store-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 20px;
}

.mr-app-store-brand img {
  flex: 0 0 auto;
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 23px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .24);
}

.mr-app-store-brand span {
  display: block;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .18em;
}

.mr-app-store-brand h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(31px, 6vw, 54px);
  line-height: .98;
  letter-spacing: -.055em;
}

.mr-app-store-brand p {
  max-width: 650px;
  margin: 12px 0 0;
  color: rgba(255, 255, 255, .82);
  font-size: 16px;
  line-height: 1.5;
}

.mr-app-store-install {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 15px;
  background: rgba(255, 255, 255, .14);
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 850;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.mr-app-store-tools {
  position: sticky;
  z-index: 20;
  top: 0;
  margin: 20px 0;
  padding: 12px;
  border: 1px solid rgba(203, 213, 225, .72);
  border-radius: 20px;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 12px 38px rgba(15, 23, 42, .08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.mr-app-store-search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  background: #fff;
}

.mr-app-store-search span {
  color: #64748b;
  font-size: 27px;
  line-height: 1;
}

.mr-app-store-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #0f172a;
  font: inherit;
  font-size: 16px;
}

.mr-app-store-categories {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.mr-app-store-categories::-webkit-scrollbar {
  display: none;
}

.mr-app-store-categories button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid #dbe3ee;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

.mr-app-store-categories button.is-active {
  border-color: var(--mr-store-accent);
  background: var(--mr-store-accent);
  color: #fff;
}

.mr-app-store-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.mr-app-card {
  position: relative;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  min-height: 132px;
  padding: 18px;
  border: 1px solid #dbe3ee;
  border-radius: 23px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 13px 34px rgba(15, 23, 42, .07);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.mr-app-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--mr-store-accent) 36%, #dbe3ee 64%);
  box-shadow: 0 20px 44px rgba(15, 23, 42, .12);
}

.mr-app-card[hidden] {
  display: none !important;
}

.mr-app-card.is-featured {
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, var(--mr-store-accent), #7c3aed) border-box;
  border: 2px solid transparent;
}

.mr-app-card-badge {
  position: absolute;
  top: -9px;
  right: 14px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #f59e0b;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .03em;
}

.mr-app-card-icon {
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  overflow: hidden;
  border-radius: 19px;
  background: linear-gradient(135deg, var(--mr-store-accent), #6366f1);
  color: #fff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, .16);
}

.mr-app-card-icon img {
  width: 100%;
  height: 100%;
  position: top;
  object-fit: cover;
}

.mr-app-card-icon span {
  font-size: 24px;
  font-weight: 950;
  letter-spacing: -.05em;
}

.mr-app-card-content {
  min-width: 0;
}

.mr-app-card-content small {
  display: block;
  margin-bottom: 4px;
  color: #64748b;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.mr-app-card-content h2 {
  margin: 0;
  color: #0f172a;
  font-size: 19px;
  line-height: 1.15;
  letter-spacing: -.025em;
}

.mr-app-card-content p {
  display: -webkit-box;
  overflow: hidden;
  margin: 7px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.mr-app-card-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #eef2ff;
  color: var(--mr-store-accent) !important;
  text-decoration: none !important;
  font-size: 13px;
  font-weight: 900;
}

.mr-app-store-empty {
  margin: 30px 0;
  padding: 30px;
  border: 1px dashed #cbd5e1;
  border-radius: 20px;
  background: rgba(255, 255, 255, .76);
  color: #64748b;
  text-align: center;
  font-weight: 800;
}

.mr-app-store-footer {
  padding: 30px 0 0;
  color: #94a3b8;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 980px) {
  .mr-app-store-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .mr-app-store {
    padding-left: 12px;
    padding-right: 12px;
  }

  .mr-app-store-hero {
    min-height: 0;
    padding: 23px 20px;
    border-radius: 24px;
  }

  .mr-app-store-brand {
    align-items: flex-start;
  }

  .mr-app-store-brand img {
    width: 68px;
    height: 68px;
    border-radius: 18px;
  }

  .mr-app-store-brand h1 {
    font-size: 34px;
  }

  .mr-app-store-brand p {
    font-size: 14px;
  }

  .mr-app-store-install {
    display: none;
  }

  .mr-app-store-tools {
    margin: 14px 0;
    border-radius: 17px;
  }

  .mr-app-store-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .mr-app-card {
    grid-template-columns: 64px minmax(0, 1fr) auto;
    min-height: 112px;
    padding: 14px;
    border-radius: 19px;
  }

  .mr-app-card-icon {
    width: 64px;
    height: 64px;
    border-radius: 17px;
  }

  .mr-app-card-content h2 {
    font-size: 17px;
  }

  .mr-app-card-open {
    min-width: 62px;
    padding: 8px 10px;
  }
}

@media (max-width: 420px) {
  .mr-app-store-brand img {
    width: 58px;
    height: 58px;
  }

  .mr-app-store-brand h1 {
    font-size: 29px;
  }

  .mr-app-card {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .mr-app-card-icon {
    width: 58px;
    height: 58px;
  }

  .mr-app-card-open {
    grid-column: 1 / -1;
    width: 100%;
  }
}

/* Η κάρτα MR Store είναι το μοναδικό σημείο εγκατάστασης. */
.mr-app-card--store {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.mr-app-card--store:focus-visible {
  outline: 4px solid color-mix(in srgb, var(--mr-store-accent) 28%, transparent);
  outline-offset: 4px;
}

.mr-app-card--store .mr-app-card-open {
  border: 0;
  background: var(--mr-store-accent);
  color: #fff !important;
}


/* Κεντρικό κουμπί εγκατάστασης MR Store */
.mr-app-store-install-zone {
  margin: 20px 0;
}

.mr-app-store-install-button {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 54px;
  align-items: center;
  gap: 18px;
  min-height: 116px;
  padding: 18px 22px;
  border: 0;
  border-radius: 24px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--mr-store-accent) 96%, #000 4%), color-mix(in srgb, var(--mr-store-accent) 72%, #4f46e5 28%));
  color: #fff;
  box-shadow: 0 22px 55px rgba(15, 23, 42, .22);
  cursor: pointer;
  text-align: left;
  transition: transform .18s ease, box-shadow .18s ease;
}

.mr-app-store-install-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 28px 66px rgba(15, 23, 42, .28);
}

.mr-app-store-install-button:focus-visible {
  outline: 4px solid rgba(59, 130, 246, .35);
  outline-offset: 4px;
}

.mr-app-store-install-icon {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .22);
  overflow: hidden;
}

.mr-app-store-install-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mr-app-store-install-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mr-app-store-install-copy small {
  color: rgba(255,255,255,.7);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
}

.mr-app-store-install-copy strong {
  color: #fff;
  font-size: clamp(22px, 3vw, 31px);
  line-height: 1.08;
  letter-spacing: -.035em;
}

.mr-app-store-install-copy > span {
  color: rgba(255,255,255,.82);
  font-size: 14px;
  line-height: 1.4;
}

.mr-app-store-install-arrow {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  color: #fff;
  font-size: 30px;
  font-weight: 900;
}

.mr-iwa-installed .mr-app-store-install-zone {
  display: none !important;
}

@media (max-width: 640px) {
  .mr-app-store-install-button {
    grid-template-columns: 62px minmax(0, 1fr) 42px;
    gap: 12px;
    min-height: 102px;
    padding: 15px;
    border-radius: 20px;
  }

  .mr-app-store-install-icon {
    width: 62px;
    height: 62px;
    border-radius: 17px;
  }

  .mr-app-store-install-copy > span {
    font-size: 12px;
  }

  .mr-app-store-install-arrow {
    width: 40px;
    height: 40px;
    font-size: 24px;
  }
}
