.rypo-dtp,
.rypo-dtp * {
  box-sizing: border-box;
}

.rypo-dtp[hidden] {
  display: none;
}

.rypo-dtp {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  color: #102f58;
  
  Manrope, Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.rypo-dtp-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(8, 36, 72, .54);
  cursor: pointer;
  backdrop-filter: blur(4px);
}

.rypo-dtp-dialog {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: calc(100vh - 36px);
  overflow: hidden;
  border: 1px solid #d8e1ec;
  border-radius: 20px;
  outline: none;
  background: #fff;
  box-shadow: 0 28px 80px rgba(7, 34, 68, .28);
}

.rypo-dtp-main {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(290px, .88fr);
  padding: 20px 20px 16px;
}

.rypo-dtp-date-pane {
  min-width: 0;
  padding-right: 21px;
  border-right: 1px solid #dce4ed;
}

.rypo-dtp-time-pane {
  min-width: 0;
  padding-left: 21px;
}

.rypo-dtp-time-pane[hidden] {
  display: none;
}

.rypo-dtp h2 {
  margin: 0;
  color: #12345f;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
}

.rypo-dtp h2 span {
  color: #12345f;
}

.rypo-dtp-time-pane > p {
  margin: 7px 0 15px;
  color: #7890a9;
  font-size: 13px;
  line-height: 1.4;
}

.rypo-dtp-month-bar {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 3px;
}

.rypo-dtp-month-bar > strong {
  color: #173b68;
  font-size: 15px;
  font-weight: 800;
}

.rypo-dtp-month-bar > div {
  display: flex;
  gap: 8px;
}

.rypo-dtp-month-bar button {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  margin: 0;
  padding: 0 0 3px;
  border: 1px solid #d6e0ec;
  border-radius: 11px;
  color: #35618e;
  background: #fff;
  font: 400 28px/1 system-ui, sans-serif;
  cursor: pointer;
}

.rypo-dtp-month-bar button:hover:not(:disabled) {
  border-color: #9bb8da;
  background: #f3f7fc;
}

.rypo-dtp-month-bar button:disabled {
  color: #b9c6d4;
  background: #f7f9fb;
  cursor: not-allowed;
}

.rypo-dtp-weekdays,
.rypo-dtp-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.rypo-dtp-weekdays {
  margin: 4px 0 5px;
}

.rypo-dtp-weekdays span {
  display: grid;
  min-height: 28px;
  place-items: center;
  color: #8799ad;
  font-size: 9px;
  font-weight: 850;
}

.rypo-dtp-calendar button {
  display: grid;
  min-width: 0;
  height: 37px;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #344d69;
  background: transparent;
  font: 600 12px/1 Manrope, Inter, system-ui, sans-serif;
  cursor: pointer;
}

.rypo-dtp-calendar button:hover:not(:disabled):not(.is-selected) {
  border-color: #c8d8ea;
  background: #f3f7fc;
}

.rypo-dtp-calendar button.is-outside {
  color: #bdc9d6;
}

.rypo-dtp-calendar button.is-today:not(.is-selected) {
  border-color: #9fc0e5;
  color: #1d5fa9;
}

.rypo-dtp-calendar button.is-selected {
  border-color: #3477c9;
  color: #fff;
  background: #3477c9;
  box-shadow: 0 7px 16px rgba(52, 119, 201, .24);
}

.rypo-dtp-calendar button:disabled {
  color: #c5cfda;
  background: transparent;
  cursor: not-allowed;
}

.rypo-dtp-slots {
  display: grid;
  max-height: 302px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  overflow-y: auto;
  padding: 1px 7px 1px 0;
  scrollbar-color: #8b929a transparent;
  scrollbar-width: thin;
}

.rypo-dtp-slots::-webkit-scrollbar {
  width: 6px;
}

.rypo-dtp-slots::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #8b929a;
}

.rypo-dtp-slots button {
  min-height: 43px;
  margin: 0;
  padding: 9px 7px;
  border: 1px solid #dce4ed;
  border-radius: 11px;
  color: #123b70;
  background: #fff;
  font: 750 11px/1.2 Manrope, Inter, system-ui, sans-serif;
  cursor: pointer;
}

