/* Smart date-input + datepicker-popup styling */

.smart-date-wrapper {
  position: relative;
  display:  inline-block;
}

.smart-date-wrapper input.smart-date {
  padding-right: 32px;  /* plats för datepicker-knappen inuti fältet */
}

input.smart-date.smart-date-error {
  border-color:     #d97706;
  background-color: #fef3c7;
}

.smart-date-picker-btn {
  position:    absolute;
  right:       6px;
  top:         50%;
  transform:   translateY(-50%);
  background:  none;
  border:      none;
  padding:     2px;
  cursor:      pointer;
  font-size:   16px;
  line-height: 1;
  z-index:     1;
}
.smart-date-picker-btn:hover {
  background-color: #f3f4f6;
  border-radius:    4px;
}

/* Popup */
.smart-date-picker-popup {
  background:  #fff;
  border:      1px solid #d1d5db;
  border-radius: 8px;
  box-shadow:  0 10px 25px rgba(0, 0, 0, 0.15);
  padding:     12px;
  width:       280px;
  z-index:     1000;
  font-family: inherit;
  font-size:   14px;
}

.sdp-header {
  display: flex;
  justify-content: space-between;
  align-items:     center;
  margin-bottom:   8px;
}
.sdp-nav {
  background:     none;
  border:         1px solid #d1d5db;
  border-radius:  4px;
  padding:        4px 10px;
  cursor:         pointer;
  font-size:      14px;
}
.sdp-nav:hover { background-color: #f3f4f6; }
.sdp-title {
  font-weight: 600;
  color:       #1f2937;
}

.sdp-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap:     2px;
  margin-bottom: 4px;
}
.sdp-weekday {
  text-align: center;
  font-size:  11px;
  color:      #6b7280;
  padding:    4px 0;
}

.sdp-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap:     2px;
}
.sdp-day {
  background:    none;
  border:        none;
  padding:       6px 0;
  text-align:    center;
  cursor:        pointer;
  border-radius: 4px;
  font-size:     14px;
}
.sdp-day:hover:not(.sdp-empty) {
  background-color: #e5e7eb;
}
.sdp-empty { cursor: default; }

.sdp-footer {
  margin-top:    8px;
  padding-top:   8px;
  border-top:    1px solid #e5e7eb;
  text-align:    center;
}
.sdp-today {
  background-color: #2563eb;
  color:            #fff;
  border:           none;
  padding:          6px 16px;
  border-radius:    4px;
  cursor:           pointer;
  font-size:        13px;
}
.sdp-today:hover { background-color: #1d4ed8; }
