/* Use the same shared phone interface and the same stylesheet order as iK7.
   The iK13 adapter only supplies model identity, connection state and three
   camera files; the IIWEY application composition remains shared. */
@import url('../ik11/phone-ui.css');
@import url('../ik11/phone-ios-fidelity.css');
@import url('../ik11/phone-samsung-fidelity.css');
@import url('../ik11/phone-app-fidelity.css');
@import url('../ik11/phone-password-fidelity.css');
@import url('../ik11/phone-projection.css');

.ik13-shared-phone-app {
  width: 100%;
  min-width: 0;
  color: #172235;
  font-size: 16px;
}

/* These are the phone-only shell overrides used by iK7/phone-bridge.css.
   Keep them within the adapter so they do not alter the handbook layout. */
.ik13-shared-phone-app .phone-workshop {
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.ik13-shared-phone-app .phone-workshop-header,
.ik13-shared-phone-app .phone-model-caption,
.ik13-shared-phone-app .phone-guide,
.ik13-shared-phone-app .phone-native-toast:empty {
  display: none !important;
}

.ik13-shared-phone-app .phone-workshop-body,
.ik13-shared-phone-app .phone-stage {
  padding: 0 !important;
  display: block !important;
  background: transparent !important;
}

.ik13-shared-phone-app .phone-frame {
  width: 270px !important;
  max-width: 100%;
  margin: auto !important;
}

.ik13-shared-phone-app .phone-screen {
  min-height: 0 !important;
}

/* The standalone iK13 OS mock uses a generic .phone-row selector. Remove
   only its extra child layout inside the shared interface; all native row
   dimensions, icons, colors and OS variants still come from the six imports. */
.ik13-shared-phone-app .phone-row {
  border: 0;
  color: inherit;
  cursor: auto;
}

.ik13-shared-phone-app .phone-row-static:not(.phone-wifi-switch-row):not(.phone-current-network) {
  background: transparent;
}

.ik13-shared-phone-app button.phone-row {
  cursor: pointer;
}

.ik13-shared-phone-app .phone-row > span {
  display: block;
  flex: 0 1 auto;
  flex-direction: row;
  gap: normal;
  min-width: auto;
}

.ik13-shared-phone-app .phone-row > .phone-row-copy {
  display: block;
  flex: 1;
  gap: normal;
  min-width: 0;
}

.ik13-shared-phone-app .phone-row > .phone-setting-icon {
  display: grid;
  flex: 0 0 auto;
  gap: normal;
}

.ik13-shared-phone-app .phone-is-ios .phone-page-wifi .phone-setting-icon {
  display: none;
}

.ik13-shared-phone-app .phone-row > .phone-row-value {
  display: inline;
  flex: 0 1 auto;
  gap: normal;
}

.ik13-shared-phone-app .phone-more-list > .phone-row {
  background: #fff;
}

.ik13-shared-phone-app .phone-row-copy strong {
  overflow: visible;
  text-overflow: clip;
}

.ik13-shared-phone-app .phone-native-toast {
  pointer-events: none;
}

.ik13-shared-phone-app .phone-camera-road {
  overflow: hidden;
}

.ik13-shared-phone-app .phone-camera-road > video,
.sp-connected .projection-mirror-target .phone-camera-road > video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Preserve the separate OS teaching screens when the shared imports are
   present. .phone-row is the only class used by both phone implementations. */
.sim-phone .phone-row {
  min-height: calc(51 * var(--p));
  padding: calc(10 * var(--p)) calc(13 * var(--p)) !important;
  gap: calc(12 * var(--p));
}

.sim-phone .phone-row::before {
  display: none;
}

/* Mirror the shared phone screen itself, without putting a second physical
   phone bezel around the projected application. */
.sp-connected .projection-mirror-target > .phone-frame {
  width: 100% !important;
  height: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border-radius: inherit;
  background: none;
  box-shadow: none;
  pointer-events: none;
}

.sp-connected .projection-mirror-target > .phone-frame::before,
.sp-connected .projection-mirror-target > .phone-frame::after {
  display: none;
}

.sp-connected .projection-mirror-target > .phone-frame > .phone-screen {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border-radius: inherit;
}

@media (max-width: 760px) {
  .ik13-shared-phone-app .phone-frame {
    width: min(270px, calc((100dvh - 114px) * .49)) !important;
  }
}
.ik13-shared-phone-app .phone-camera-road>.phone-preview-still{display:block;width:100%;height:100%;object-fit:cover}