.rypo-dtp-slots button:hover:not(:disabled):not(.is-selected) {
  border-color: #93b7e0;
  background: #f5f9fe;
}

.rypo-dtp-slots button.is-selected {
  border-color: #3477c9;
  color: #fff;
  background: #3477c9;
  box-shadow: 0 7px 16px rgba(52, 119, 201, .18);
}

.rypo-dtp-slots button:disabled {
  color: #aebdd0;
  background: #fbfcfd;
  cursor: not-allowed;
}

.rypo-dtp-summary {
  display: flex;
  min-height: 53px;
  align-items: center;
  gap: 10px;
  margin: 0 20px;
  padding: 12px 14px;
  border: 1px solid #cfe0f5;
  border-radius: 12px;
  color: #173d6c;
  background: #f1f6fd;
}

.rypo-dtp-summary svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: #3477c9;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.rypo-dtp-summary strong {
  font-size: 14px;
  font-weight: 800;
}

.rypo-dtp-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 17px 20px 19px;
}

.rypo-dtp-actions button {
  min-width: 96px;
  min-height: 43px;
  margin: 0;
  padding: 10px 18px;
  border-radius: 11px;
  font: 800 13px/1 Manrope, Inter, system-ui, sans-serif;
  cursor: pointer;
}

.rypo-dtp-cancel {
  border: 1px solid #d5dfeb;
  color: #17395f;
  background: #fff;
}

.rypo-dtp-confirm {
  border: 1px solid #f1283d;
  color: #fff;
  background: linear-gradient(135deg, #ec2336, #ff4f61);
  box-shadow: 0 9px 20px rgba(236, 35, 54, .18);
}

.rypo-dtp-confirm:disabled {
  border-color: #f1b7bd;
  color: #fff;
  background: #f3b0b5;
  box-shadow: none;
  cursor: not-allowed;
}

.rypo-dtp.is-date-only .rypo-dtp-dialog {
  width: min(470px, 100%);
}

.rypo-dtp.is-date-only .rypo-dtp-main {
  grid-template-columns: 1fr;
}

.rypo-dtp.is-date-only .rypo-dtp-date-pane {
  padding-right: 0;
  border-right: 0;
}

.rypo-dtp-control {
  cursor: pointer !important;
}

input.rypo-dtp-control::-webkit-calendar-picker-indicator {
  opacity: 0;
  pointer-events: none;
}

body.rypo-dtp-open {
  overflow: hidden;
}

@media (max-width: 700px) {
  .rypo-dtp {
    align-items: end;
    padding: 10px;
  }

  .rypo-dtp-dialog {
    max-height: calc(100vh - 20px);
    overflow-y: auto;
    border-radius: 18px;
  }

  .rypo-dtp-main {
    grid-template-columns: 1fr;
    padding: 18px 15px 13px;
  }

  .rypo-dtp-date-pane {
    padding: 0 0 15px;
    border-right: 0;
    border-bottom: 1px solid #dce4ed;
  }

  .rypo-dtp-time-pane {
    padding: 16px 0 0;
  }

  .rypo-dtp-calendar button {
    height: 34px;
  }

  .rypo-dtp-slots {
    max-height: 190px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .rypo-dtp-slots button {
    min-height: 39px;
    font-size: 9px;
  }

  .rypo-dtp-summary {
    min-height: 48px;
    margin: 0 15px;
    padding: 10px 12px;
  }

  .rypo-dtp-summary strong {
    font-size: 13px;
  }

  .rypo-dtp-actions {
    padding: 13px 15px 16px;
  }

  .rypo-dtp-actions button {
    min-width: 88px;
    min-height: 41px;
    font-size: 15px;
  }

  .rypo-dtp.is-date-only .rypo-dtp-date-pane {
    padding-bottom: 0;
    border-bottom: 0;
  }
}

@media (max-width: 430px) {
  .rypo-dtp-slots {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
