﻿.akf-appointment-root {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 20px 0;
}

@media (min-width: 900px) {
  .akf-appointment-root {
    grid-template-columns: 1fr 1fr;
  }

  .akf-appointment-form {
    grid-column: 1 / span 2;
  }
}

.akf-appointment-calendar,
.akf-appointment-slots,
.akf-appointment-selected,
.akf-appointment-form {
  border: 1px solid #d8dee5;
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.akf-calendar-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.akf-calendar-nav {
  border: 1px solid #c6ced8;
  border-radius: 6px;
  background: #f7f9fb;
  padding: 4px 10px;
  cursor: pointer;
}

.akf-calendar-table {
  width: 100%;
  border-collapse: collapse;
}

.akf-calendar-table th,
.akf-calendar-table td {
  text-align: center;
  border: 1px solid #e5eaf0;
  padding: 8px;
  min-width: 34px;
}

.akf-calendar-table td.has-slots {
  background: #eef8ee;
  cursor: pointer;
  font-weight: 600;
}

.akf-calendar-table td.has-slots.is-selected {
  background: #2e8b57;
  color: #fff;
}

.akf-calendar-table td.is-disabled,
.akf-calendar-table td.is-empty {
  background: #f8fafc;
  color: #9aa7b5;
}

.akf-slot-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.akf-slot-button {
  border: 1px solid #b9c7d7;
  border-radius: 6px;
  background: #fff;
  padding: 7px 10px;
  cursor: pointer;
}

button.akf-slot-button:not(:hover):not(.is-selected) {
  color: #283055;
}

button.akf-calendar-nav:not(:hover) {
  color: #283055;
}

.akf-slot-button.is-selected {
  background: #0d4f8c;
  border-color: #0d4f8c;
  color: #fff;
}

.akf-appointment-selected {
  font-weight: 600;
}

.akf-appointment-notice {
  border: 1px solid #f3c36b;
  background: #fff9e8;
  padding: 10px;
}

.akf-front-notice {
  border-radius: 8px;
  padding: 10px 12px;
  font-weight: 600;
}

.akf-front-notice-success {
  border: 1px solid #9bd1a6;
  background: #eefaf0;
  color: #1f5e2f;
}

.akf-front-notice-error {
  border: 1px solid #efb3b3;
  background: #fff3f3;
  color: #8f1d1d;
}

.akf-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px 12px;
}

@media (min-width: 720px) {
  .akf-form-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.akf-appointment-form p {
  margin: 0 0 10px;
}

.akf-appointment-form label {
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
}

.akf-appointment-form input[type='text'],
.akf-appointment-form input[type='email'] {
  width: 100%;
}

.akf-appointment-form button[type='submit'] {
  position: relative;
  min-width: 170px;
}

.akf-appointment-form button[type='submit']:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.akf-appointment-form button[type='submit'].is-loading {
  padding-left: 34px;
}

.akf-appointment-form button[type='submit'].is-loading::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: akf-spin 0.7s linear infinite;
}

@keyframes akf-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
