.dorsa-book-trigger {
  cursor: pointer;
}

.dorsa-modal[hidden] {
  display: none !important;
}

.dorsa-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  overflow: hidden;
}

.dorsa-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(29, 58, 82, 0.55);
  backdrop-filter: blur(4px);
}

.dorsa-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: min(88vh, 720px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(91, 164, 214, 0.3);
  padding: 0;
  box-shadow: 0 24px 60px rgba(61, 120, 160, 0.22);
  direction: rtl;
  text-align: right;
  font-family: "IRANSans", Tahoma, sans-serif;
  color: #1d3a52;
}

.dorsa-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex: 0 0 auto;
  padding: 0.95rem 1.1rem;
  border-bottom: 1px solid rgba(91, 164, 214, 0.18);
  background: #f8fcff;
}

.dorsa-modal__title {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #3f8fc7;
  line-height: 1.35;
}

.dorsa-modal__x {
  position: static;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 0;
  background: #fff;
  border-radius: 999px;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  color: #5d7d96;
  box-shadow: 0 2px 8px rgba(61, 120, 160, 0.12);
}

.dorsa-modal__x:hover {
  color: #1d3a52;
  background: #eef6fc;
}

.dorsa-modal__form {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 1rem 1.25rem 1.25rem;
}

.dorsa-field {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 1rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.dorsa-field input[type="text"],
.dorsa-field input[type="tel"] {
  width: 100%;
  min-height: 46px;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(91, 164, 214, 0.35);
  background: #fff;
  font: inherit;
  font-weight: 500;
  color: #1d3a52;
  border-radius: 0.5rem;
}

.dorsa-field input:focus {
  outline: 2px solid rgba(91, 164, 214, 0.45);
  border-color: #5ba4d6;
}

.dorsa-services,
.dorsa-dates,
.dorsa-times {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.dorsa-service-btn,
.dorsa-date-btn,
.dorsa-time-btn {
  min-height: 42px;
  padding: 0.4rem 0.75rem;
  border: 1px solid rgba(91, 164, 214, 0.3);
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  color: #1d3a52;
  border-radius: 0.45rem;
}

.dorsa-date-btn small {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  color: #5d7d96;
}

.dorsa-service-btn.is-active,
.dorsa-date-btn.is-active,
.dorsa-time-btn.is-active {
  background: #5ba4d6;
  border-color: #5ba4d6;
  color: #fff;
}

.dorsa-date-btn.is-active small {
  color: rgba(255, 255, 255, 0.9);
}

.dorsa-service-btn:hover,
.dorsa-date-btn:hover,
.dorsa-time-btn:hover {
  border-color: #3f8fc7;
}

.dorsa-time-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.dorsa-modal__msg {
  margin: 0 0 0.85rem;
  padding: 0.7rem 0.8rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 0.45rem;
}

.dorsa-modal__msg.is-ok {
  background: #eaf7ef;
  color: #1f6b3a;
}

.dorsa-modal__msg.is-err {
  background: #eef6fc;
  color: #3f8fc7;
}

.dorsa-modal__submit {
  position: sticky;
  bottom: 0;
  width: 100%;
  min-height: 50px;
  margin-top: 0.25rem;
  border: 0;
  border-radius: 0.55rem;
  background: linear-gradient(135deg, #9fd0ef, #5ba4d6 45%, #3f8fc7);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 -8px 20px rgba(255, 255, 255, 0.9);
}

.dorsa-modal__submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.dorsa-modal__submit:hover:not(:disabled) {
  background: linear-gradient(135deg, #5ba4d6, #3f8fc7);
}
