body {
  background: #ffffff; /* håll body helvit */
  margin: 0;
}

.main-wrapper {
  background: linear-gradient(to bottom, #bad7f1 0%, #ffffff 100%);
}
.main-wrapper {
  padding-top: 2rem;
}

body.page-template-page-optikbok .nav-btm a[href="/boka-synundersokning/"] {
  display: none !important;
}



/* === Grundläggande layout för kalenderrutor === */
.optikbok-container .fc .fc-daygrid-day-frame {
  aspect-ratio: 1 / 1;
  position: relative;
  overflow: hidden;
  height: auto;
  min-height: 50px;
  border-radius: 0 !important;
  
}

/* === Bakgrunder och statusfärger === */
.optikbok-container .fc-daygrid-day.disabled-day {
  background-color: #f5f5f5;
}

.optikbok-container .fc-daygrid-day.available-day .fc-daygrid-day-frame {
  border: 2px solid #005eaa !important;
  background-color: #fff !important;
  inset: 0;
  width: 100%;
  height: 100%;
}

.optikbok-container .fc-daygrid-day.selected-day .fc-daygrid-day-frame,
.optikbok-container .fc-daygrid-day.selected-day .fc-daygrid-day-frame * {
  color: #fff !important;
}

.optikbok-container .fc-daygrid-day.available-day:not(.selected-day) .fc-daygrid-day-frame:hover {
  background-color: #e6f7ff !important;
  color: #005eaa !important;
  cursor: pointer;
}

.optikbok-container .fc-daygrid-day.selected-day .fc-daygrid-day-frame {
  background-color: #005eaa !important;
  color: #fff !important;
  border-color: #004080 !important;
}

.optikbok-container .fc-daygrid-day.disabled-day .fc-daygrid-day-frame {
  border: none !important;
  background-color: #f5f5f5 !important;
  color: #ccc !important;
  pointer-events: none !important;
}

/* === Full höjd på bakgrund i celler === */
.optikbok-container .fc-daygrid-day-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.optikbok-container .fc .fc-daygrid-day-top {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.fc-prev-disabled {
  opacity: 0 !important;
  pointer-events: none;
  cursor: default;
}


/* === Formulär: butiksväljare & inputs === */
#store {
  width: 100%;
  padding: 0.5rem;
  margin-top: 0.25rem;
  margin-bottom: 1rem;
  border: 1px solid grey;
  border-radius: 0.25rem;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 1rem;
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg fill="%23000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.5rem;
  padding-right: 2.5rem; /* för plats till pilen */
}

.spinner {
  display: inline-block;
  width: 1em;
  height: 1em;
  border: 2px solid #ccc;
  border-top: 2px solid #005eaa; /* blå topp för visuell effekt */
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-right: 0.5rem;
  vertical-align: middle;
}

@keyframes spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* === Nytt: kalenderns egen laddningsindikator === */
#loading-calendar {
  display: none;
  text-align: center;
  padding: 1.25rem;
}
#loading-calendar .spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(0,0,0,0.15);
  border-top-color: rgba(0,0,0,0.55);
  border-radius: 50%;
  margin: 0 auto;
  animation: spin 0.8s linear infinite;
}

#booking-form h2 {
    font-size: 1.7rem;        /* Gör rubriken större */
    font-weight: 700;
    margin-bottom: 1.2rem;      /* Avstånd ner till första label/fält */
    margin-top: 0.8rem;       /* Avstånd upp till rubriken om du vill ha luft ovanför */
    letter-spacing: 0.04em;
    text-align: left;
}

#booking-form label {
  display: block;
  margin-bottom: 0.6rem;
	font-size: 1.1rem; 
}

#booking-form input,
#booking-form textarea {
  width: 100%;
  padding: 0.6rem;
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid #ccc;
  border-radius: 0.25rem;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 1rem;
}

#booking-form textarea {
  min-height: 80px;
  resize: vertical;
}

#booking-form button {
  margin-top: 0.5rem;
}

#booking-form button[type="submit"] {
  display: inline-block;
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: #005eaa;
  color: white;
  font-size: 1.25rem;
  font-weight: 600;
  border: none;
  border-radius: 2.3rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#booking-form button[type="submit"]:hover {
  background-color: #004080;
}

#booking-form button[type="submit"]:active {
  background-color: #003366;
}

/* === Etiketter (labels) === */
.optikbok-container .store-label,
.optikbok-container .calendar-label,
.optikbok-container .times-container-label,
.optikbok-container .time-list-label {
  display: flex !important;
  flex-flow: column nowrap !important;
  justify-content: center !important;
  position: relative !important;
  color: black !important;
  font-weight: 700 !important;
  font-size: 19px;
  line-height: 3.0 !important;
  z-index: 0;
}


/* === Scroll och allmän container === */
.optikbok-container {
  max-width: 360px;
  margin: 7rem auto;  
  --fc-neutral-bg-color: #fff;
}


.optikbok-container .fc-scrollgrid {
  position: relative !important;
  z-index: 1 !important;
}

