/* GENERELT FOR BESTILL-SIDEN */

main.container {
  padding: 104px 1rem 1rem; /* topp-padding for header */
}

section {
  margin: 1.5rem 0;
}

.card {
  background: var(--card);
  padding: 1.2rem;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(16,24,40,0.04);
}

/* ✅ Viktig: når vi bruker bookingUI.hidden = true */
#bookingUI[hidden] {
  display: none !important;
}

/* GRID FOR ANSATTE */

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 800px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.ansatt-bilde {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* TEKST */

.muted {
  color: var(--muted);
}

.date-hint {
  font-size: 0.85rem;
  color: var(--accent-2);
  margin-top: 0.25rem;
}

/* SKJEMA */

form label {
  display: block;
  font-weight: 600;
  margin: 0.5rem 0 0.25rem;
}

input,
textarea,
select {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 10px;
  font-size: 1rem;
}

textarea {
  resize: vertical;
}

button {
  background: var(--accent);
  color: white;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  border: 0;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  opacity: 0.9;
}

/* FOOTER-TILPASNING */

footer {
  padding: 2rem 0;
  color: var(--muted);
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-social {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.footer-social a {
  display: flex;
  width: 26px;
  height: 26px;
  opacity: 0.8;
  transition: 0.2s;
}

.footer-social a:hover {
  opacity: 1;
  transform: scale(1.1);
}

@media (max-width: 768px) {
  .container {
    padding-left: 0.06rem;   /* mindre luft på sidene */
    padding-right: 0.06rem;
  }
}

/* FOOTER: juster innholdet */
footer .container {
  padding-left: 1rem;   /* skyver tekst inn fra venstre */
  padding-right: 1rem;  /* skyver ikonene inn fra høyre */
}

/* Slot-knapper: vis tekst */
.slot-btn {
  background: #fff;
  color: #0f172a;
  border: 1px solid rgba(15,23,42,0.12);
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  font-weight: 700;
}

.slot-btn:hover {
  background: rgba(15,23,42,0.04);
}

.slot-btn[aria-pressed="true"] {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

/* ===== Booking-melding (suksess/feil) ===== */
#message {
  margin-top: 14px;
}

/* Suksess */
#message.ok {
  display: flex;
  align-items: flex-start;
  gap: 10px;

  padding: 12px 14px;
  border-radius: 12px;

  background: #ecfdf5;                 /* lys grønn */
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #065f46;                      /* mørk grønn */

  font-weight: 800;
  line-height: 1.25;
}

#message.ok::before {
  content: "✅";
  font-size: 1.1rem;
  line-height: 1.1;
  margin-top: 1px;
}

/* Feil */
#message.error {
  display: flex;
  align-items: flex-start;
  gap: 10px;

  padding: 12px 14px;
  border-radius: 12px;

  background: #fef2f2;                 /* lys rød */
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #991b1b;

  font-weight: 800;
  line-height: 1.25;
}

#message.error::before {
  content: "⚠️";
  font-size: 1.1rem;
  line-height: 1.1;
  margin-top: 1px;
}

@keyframes pop {
  from { transform: translateY(-6px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

#message.ok, #message.error {
  animation: pop 0.3s ease-out;
}

/* ===============================
   PRIVACY CONSENT (bestill)
   =============================== */
.privacy-consent {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.privacy-consent input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.privacy-consent label {
  cursor: pointer;
  line-height: 1.4;
  white-space: normal;
  margin: 0;
  flex: 1;
  transform: translateY(-2px);
}

.privacy-consent .info-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  border: none;
  background: var(--accent);
  font-size: 0.9rem;
  color: white;
  transform: translateY(-14px);
}

.privacy-consent .info-btn:hover {
  background: #1f5f5b;
  color: white;
}

.info-icon {
  width: 32px;
  height: 32px;
  display: block;
  pointer-events: none;
  fill: currentColor;
}

.privacy-info {
  display: none;
  width: 100%;
  background: #f5f5f5;
  border: 1px solid #ccc;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  line-height: 1.4;
}

.privacy-info.show {
  display: block;
}

@media (max-width: 480px) {
  .privacy-consent {
    flex-direction: column;
    align-items: flex-start;
  }

  .privacy-consent .info-btn {
    margin-top: 0.3rem;
    transform: none;
  }

  .privacy-consent label {
    transform: none;
  }
}

#bookingForm {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#bookingForm .privacy-consent {
  margin-top: 0.25rem;
}

/* Større input-bokser på bestill-siden */
#bookingForm input,
#bookingForm select {
  padding: 0.9rem 1rem;
  font-size: 1rem;
  border-radius: 10px;
}

