/* Momeniva v3.4.15 — focused UI/UX corrections */

/* 1. Preview panel: compact controls and a device viewport that fits the browser height. */
.studio-v3 .editor-preview{
  display:grid;
  grid-template-rows:auto auto minmax(0,1fr);
}
.studio-v3 .preview-toolbar{
  position:relative;
  min-height:60px;
  padding:8px 12px;
  justify-content:center;
}
.studio-v3 .preview-drawer-close{
  position:absolute;
  left:10px;
  top:50%;
  transform:translateY(-50%);
}
.studio-v3 .preview-toolbar-actions{
  margin:0 auto;
  padding:4px;
  gap:4px;
  flex-wrap:nowrap;
  border-radius:14px;
  background:var(--ui-surface-muted);
}
.studio-v3 .preview-toolbar-actions > .icon-button,
.studio-v3 .preview-device-switch button{
  width:42px;
  min-width:42px;
  height:42px;
  min-height:42px;
  padding:0;
  border-radius:11px;
}
.studio-v3 .preview-device-switch{
  gap:2px;
  padding:0;
  background:transparent;
}
.studio-v3 .preview-link{
  min-height:0;
  padding:10px 12px;
  gap:10px;
}
.studio-v3 .preview-copy-button{
  min-height:40px;
  padding-inline:12px;
}
.studio-v3 .preview-canvas{
  display:grid;
  place-items:start center;
  min-height:0;
  padding:10px 10px 14px;
  overflow:auto;
}
.studio-v3 .preview-device-shell{
  width:min(306px,100%);
  height:min(530px,calc(100dvh - 245px));
  min-height:400px;
  margin:0 auto;
}
.studio-v3 .preview-canvas.desktop .preview-device-shell{
  width:100%;
  height:min(520px,calc(100dvh - 245px));
  min-height:400px;
}
@media (min-width:1440px){
  .studio-v3 .editor-layout-v3{grid-template-columns:minmax(0,1fr) 400px!important;}
}
@media (max-width:1439px){
  body.preview-drawer-open .studio-v3 .editor-preview{
    grid-template-rows:auto auto minmax(0,1fr)!important;
  }
  .studio-v3 .preview-device-shell{
    height:min(560px,calc(100dvh - 230px));
  }
}
@media (max-width:760px){
  .studio-v3 .preview-toolbar{min-height:58px;padding:7px 9px;}
  .studio-v3 .preview-toolbar-actions{gap:3px;}
  .studio-v3 .preview-toolbar-actions > .icon-button,
  .studio-v3 .preview-device-switch button{width:40px;min-width:40px;height:40px;min-height:40px;}
  .studio-v3 .preview-link{grid-template-columns:minmax(0,1fr) auto;padding:9px 10px;}
  .studio-v3 .preview-link small{display:none;}
  .studio-v3 .preview-copy-button{width:40px;min-width:40px;height:40px;padding:0;}
  .studio-v3 .preview-copy-button span{display:none;}
  .studio-v3 .preview-device-shell{
    width:min(292px,100%);
    height:min(520px,calc(100dvh - 225px));
    min-height:390px;
  }
}

/* 2. Story local navigation must switch and expose only its selected section. */
.studio-v3 [data-story-panel][hidden]{display:none!important;}
.studio-v3 [data-story-panel]{scroll-margin-top:150px;}

/* 3. Guest filter search: one outline, with a protected icon gutter. */
.studio-v3 .guest-filter-drawer .search-input{
  position:relative;
  display:block;
  min-width:0;
  border:1px solid var(--ui-border);
  border-radius:16px;
  background:#fff;
  transition:border-color .2s ease,box-shadow .2s ease;
}
.studio-v3 .guest-filter-drawer .search-input:focus-within{
  border-color:var(--ui-primary);
  box-shadow:0 0 0 4px rgba(136,65,87,.09);
}
.studio-v3 .guest-filter-drawer .search-input > svg{
  left:16px;
  width:19px;
  height:19px;
  z-index:2;
  pointer-events:none;
}
.studio-v3 .guest-filter-drawer .search-input > input.search-field-inner{
  width:100%;
  height:58px;
  padding:0 16px 0 50px!important;
  border:0!important;
  border-radius:16px;
  background:transparent;
  box-shadow:none!important;
}

