/*
 * NakliyeVakti V1 mobile final pass
 * Targets 360 / 390 / 414 px and common tablet widths.
 * This is the single canonical mobile correction layer for V1.
 */

:root{
  --nv-mobile-edge:14px;
  --nv-mobile-radius:14px;
}

/* Universal overflow guards */
@media (max-width: 760px){
  html,body{max-width:100%;overflow-x:hidden}
  *,*::before,*::after{box-sizing:border-box}
  img,video,iframe,svg{max-width:100%;height:auto}
  table{max-width:100%}
  input,select,textarea,button{max-width:100%}

  .nvltp-container,
  .nvltp-wrap,
  .nvltp-card,
  .nv-job-v2-shell,
  .nv-messages-shell{
    min-width:0;
    max-width:100%;
  }

  .nvltp-container{
    width:100%;
    padding-left:var(--nv-mobile-edge);
    padding-right:var(--nv-mobile-edge);
  }

  .nvltp-card{
    border-radius:var(--nv-mobile-radius);
  }

  .nvltp-actions{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
  }

  .nvltp-btn{
    min-height:44px;
    max-width:100%;
    white-space:normal;
    text-align:center;
    line-height:1.25;
  }

  .nvltp-field input:not([type="checkbox"]):not([type="radio"]),
  .nvltp-field select,
  .nvltp-field textarea{
    width:100%;
    min-width:0;
    font-size:16px; /* iOS zoom prevention */
  }
}

/* Header / account */
@media (max-width: 760px){
  .nv-site-header,
  .nv-global-header{max-width:100%}

  .nv-mobile-account-links a,
  .nv-mobile-menu a{
    min-height:44px;
    display:flex;
    align-items:center;
  }
}

/* Profile dashboard */
@media (max-width: 760px){
  body.nv-ui-profilim .nvltp-dashboard-grid,
  body.nv-ui-profilim .nvltp-profile-grid,
  body.nv-ui-profilim .nvltp-summary-grid,
  body.nv-ui-profilim .nvltp-offer-grid{
    grid-template-columns:1fr;
  }

  body.nv-ui-profilim .nvltp-live-operation-card,
  body.nv-ui-profilim .nvltp-offer-card{
    min-width:0;
  }

  body.nv-ui-profilim .nvltp-live-operation-card .nvltp-actions,
  body.nv-ui-profilim .nvltp-offer-card .nvltp-actions{
    align-items:stretch;
    flex-direction:column;
  }

  body.nv-ui-profilim .nvltp-live-operation-card .nvltp-btn,
  body.nv-ui-profilim .nvltp-offer-card .nvltp-btn{
    width:100%;
  }
}

/* Marketplace */
@media (max-width: 760px){
  body.nv-ui-ilanlar .nv-job-list-toolbar,
  body.nv-ui-ilanlar .nv-marketplace-toolbar,
  body.nv-ui-ilanlar .nv-job-list-hero{
    min-width:0;
  }

  body.nv-ui-ilanlar .nv-job-list-grid,
  body.nv-ui-ilanlar .nv-marketplace-grid{
    grid-template-columns:1fr;
  }

  body.nv-ui-ilanlar .nv-job-card,
  body.nv-ui-ilanlar .nvltp-job-card{
    width:100%;
    min-width:0;
  }

  body.nv-ui-ilanlar .nv-job-card-actions,
  body.nv-ui-ilanlar .nvltp-job-card-actions{
    display:flex;
    align-items:stretch;
    flex-direction:column;
  }

  body.nv-ui-ilanlar .nv-job-card-actions .nvltp-btn,
  body.nv-ui-ilanlar .nvltp-job-card-actions .nvltp-btn{
    width:100%;
  }
}

/* Job detail */
@media (max-width: 760px){
  .nvltp-job-v2-page-v3 .nvltp-job-v2-grid,
  .nvltp-job-v2-page-v3 .nvltp-job-v2-route-grid,
  .nvltp-job-v2-page-v3 .nvltp-job-v2-meta-grid{
    grid-template-columns:1fr;
  }

  .nvltp-job-v2-page-v3 .nvltp-job-v2-actions,
  .nvltp-job-v2-page-v3 .nvltp-job-next-action{
    min-width:0;
  }

  .nvltp-job-v2-page-v3 .nvltp-job-v2-actions .nvltp-btn,
  .nvltp-job-v2-page-v3 .nvltp-job-next-action .nvltp-btn{
    width:100%;
  }
}

/* Messages */
@media (max-width: 760px){
  body.nv-ui-mesajlar .nv-messages-shell,
  body.nv-ui-mesajlar .nv-chat-shell{
    width:100%;
    min-width:0;
  }

  body.nv-ui-mesajlar .nv-chat-header,
  body.nv-ui-mesajlar .nv-chat-compose{
    min-width:0;
  }

  body.nv-ui-mesajlar .nv-chat-bubble{
    max-width:88%;
    overflow-wrap:anywhere;
    word-break:break-word;
  }

  body.nv-ui-mesajlar .nv-chat-compose textarea{
    min-width:0;
    font-size:16px;
  }
}

/* Login / registration */
@media (max-width: 760px){
  body.nv-ui-giris .nvltp-auth-wrap{
    width:100%;
    padding-left:var(--nv-mobile-edge);
    padding-right:var(--nv-mobile-edge);
  }

  body.nv-ui-giris .nvltp-auth-grid,
  body.nv-ui-kayit .nvltp-auth-grid,
  body.nv-ui-kayit .nvltp-register-grid{
    grid-template-columns:1fr;
  }

  body.nv-ui-kayit .nvltp-register-role-tabs{
    display:grid;
    grid-template-columns:1fr;
    gap:7px;
  }

  body.nv-ui-kayit input[type="file"]{
    width:100%;
    min-width:0;
  }
}

/* Job create */
@media (max-width: 760px){
  body.nv-ui-ilan-ver .nv-job-create-heading{
    display:block;
  }

  body.nv-ui-ilan-ver .nv-job-create-steps{
    grid-template-columns:1fr;
  }

  body.nv-ui-ilan-ver .nv-job-create-form .row{
    grid-template-columns:1fr;
  }

  body.nv-ui-ilan-ver .nv-job-create-form .nvltp-actions{
    align-items:stretch;
    flex-direction:column;
  }

  body.nv-ui-ilan-ver .nv-job-create-form .nvltp-actions .nvltp-btn{
    width:100%;
  }
}

/* Narrow-phone refinements: 360/390 */
@media (max-width: 390px){
  :root{--nv-mobile-edge:12px}

  .nvltp-card{
    padding-left:13px;
    padding-right:13px;
  }

  .nvltp-btn{
    width:100%;
  }

  .nvltp-rating-star-row{
    gap:1px;
  }

  .nvltp-rating-star-row label{
    width:40px;
  }
}

/* 414 px target keeps compact gutters without forcing full-width buttons globally */
@media (min-width:391px) and (max-width:414px){
  :root{--nv-mobile-edge:14px}
}
