/* Puudumised - Kalender vaade */
.puudumised-calendar-view {
  max-width: 800px;
  margin: 0 auto;
}

.puudumised-calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.puudumised-kuu-nimi:before,
.puudumised-day-title:before {
  content: url("ikoonid/calendar.svg");
  margin: 0;
  margin-right: 5px;
  transform: scale(0.9);
}

.puudumised-kuu-nimi {
  margin: 0;
  font-size: 1.2em;
  display: flex;
  align-items: center;
}

.puudumised-day-title {
  display: flex;
  font-size: 1.1em;
  align-items: center;
}

.puudumised-nav-btn,
.puudumised-nav-btn:hover,
.puudumised-nav-btn:focus {
  background-color: transparent !important;
  color: #131416 !important;
  padding: 8px 0px 6px 0px !important;
  border: 0px !important;
  height: 32px;
  width: 32px;
}

.puudumised-nav-btn:hover {
  background: #e9e9e9;
}

.puudumised-calendar-grid {
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
}

.puudumised-week-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: #f8f9fa;
  border-bottom: 1px solid #f0eeee;
}

.puudumised-week-header>div {
  padding: 12px 8px;
  text-align: center;
  font-weight: bold;
  color: #131416;
  font-size: 0.9em;
}

.puudumised-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background-color: #fff;
}

.puudumised-day,
.puudumised-day:hover {
  min-height: 90px;
  padding: 8px;
  border-left: solid .1rem #eee;
  border-bottom: solid .1rem #eee;
  position: relative;
  cursor: pointer;
  transition: background-color 0.2s;
}

.puudumised-day:last-child,
.puudumised-day:nth-child(7n) {
  border-right: none;
}

.puudumised-day-number {
  font-weight: bold;
  margin-bottom: 4px;
}

.puudumised-day-today,
.puudumised-day-today:hover {
  background-color: #ffffff;
  color: #131416;
  box-shadow: 0px 0px 0px .105rem #131416 inset !important;
}

.puudumised-day-today:hover,
.puudumised-day:hover {
  color: #0060AD;
  box-shadow: 0px 0px 0px .105rem #0060AD inset !important;
  background-color: #ffffff;
}

.puudumised-day-past {
  opacity: .7;
  cursor: default;
}

.puudumised-day-past:hover {
  box-shadow: none !important;
  background-color: #fbfbfb;
  color: #131416;
}

.puudumised-day-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 2px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.puudumised-day-check.puudumised-present {
  background: #28a745;
  color: white;
  font-weight: 600;
}

.puudumised-day-check.puudumised-present:hover {
  background: #218838;
}

.puudumised-day-check.puudumised-absent {
  background: #dc3545;
  color: white;
  font-weight: 600;
}

.puudumised-day-check.puudumised-absent:hover {
  background: #c82333;
}

.puudumised-day-check::before {
  content: "✓";
}

.puudumised-day-check.puudumised-absent::before {
  content: "✗";
}

.puudumised-day-other-month {
  opacity: 0.3;
  cursor: default;
}

.puudumised-day-other-month:hover {
  background: transparent;
}

/* Detail vaade */
.puudumised-day-view {
  max-width: 600px;
  margin: 0 auto;
}

.puudumised-day-header {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.puudumised-back-btn {
  background: #6c757d;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 8px 16px;
  cursor: pointer;
  margin-right: 16px;
}

.puudumised-back-btn:hover {
  background: #5a6268;
}

.puudumised-day-title {
  margin: 0;
}

.puudumised-tunnid-list {
  margin-bottom: 20px;
}

.puudumised-tund {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-bottom: 12px;
  background: white;
}

.puudumised-tund-info {
  flex: 1;
}

.puudumised-tund-nimi {
  font-weight: bold;
  margin-bottom: 4px;
}

.puudumised-tund-aeg, .puudumised-tund-asukoht {
  align-items: center;
  color: #666;
  font-size: 0.9em;
  display: flex;
}
.puudumised-tund-aeg {
  margin-top:-5px;
}
.puudumised-tund-asukoht:before {
  content: url("ikoonid/location.svg");
  margin: 0;
  vertical-align: middle;
  margin-right: 5px;
  opacity: .5;
}
.puudumised-tund-aeg:before {
  content: url("ikoonid/calendar_clock.svg");
  margin: 0;
  vertical-align: middle;
  margin-right: 5px;
  opacity: .5;
}


.puudumised-tund-control {
  margin-left: 16px;
}

/* Switch/slider kontroll */
.puudumised-switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.puudumised-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.puudumised-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #FED9D8;
  transition: .4s;
  border-radius: 34px;
}

.puudumised-slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked+.puudumised-slider {
  background-color: #28a745;
}

input:checked+.puudumised-slider:before {
  transform: translateX(26px);
}

.puudumised-slider:after {
  content: "Puudumine";
  position: absolute;
  right: 8px;
  top: -8px;
  transform: translateY(-50%);
  font-size: 10px;
  color: #666;
}

input:checked+.puudumised-slider:after {
  content: "Kohal";
  left: 8px;
  right: auto;
}

/* Tegevused */
.puudumised-actions {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.puudumised-save-btn {
  background: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 12px 24px;
  font-size: 1em;
  cursor: pointer;
}

.puudumised-save-btn:hover {
  background: #0056b3;
}

/* Responsive */
@media (max-width: 768px) {
  .puudumised-calendar-view {
    margin: 0 10px;
  }
 
  .puudumised-tund {
    flex-direction: column;
    align-items: flex-start;
  }

  .puudumised-tund-control {
    margin-left: 0;
    margin-top: 8px;
    align-self: flex-end;
  }
}