#bookingForm textarea {
  padding: 0.9rem 1rem;
  font-size: 1rem;
  border-radius: 12px;
  min-height: 160px;
}

#bookingForm input,
#bookingForm textarea,
#bookingForm select {
  font-family: inherit;
}

.confirm-box{
  margin-top:1rem;
  padding:1rem;
  border:1px solid rgba(15,23,42,.12);
  border-radius:14px;
  background:rgba(16,185,129,0.06);
}

.confirm-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:.75rem 1rem;
}

@media (max-width:700px){
  .confirm-grid{ grid-template-columns:1fr; }
}

.confirm-grid > div{
  padding:.65rem .75rem;
  border:1px solid rgba(15,23,42,.08);
  border-radius:12px;
  background:#fff;
}

/* ===== KALENDER (mobil + pc, stabil) ===== */
.cal{
  margin-top: .35rem;
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 14px;
  padding: .9rem;
  background: #fff;

  width: 100%;
  max-width: 520px;
  box-sizing: border-box;
  overflow: hidden;
}

.cal-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .65rem;
}

.cal-title{
  font-weight: 800;
  text-transform: capitalize;
}

.cal-nav{
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,.12);

  background: #fff;
  color: #0f172a;

  font-size: 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.cal-weekdays{
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: .35rem;
  margin-bottom: .35rem;

  color: var(--muted);
  font-weight: 700;
  font-size: .85rem;
  text-align: center;
}

.cal-grid{
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: .35rem;
  width: 100%;
}

/* tomme "leading" celler må ikke presse grid */
.cal-grid > div{
  min-width: 0;
}

/* DAG-KNAPP */
.cal-day{
  width: 100%;
  min-width: 0;
  height: 46px;

  border-radius: 12px;
  border: 1px solid rgba(15,23,42,.10);

  background: #fff;
  color: #0f172a;

  font-weight: 800;
  font-size: 1rem;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0;
  cursor: pointer;

  -webkit-tap-highlight-color: transparent;

  /* viktig på mobil: fjerner grå "tap" overlay/outline-effekter */
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

/* hover (desktop) */
@media (hover:hover){
  .cal-day:hover:not(:disabled){
    background: rgba(15,23,42,.04);
  }
}

/* disabled */
.cal-day:disabled{
  opacity: .35;
  cursor: not-allowed;
  background: #f8fafc;
}

/* i dag */
.cal-day.is-today{
  box-shadow: 0 0 0 3px rgba(0,0,0,0.05);
}

/* tilgjengelighet-prikk */
.cal-day.has-availability{
  position: relative;
}
.cal-day.has-availability::after{
  content: "";
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(16,185,129,0.9);
}

/* ========= VALGT DAG (MÅ VINNE OVER ALT, inkl. mobil :active/:focus) ========= */
.cal .cal-day.is-selected,
.cal .cal-day.is-selected:hover,
.cal .cal-day.is-selected:active,
.cal .cal-day.is-selected:focus,
.cal .cal-day.is-selected:focus-visible{
  background: var(--accent) !important;
  color: #fff !important;
  border-color: transparent !important;
  opacity: 1 !important;
}

/* prikk på valgt dag */
.cal .cal-day.is-selected.has-availability::after{
  background: rgba(255,255,255,0.9) !important;
}

/* hvis valgt dag av en eller annen grunn blir disabled: behold valgt-stil */
.cal .cal-day.is-selected:disabled{
  background: var(--accent) !important;
  color: #fff !important;
  border-color: transparent !important;
  opacity: 1 !important;
}