.fc .fc-button-primary {
  background-color: white;
}

.fc .fc-button:disabled {
    opacity: 1; 
	background-color: white
}

.fc .fc-button-primary:hover {
  background-color: #e6f7ff !important; /* Ljusblå på hover */
  color: #005eaa !important;
  border-color: #004080 !important;
}

.fc .fc-button-primary:active {
  background-color: #005eaa !important; /* Mörkare blå vid klick */
  color: #fff !important;
  border-color: #004080 !important;
}

/* färg veckodagar i kalendern */
.fc .fc-col-header thead th {
  background-color: #0c6bbb;   
 
}

.fc .fc-col-header-cell-cushion {
    display: inline-block;
    padding: 6px 0px;
	color: #fff;
	font-weight: 600;
}

.fc .fc-toolbar-title {
  font-size: 1.5rem; !important       /* Justera om nödvändigt */
  line-height: normal;     /* Återställs från globala h2 */
  padding: 0;              /* Ta bort padding från global regel */
  text-align: center;      /* Säkerställ centrering */
  width: 100%;
}

.optikbok-container .fc .fc-highlight {
  background: transparent !important;
}

* {
  text-decoration: none;
  color: black;
}

#calendar {
  margin-bottom: 1.5rem;
}

.legend-dot {
  width: 6px;
  height: 6px;
  background-color: #08a129;
  border-radius: 50%;
  display: inline-block;
  margin-right: 0.5rem;
}

.calendar-legend {
  font-size: 1.2rem; 
  display: flex;
  align-items: center;
  gap: 0.1rem;
  margin-top: 0.5rem;
  margin-bottom: 3rem;
}

.availability-dot {
  width: 6px;
  height: 6px;
  background-color: #08a129; 
  border-radius: 50%;
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}



.available-day-box {
  border-color: #005eaa;
}


#times-container {
  margin-bottom: 2rem;
}

/* === Tidsval === */
.time-list {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  list-style: none;
  padding: 0;
}

.time-btn {
  display: block;
  width: 100%;
  padding: 0.6rem 0;
  border: 2px solid #005eaa;
  border-radius: 0.25rem;
  background: #fff;
  color: black;
  font-size: 0.9rem;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s;
}

.time-btn:hover {
  background: #e6f7ff;
}

.time-btn.selected {
  background: #005eaa;
  color: #fff;
  border-color: #004080;
}

/* === Exam-knappar === */
.exam-list {
  display: flex;
  gap: 1rem;
  list-style: none;
  margin: 0rem 0 2.5rem;
  flex-wrap: wrap;
  justify-content: space-around;
  align-items: stretch;
  align-content: center;
  flex-direction: column;
}

.exam-list li {
  margin: 0;
  padding: 0;
}

.exam-btn {
  display: block;
  width: 100%;
  padding: 0.7rem 0;
  border: 2px solid #005eaa;
  border-radius: 0.25rem;
  background: #fff;
  
  font-size: 0.9rem;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.exam-btn:hover {
  background-color: #e6f7ff;
  color: #005eaa;
}

.exam-btn.selected {
  background-color: #005eaa;
  color: #fff;
  border-color: #004080;
}


/* === Media queries === */
@media (max-width: 480px) {
  .optikbok-container h1 {
    font-size: 1.75rem;
  }
	
.fc .fc-toolbar-title { 
  font-size: 1.75rem; !important
 }

  .exam-list {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0;
  }

  .exam-btn {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .optikbok-container #store {
    width: 100%;
    height: 3rem;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    line-height: 1.2;
    border-radius: 0.25rem;
    border: 1px solid grey;
    box-sizing: border-box;
    margin-bottom: 3rem;
	background-color: #fff;
	background-size: 2.0rem;
    
  }

  .optikbok-container #store:focus {
    outline: none;
    border-color: #005eaa;
    box-shadow: 0 0 0 3px rgba(0, 94, 170, 0.2);
  }

  .optikbok-container .fc .fc-daygrid-day-frame {
    width: 47.4px;
    height: 47.4px;
  }
	
  
	
  .optikbok-container .fc .fc-daygrid-day {
    width: 14.2857% !important;
  }
  .optikbok-container .fc .fc-daygrid-day-frame {
    width: 100% !important;
    height: 100% !important;
    
    box-sizing: border-box;
  }
	
  .optikbok-container .fc-daygrid-day-frame,
  .optikbok-container .fc-daygrid-day-frame .fc-daygrid-day-top,
  .optikbok-container .fc-daygrid-day-frame .fc-daygrid-day-bottom,
  .optikbok-container .fc-daygrid-day-frame .fc-daygrid-day-bg {
    padding: 0 !important;
    margin: 0 !important;
  }
}

@media (max-width: 360px) {
  .optikbok-inner,
  .time-list,
  .exam-list,
  #booking-form,
  .times-container-label,
  .time-list-label {
    padding: 0 0.7rem;
  }
}

/* Robust överskuggning av svart label-färg vid fel */
.optikbok-container .label-error { color: red !important; }


