/* ===============================
   GLOBALT LAYOUT
================================ */
html, body {
    height: 100%;
    background: #F7F9FF; 
    font-family: 'Inter', sans-serif;
    color: #1e2a36;
    margin: 0;
    padding: 0;
}

/* Fjern blå outlines i header og inputs */
*:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* ===============================
   NAVIGATION / HEADER
================================ */

header nav {
    background-color: #4A90E2 !important;
}

.navbar {
    background: #4A90E2 !important;
    border-bottom: none !important;
    box-shadow: none !important;
}

.navbar-brand, .nav-link {
    color: #ffffff !important;
    font-weight: 500;
}

.nav-link:hover {
    color: #8cbaff !important;
}

/* Logo-størrelse */
.logo {
    height: 38px;
    width: auto;
}

/* Search bar */
.navbar .form-control {
    border-radius: 12px;
    border: none;
    padding: 8px 14px;
    background: #ffffff;
}

.navbar .btn-outline-warning {
    border-radius: 12px;
    border: none;
    background: #ffcc4d;
    color: #333;
}

.navbar .btn-outline-warning:hover {
    background: #ffdb70;
}

/* ===============================
   PRODUKTKORT
================================ */
.card {
    border: none;
    border-radius: 18px;
    background: #ffffff;
    padding-bottom: 10px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
    transition: transform .2s;
}

.card:hover {
    transform: translateY(-5px);
}

/* ENS billedestørrelse, vis hele produktet */
.card img {
    width: 100%;
    height: 200px;
    object-fit: contain;   /* Vis hele flasken */
    padding: 15px;
    border-radius: 12px;
}

/* Titler i cards */
.card-title {
    font-size: 1.1rem;
    font-weight: 600;
}

/* “Se produkt” knap */
.btn-primary {
    background: #4A90E2;
    border-radius: 12px;
    border: none;
}

.btn-primary:hover {
    background: #5A80FF;
}

/* ===============================
   FOOTER
================================ */
footer {
    background: #4A90E2;
    padding: 30px 0;
    color: white;
}

footer a {
    color: white !important;
    text-decoration: none;
}

footer a:hover {
    color: #8cbaff !important;
}

/* ===============================
   OMSLAG OG SEKTIONER
================================ */
h1, h2 {
    font-weight: 700;
    color: #1c2c65;
}

.lead {
    color: #4b5c7a;
}

/* ===============================
   SEARCH RESULTATER SIDE
================================ */
.search-title {
    font-size: 2rem;
    font-weight: 700;
    color: #4A90E2;
}

/* ===============================
   MOBILE OPTIMERING
================================ */
@media (max-width: 768px) {
    .card img {
        height: 180px;
    }

    .navbar .form-control {
        width: 60%;
    }
}

.cart-wrapper {
    position: relative;
    display: inline-block;
}

.cart-count {
    position: absolute;
    top: -6px;
    right: -10px;
    background: #ffc107;
    color: black;
    padding: 2px 6px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
}


/* ===============================
rød og grøn tekst ved korrekt/ukorrekt input
================================ */
.valid {
  color: green;
}
.invalid {
  color: red;
}

/* ===============================
   JUSTERINGER TIL HEADER
================================ */

/* Centrér header indhold og sæt max bredde */
header .container-fluid {
    max-width: 98vw;
    margin: 0 auto;
}
/* Begræns søgefeltet så det ikke trækker navbar bredere */
header .navbar .form-control {
    max-width: 98vw;
}
/* Sørg for logo ikke er for stort */
header .logo { max-width: 40px; height: auto; }
/* ...existing code... */











/* --- Vibio Chat styles (center big) dette er til chatbotten til loop --- */
.vibio-chat-hero {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin: 1.5rem 0;
}
.vibio-chat-card {
  width: 80%;
  max-width: 980px;
  background: #ffffff;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(6,24,73,0.08);
  border: 1px solid rgba(13,37,63,0.05);
}
.vibio-chat-header h2 {
  margin: 0 0 6px;
  color: #4A90E2;
}
.vibio-chat-header .muted {
  color: #6c7a99;
  margin-bottom: 12px;
}

