/* stylemobile.css
   Mobile-only overrides for index_mobile.html
   Load AFTER /style.css
*/

@media (max-width: 900px){

  /* Base */
  body.tts-page{
    /* keep your BV background (prevents "white page" look if something else overrides) */
    background-color: var(--bv-bg, #0e121c) !important;
    color: #d6c97b; /* your site gold; avoids random green readability issues on mobile */
  }

  /* Dashboard */
  #topDashboard{
    height: 62px !important;
    padding: 0 10px !important;
  }

  body{ padding-top: 70px !important; } /* ensure content not hidden under dashboard */

  .dash-left{ gap: 8px !important; }
  .dash-right{ gap: 8px !important; }

  .dash-brand{
    font-size: 13px !important;
  }

  .dash-chip{
    font-size: 12px !important;
    padding: 6px 10px !important;
    border-radius: 12px !important;
  }

  /* Remove the center hover text area on mobile (it breaks layout) */
  .dash-center{
    display: none !important;
  }

  .dash-avatar{
    width: 36px !important;
    height: 36px !important;
  }

  .dash-avatar-menu{
    top: 44px !important;
    right: 0 !important;
    min-width: 200px !important;
    border-radius: 14px !important;
  }

  /* Container */
  .tts-container{
    max-width: 100% !important;
    padding: 12px !important;
    margin: 0 auto 24px auto !important;
  }

  /* Stop the “desktop constellation offsets” from wrecking mobile */
  #twin-logo-wrapper{ top: 0 !important; }
  #constellation-dafnes-wrapper{ top: 0 !important; }
  #page-content-wrapper{ margin-top: 0 !important; }

  /* Logo sizes */
  .center-bv-logo{
    margin-top: 8px !important;
  }
  .center-bv-logo img{
    height: 120px !important;   /* was 240 */
    max-width: 80vw !important;
  }

  .tds-logo-row{
    gap: 12px !important;
    margin-top: 6px !important;
    flex-wrap: wrap !important;
  }
  .tds-logo-row img{
    height: 74px !important; /* bedvibe5.png + fwne.png */
    max-width: 44vw !important;
  }

  .logo-bedvibe{ margin-right: 0 !important; }
  .logo-fwne{ margin-left: 0 !important; }

  img[alt="dafnes"]{
    height: 84px !important;
    width: auto !important;
  }

  #tokenBalance{
    font-size: 20px !important;
  }

  /* Headline block */
  .tts-headline{
    font-size: 20px !important;
    margin-top: 6px !important;
    margin-bottom: 8px !important;
  }

  .tts-subheadline{
    display: block !important;  /* you already had mobile show; make sure it shows */
    font-size: 12px !important;
    margin-top: -4px !important;
    margin-bottom: 8px !important;
  }

  /* Select blocks -> full width stack */
  .tts-text-input-container{
    gap: 10px !important;
  }

  .tts-select-block{
    width: 100% !important;
    min-width: 0 !important;
    align-items: stretch !important;
  }

  .tts-label{
    font-size: 13px !important;
    text-align: left !important;
    opacity: 0.9 !important;
  }

  /* Your BV dropdown wrapper should become full width */
  .bv-dropdown{
    width: 100% !important;
    min-width: 0 !important;
  }

  .bv-dropdown-trigger{
    justify-content: space-between !important;
    padding: 10px 12px !important;
    border-radius: 10px !important;
    font-size: 15px !important;
  }

  .bv-dropdown-menu{
    max-height: 44vh !important;
  }

  /* Textarea */
  #ttsText{
    height: auto !important;
    min-height: 150px !important;
    font-size: 16px !important; /* iOS zoom fix threshold */
    padding: 12px !important;
    border-radius: 12px !important;
  }

  /* Generate / Token / Preview / Download / Info row */
  .gen-dl-row{
    max-width: 100% !important;
    margin: 10px auto 8px auto !important;
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 10px !important;
    justify-items: center !important;
    align-items: center !important;
  }

  /* Make icons consistent + not huge */
  .gen-dl-row img{
    height: 42px !important;
    width: auto !important;
  }

  #generateButton img{
    height: 56px !important;
  }

  /* Token cost pill */
  .token-cost-box{
    font-size: 13px !important;
    padding: 6px 12px !important;
    min-width: 0 !important;
  }

  /* Control box -> single column, no weird transforms */
  .bv-control-box{
    max-width: 100% !important;
  }
  .bv-control-box__grid{
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
  }
  .bv-hd-col{
    transform: none !important;
    margin: 2px 0 6px 0 !important;
  }
  .bv-slider__input{
    max-width: 100% !important;
  }

  /* Voice sample pills -> 2 columns */
.bv-voice-samples{
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 28px !important;
}

  /* Lore buttons -> stacked */
  .lore-row{
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    margin-top: 16px !important;
  }
  .lore-side-title{
    font-size: 1.7rem !important;
  }
  .lore-side-subtitle{
    font-size: 0.85rem !important;
  }

  /* Modals */
  .info-modal{
    width: 92% !important;
    padding: 16px 16px 18px !important;
  }
  .info-modal-title{
    font-size: 1.7rem !important;
  }

  /* Token shop grid -> 1 column */
  .token-shop-grid{
    grid-template-columns: 1fr !important;
  }

  /* Footer */
  body.tts-page footer{
    margin-top: 18px !important;
    padding: 14px 10px !important;
    font-size: 12px !important;
  }
}

@media (max-width: 900px){

  .tts-container{
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  #page-content-wrapper{
    width: 100% !important;
    max-width: 100% !important;
  }

  .tts-text-input-container{
    width: 100% !important;
  }
}

.dash-model-wrapper { position: relative; margin-right: 12px; }

.dash-model-menu {
  position: absolute;
  top: 42px;
  right: 0;
  background: rgba(0,0,0,0.95);
  border: 1px solid rgba(212,175,55,0.3);
  border-radius: 10px;
  padding: 6px 0;
  min-width: 160px;
  z-index: 9999;
}

.dash-model-menu button {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 8px 12px;
  color: #fff;
  cursor: pointer;
}

.dash-model-menu button:hover {
  background: rgba(212,175,55,0.15);
}