/* 4. Calm package card keeps readable copy on its light background. */
.studio-v3 .sidebar-package-card[data-package-tone="calm"]{
  background:#fffdfb!important;
  border-color:var(--ui-border)!important;
}
.studio-v3 .sidebar-package-card[data-package-tone="calm"] .sidebar-package-summary small,
.studio-v3 .sidebar-package-card[data-package-tone="calm"] .sidebar-package-summary strong,
.studio-v3 .sidebar-package-card[data-package-tone="calm"] .sidebar-package-chevron{
  color:#654e57!important;
  opacity:1;
}
.studio-v3 .sidebar-package-card[data-package-tone="calm"] .sidebar-package-details{
  border-top-color:var(--ui-border);
}
.studio-v3 .sidebar-package-card[data-package-tone="calm"] .sidebar-package-details p{
  color:var(--ui-muted)!important;
}
.studio-v3 .sidebar-package-card[data-package-tone="calm"] .sidebar-package-details a{
  background:var(--ui-primary-soft)!important;
  color:var(--ui-primary)!important;
}

/* 5. Registration consent: checkbox and legal copy share one baseline. */
.auth-page-register .auth-form-register > .custom-check{
  display:grid!important;
  grid-template-columns:22px minmax(0,1fr);
  align-items:start!important;
  column-gap:12px!important;
  row-gap:0;
  width:100%;
  min-height:44px;
  margin:0;
  padding:10px 0;
  font-size:13px!important;
  line-height:1.55!important;
}
.auth-page-register .auth-form-register > .custom-check .check-box{
  width:22px!important;
  height:22px!important;
  flex-basis:22px!important;
  margin:0!important;
}
.auth-page-register .auth-form-register > .custom-check > span:last-child{
  display:block;
  padding-top:1px;
}
@media(max-width:760px){
  .auth-page-register .auth-form-register > .custom-check{
    grid-template-columns:20px minmax(0,1fr);
    column-gap:10px!important;
    min-height:42px;
    padding:8px 0;
    font-size:12px!important;
    line-height:1.45!important;
  }
  .auth-page-register .auth-form-register > .custom-check .check-box{
    width:20px!important;
    height:20px!important;
    flex-basis:20px!important;
  }
}

/* 6. Marketing hero video remains fully visible on narrow/mobile screens. */
@media(max-width:760px){
  .romantic-marketing .hero-video-stage{
    width:100%!important;
    min-height:0!important;
    height:auto!important;
    margin:24px 0 0!important;
    overflow:visible!important;
    transform:none!important;
  }
  .romantic-marketing .hero-video-shell{
    width:min(100%,calc(100vw - 28px))!important;
    max-width:none!important;
    margin:0 auto!important;
    padding:9px!important;
    border-radius:20px!important;
    overflow:hidden;
  }
  .romantic-marketing .hero-video-frame{
    width:100%;
    aspect-ratio:16/9;
    border-radius:15px!important;
    overflow:hidden;
  }
  .romantic-marketing .hero-product-video{
    width:100%!important;
    height:100%!important;
    aspect-ratio:auto!important;
    object-fit:contain!important;
    object-position:center!important;
  }
  .romantic-marketing .hero-video-meta{
    min-height:36px!important;
    padding:0 3px 8px!important;
  }
  .romantic-marketing .hero-video-footer{
    padding:10px 3px 2px!important;
  }
}

/* Mobile preview toolbar: keep all four controls in one clean row. */
@media(max-width:760px){
  .studio-v3 .preview-toolbar{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
  }
  .studio-v3 .preview-toolbar-actions{
    position:static!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:max-content!important;
    max-width:calc(100% - 18px)!important;
    height:auto!important;
    margin:0 auto!important;
    overflow:visible!important;
    transform:none!important;
  }
  .studio-v3 .preview-toolbar-actions > *,
  .studio-v3 .preview-device-switch{
    position:static!important;
    transform:none!important;
  }
  .studio-v3 .preview-device-switch{
    display:flex!important;
    width:auto!important;
    height:auto!important;
    flex:0 0 auto!important;
  }
}

.auth-oauth-consent{margin:10px 12px 0;color:var(--v3-muted,#7f6b71);font-size:11px;line-height:1.55;text-align:center}.auth-oauth-consent a{color:var(--v3-rose-dark,#793e51);font-weight:700}