/* messages */
.vibio-chat-messages {
  min-height: 120px;
  max-height: 420px;
  overflow-y: auto;
  padding: 10px;
  border-radius: 10px;
  background: linear-gradient(180deg,#f8fafc,#fbfdff);
  border: 1px solid rgba(11,30,68,0.04);
  margin-bottom: 12px;
}

.vibio-message { padding:8px 12px; margin:8px 0; border-radius:10px; }
.vibio-message.bot { background: #ffffff; color: #172b4d; box-shadow: 0 3px 8px rgba(6,24,73,0.04); }
.vibio-message.user { background: #0b1e44; color: #fff; text-align:right; margin-left: 20%; }

/* input row */
.vibio-chat-form { display:flex; gap:10px; align-items:center; }
.vibio-chat-input {
  flex:1;
  padding:10px 12px;
  border-radius:8px;
  border:1px solid rgba(11,30,68,0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
}
.vibio-chat-send {
  background: #f0b429;
  border: none;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight:600;
  color: #0b1e44;
  cursor:pointer;
}

/* product grid in chat card */
.product-grid { display:flex; gap:12px; flex-wrap:wrap; margin-top:8px; }
.product-card { width: 200px; background:#fff; border-radius:8px; padding:8px; box-shadow:0 6px 18px rgba(6,24,73,0.04); text-align:center; }
.product-card img { width: 100%; height: 140px; object-fit:contain; margin-bottom:6px; }
.product-name { font-weight:600; color:#0b1e44; margin-bottom:4px; }
.product-price { color:#0b1e44; font-weight:700; }

/* offline-side*/
.offline {
  min-height: 100vh;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;

  background: linear-gradient(180deg, #f7f9ff 0%, #eaf0ff 100%);
}

.offline::before {
  content: "📡";
  font-size: 3rem;
  margin-bottom: 1rem;
}

.offline h1 {
  font-size: 1.6rem;
  font-weight: 600;
  color: #0e0c3a;
  margin-bottom: 0.75rem;
}

.offline p {
  font-size: 1rem;
  color: #4a5d8f;
  line-height: 1.6;
  max-width: 280px;
  margin: 0 auto 0.5rem;
}

.offline p:last-child {
  margin-top: 1rem;
  font-weight: 500;
}

@supports (padding: env(safe-area-inset-bottom)) {
  .offline {
    padding-bottom: calc(2rem + env(safe-area-inset-bottom));
  }
}

/* PWA Bottom Navigation*/
.pwa-bottom-nav {
    display: none; /* SKAL være default */
}

@media (display-mode: standalone) {
  .pwa-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;

    display: flex;
    justify-content: space-around;
    align-items: flex-start;

    height: 64px;
    background: #4A90E2;
    border-top: 1px solid rgba(255,255,255,0.15);

    padding-top: 8px;
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 1001;
  }

  .pwa-bottom-nav a {
    flex: 1;
    text-align: center;
    color: white;
    font-size: 0.65rem;
    text-decoration: none;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
  }

  .pwa-bottom-nav i {
    font-size: 1.3rem;
  }

  .pwa-bottom-nav a.active {
    color: #ffcc4d;
  }
}
  
@media (display-mode: standalone) {
  .cart-wrapper {
    display: none;
  }
}

@media (display-mode: standalone) {

  /* Skjult som default */
  header form {
    display: none;
  }

/* PWA SEARCH PAGE */
.pwa-search-page {
      height: calc(100vh - 64px); /* 64px = bottom nav */
      padding: 24px 16px;
      display: flex;
      flex-direction: column;
      justify-content: flex-start;
      background: #F7F9FF;
      overflow: hidden;
  }

.pwa-search-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: left;
    width: 100%;
}

/* Form */
.pwa-search-form {
    width: 100%;
    max-width: 420px;
    display: flex;
    gap: 12px;
}

/* Input */
.pwa-search-input {
    flex: 1;
    padding: 14px 16px;
    font-size: 1rem;
    border-radius: 12px;
    border: 1px solid #d6deeb;
    background: #fff;
}

.pwa-search-input::placeholder {
    color: #8a97a6;
}

/* Button */
.pwa-search-btn {
    padding: 14px 20px;
    font-size: 1rem;
    border-radius: 12px;
    border: none;
    background: #1e2a36;
    color: #fff;
    cursor: pointer;
}

.pwa-search-btn:active {
    transform: scale(0.98);
}
 
  /* PWA – Register link på login*/

/* Skjult som standard (website) */
.pwa-register-link {
    display: none;
    margin-top: 24px;
    text-align: left;
    font-size: 0.9rem;
}

.pwa-register-link a {
    color: #4A90E2;
    font-weight: 600;
    text-decoration: none;
}

.pwa-register-link a:hover {
    text-decoration: underline;
}

/* Kun synlig i PWA */
@media (display-mode: standalone) {
    .pwa-register-link {
        display: block;
    }
}
/* PWA – HIDE HEADER COMPLETELY */
@media (display-mode: standalone) {
  header {
    display: none;
  }

  body {
    padding-top: 0 !important;
  }
}
  
/* Skjul PWA-nav som default (website) */
.pwa-bottom-nav {
    display: none;
}

/* Vis kun i PWA */
@media (display-mode: standalone) {
    .pwa-bottom-nav {
        display: flex;
    }
}

} 
/*PWA – Cart badge*/
@media (display-mode: standalone) {

  .pwa-cart-icon {
    position: relative;
    display: inline-block;
  }

  .pwa-bottom-nav .cart-count {
    position: absolute;
    top: -5px;
    right: -11px;

    background: #F7F9FF;   /* lysegrå baggrund */
    color: #1c2c65;        /* mørkeblå tekst */

    font-size: 11px;
    min-width: 18px;
    padding: 2px 5px;
    border-radius: 50%;
    font-weight: 700;

    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  }
}
  
  /* PWA – Logout button*/
@media (display-mode: standalone) {
    .pwa-logout {
        display: block;
        margin-top: 32px;
        padding: 16px 16px 96px; /* plads over bottom nav */
    }

    .pwa-logout-btn {
        display: block;
        width: 100%;
        text-align: center;

        padding: 14px;
        border-radius: 12px;

        background: #F7F9FF;
        color: #1c2c65;

        font-weight: 600;
        text-decoration: none;
        border: 1px solid #d6deeb;
    }

    .pwa-logout-btn:active {
        transform: scale(0.98);
    }
}

@media (display-mode: standalone) {
    .text-center h1 {
        text-align: left !important;
    }
}

@media (display-mode: standalone) {
      .pwa-chat-title {
        font-size: 1.4rem;
        font-weight: 600;
        margin: 16px 12px 8px;
        padding: 0;
        color: #1e2a36;
    }
}
@media (display-mode: standalone) {
    .pwa-chat-container .vibio-chat-card {
        flex: 1;
        overflow-y: hidden;  
        width: 100%;
        max-width: none;
        margin: 0 12px 12px;
        border-radius: 8px;
        flex-direction: column;
        border: none;
        box-shadow: none;
        display: flex;
    }
}