/* NETTVENN – MOBILDESIGN V1 */
/* Gjelder bare skjermer opptil 700px */

@media screen and (max-width: 700px) {

  html {
    width: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
  }

  body {
    width: 100%;
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
  }

  *, *::before, *::after {
    box-sizing: border-box;
  }

  .wrap {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 9px;
  }

  /* Kompakt toppfelt */

  .banner {
    padding: 12px;
    border-radius: 0 0 12px 12px;
    outline: none;
  }

  .topline {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .brand {
    font-size: clamp(34px, 10vw, 45px);
    line-height: 1.1;
    letter-spacing: -1.5px;
  }

  .tagline {
    font-size: 13px;
    margin-top: 3px;
  }

  .topline form {
    width: 100%;
    margin-top: 7px;
  }

  .topline form button {
    width: 100%;
    min-height: 42px;
  }

  /* Ny ryddigere mobilmeny */

  .nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    margin: 9px 0 12px;
    padding: 6px;
    border-radius: 10px;
    outline: none;
  }

  .nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 42px;
    padding: 8px 4px;
    border: 1px solid #65b9e9;
    border-radius: 7px;
    font-size: 13px;
    line-height: 1.25;
    text-align: center;
    overflow-wrap: anywhere;
  }

  /* Innhold i én kolonne */

  .columns {
    display: flex !important;
    flex-direction: column;
    gap: 0;
    margin-top: 8px;
    width: 100%;
  }

  .left,
  .center,
  .right {
    display: block !important;
    width: 100% !important;
    max-width: 100%;
    min-width: 0;
    grid-column: auto;
  }

  /* Penere paneler */

  .panel {
    width: 100%;
    min-width: 0;
    margin: 0 0 11px;
    padding: 8px;
    border-radius: 11px;
    overflow: hidden;
  }

  .panel-title {
    margin: -3px -3px 9px;
    padding: 11px 12px;
    border-radius: 7px 7px 0 0;
    font-size: 15px;
    line-height: 1.35;
  }

  /* Profil */

  .profile {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 10px;
    padding: 8px 0;
    min-width: 0;
  }

  .avatar {
    width: 82px;
    height: 88px;
    min-height: 88px;
    font-size: 42px;
  }

  .profile h1 {
    font-size: clamp(19px, 5.5vw, 24px);
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .profile .quicklinks {
    grid-column: 1 / -1;
    min-width: 0;
  }

  .online {
    font-size: 13px;
  }

  /* Lenker og knapper */

  .quicklinks {
    padding: 8px;
    border-radius: 8px;
  }

  .quicklinks a {
    display: block;
    padding: 9px 5px;
    min-height: 38px;
    overflow-wrap: anywhere;
  }

  button,
  .bluebtn {
    min-height: 42px;
    max-width: 100%;
  }

  .panel a.bluebtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    text-align: center;
    border-radius: 7px;
    text-decoration: none;
    overflow-wrap: anywhere;
  }

  /* Venner og bilder */

  .friends {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .friend {
    min-width: 0;
    font-size: 13px;
  }

  .friend-icon {
    width: 100%;
    height: 70px;
    border-radius: 7px;
  }

  .gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .photo {
    min-width: 0;
    border-radius: 7px;
  }

  /* Informasjon og skjemaer */

  .two {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .details {
    width: 100%;
    table-layout: fixed;
  }

  .details td {
    padding: 8px 5px;
    overflow-wrap: anywhere;
  }

  input,
  textarea,
  select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    font-size: 16px !important;
    padding: 10px;
  }

  form {
    max-width: 100%;
  }

  .status {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
  }

  .status input {
    flex: 1 1 100%;
    min-width: 0;
  }

  .status button {
    width: 100%;
  }

  .rowmsg {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 9px;
    overflow-wrap: anywhere;
  }

  .retro-card-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer {
    padding: 16px 8px;
    font-size: 12px;
  }

  img,
  video,
  iframe {
    max-width: 100%;
  }
}

/* Ekstra små mobilskjermer */

@media screen and (max-width: 380px) {
  .wrap {
    padding: 0 6px;
  }

  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .avatar {
    width: 72px;
    height: 80px;
    min-height: 80px;
  }

  .panel-title {
    font-size: 14px;
  }
}

/* NETTVENN – MOBIL FINJUSTERING V2 */

@media screen and (max-width: 700px) {

  .panel {
    margin-bottom: 8px;
    padding: 7px;
    border-radius: 9px;
  }

  .panel-title {
    padding: 9px 11px;
    margin-bottom: 7px;
    font-size: 14px;
  }

  .retro-event,
  .retro-news,
  .retro-card {
    padding: 10px;
    margin: 7px 0;
    border-radius: 7px;
  }

  .retro-event p,
  .retro-news p,
  .retro-card p {
    margin: 4px 0 6px;
    font-size: 14px;
    line-height: 1.45;
  }

  .retro-event strong,
  .retro-news h3,
  .retro-card h3 {
    font-size: 15px;
  }

  .retro-note {
    padding: 9px;
    margin: 7px 0;
    font-size: 13px;
    line-height: 1.45;
  }

  .retro-card-grid {
    gap: 7px;
  }

  .right .panel {
    margin-bottom: 8px;
  }

  .panel > p {
    margin-top: 7px;
    margin-bottom: 7px;
  }

  .panel a.bluebtn {
    min-height: 40px;
    padding: 8px 12px;
  }

  .small {
    font-size: 11px;
  }

  .footer {
    padding: 12px 6px;
  }
}
