/* RugWeather shared phone mockup component.
 * The frame/screen treatment lives here so every page uses the same phone design.
 * Page styles only control layout, size and positioning.
 */

.rw-phone-mockup {
  position: relative;
  box-sizing: border-box;
}

.rw-phone-mockup__notch {
  position: absolute;
  z-index: 3;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #050505;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.035);
}

.rw-phone-mockup__screen {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #080808;
}

.rw-phone-mockup__screen img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Main homepage hero phones: these stay behind the centre tablet/device. */
.rw-phone-mockup--hero {
  /* Preserve the original homepage hero phone geometry. The legacy hero frame
     used content-box sizing, while the proof/premium phones use border-box. */
  box-sizing: content-box;
  position: absolute;
  z-index: 2;
  width: 176px;
  height: 360px;
  padding: 7px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 31px;
  background: #080808;
  box-shadow: 0 28px 60px rgba(0,0,0,.55);
}

.rw-phone-mockup--hero .rw-phone-mockup__notch {
  top: 12px;
  width: 74px;
  height: 19px;
  box-shadow: none;
}

.rw-phone-mockup--hero .rw-phone-mockup__screen {
  padding: 0;
  border-radius: 25px;
}

/* Product-proof phones used on the homepage and guide CTA. */
.rw-phone-mockup--proof {
  width: min(100%, 260px);
  aspect-ratio: 942 / 2048;
  margin: 0 auto;
  padding: 8px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 38px;
  background: linear-gradient(145deg, #171717, #050505);
  box-shadow:
    0 30px 70px rgba(0,0,0,.48),
    0 0 0 5px rgba(255,255,255,.025);
}

.rw-phone-mockup--proof .rw-phone-mockup__notch {
  top: 15px;
  width: 30%;
  height: 4.2%;
}

.rw-phone-mockup--proof .rw-phone-mockup__screen {
  border-radius: 31px;
}

@media (max-width: 680px) {
  .rw-phone-mockup--hero .rw-phone-mockup__notch {
    top: 8px;
    width: 44px;
    height: 11px;
  }

  .rw-phone-mockup--proof {
    width: min(100%, 205px);
    padding: 6px;
    border-radius: 27px;
  }

  .rw-phone-mockup--proof .rw-phone-mockup__screen {
    border-radius: 22px;
  }

  .rw-phone-mockup--proof .rw-phone-mockup__notch {
    top: 11px;
  }
}

@media (max-width: 430px) {
  .rw-phone-mockup--proof {
    padding: 5px;
    border-radius: 23px;
  }

  .rw-phone-mockup--proof .rw-phone-mockup__screen {
    border-radius: 19px;
  }

  .rw-phone-mockup--proof .rw-phone-mockup__notch {
    top: 9px;
  }
}
