.edp-container {
  position: relative;
  width: 100%;
  min-width: 0;
}

.edp-container .edp-display {
  width: 100%;
  padding-right: 72px;
  cursor: pointer;
  background-color: #fff;
}

.edp-container .edp-display:disabled {
  cursor: not-allowed;
  background-color: #f5f5f5;
}

.edp-container .edp-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: #495057;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  z-index: 2;
}

.edp-container .edp-btn:hover,
.edp-container .edp-btn:focus {
  background: #ecf0f2;
  outline: none;
}

.edp-container .edp-btn:focus-visible {
  outline: 2px solid #0b8f87;
  outline-offset: 1px;
}

.edp-container .edp-btn-calendar {
  right: 34px;
}

.edp-container .edp-btn-clear {
  right: 4px;
}

.edp-container .edp-native-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  border: 0;
  padding: 0;
  margin: 0;
}

.edp-popover {
  z-index: 1200;
  background: #ffffff;
  border: 1px solid #cfd6db;
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(16, 24, 40, 0.17);
  width: min(360px, calc(100vw - 16px));
  color: #1f2937;
}

.edp-popover[hidden] {
  display: none !important;
}

.edp-header {
  display: grid;
  grid-template-columns: 36px 1fr 36px auto;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid #ebeff2;
}

.edp-month-label {
  font-weight: 600;
  text-align: center;
}

.edp-nav-btn,
.edp-today-shortcut,
.edp-footer-btn,
.edp-week-btn,
.edp-day-btn {
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: inherit;
}

.edp-nav-btn,
.edp-day-btn,
.edp-week-btn {
  width: 100%;
  min-height: 34px;
}

.edp-today-shortcut {
  padding: 6px 8px;
  white-space: nowrap;
}

.edp-nav-btn:hover,
.edp-day-btn:hover,
.edp-week-btn:hover,
.edp-today-shortcut:hover,
.edp-footer-btn:hover {
  background: #f2f8fa;
}

.edp-nav-btn:focus-visible,
.edp-day-btn:focus-visible,
.edp-week-btn:focus-visible,
.edp-today-shortcut:focus-visible,
.edp-footer-btn:focus-visible {
  outline: 2px solid #0b8f87;
  outline-offset: 1px;
}

.edp-grid-wrap {
  padding: 10px;
}

.edp-grid {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.edp-grid th,
.edp-grid td {
  text-align: center;
  padding: 2px;
}

.edp-grid .edp-week-col,
.edp-grid .edp-week-cell {
  width: 44px;
  color: #6b7280;
}

.edp-grid .edp-day-name {
  font-size: 12px;
  color: #6b7280;
  font-weight: 600;
}

.edp-day-cell.edp-outside-month .edp-day-btn {
  color: #a5adb6;
}

.edp-day-cell.edp-selected .edp-day-btn {
  background: #0b8f87;
  color: #ffffff;
}

.edp-day-cell.edp-today .edp-day-btn {
  border-color: #0b8f87;
}

.edp-day-cell.edp-disabled .edp-day-btn {
  color: #b4bbc3;
  cursor: not-allowed;
  background: transparent;
}

.edp-day-cell.edp-disabled.edp-unavailable .edp-day-btn {
  background: #fde8e8;
  color: #b65a5a;
}

.edp-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid #ebeff2;
}

.edp-footer-btn {
  padding: 7px 10px;
}

.edp-footer-apply,
.edp-footer-done {
  background: #0b8f87;
  border-color: #0b8f87;
  color: #ffffff;
}

.edp-footer-apply:hover,
.edp-footer-done:hover {
  background: #08756f;
  border-color: #08756f;
}

.edp-footer-done {
  display: none;
}

.edp-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

body.edp-modal-open {
  overflow: hidden;
}

.edp-container[data-edp-density="compact"] .edp-display {
  min-height: 32px;
}

.edp-container[data-edp-density="comfortable"] .edp-display {
  min-height: 38px;
}

@media (max-width: 768px) {
  .edp-popover.edp-mobile {
    position: fixed !important;
    inset: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    border-radius: 0;
    border: 0;
    display: grid;
    grid-template-rows: auto 1fr auto;
    box-shadow: none;
  }

  .edp-popover.edp-mobile .edp-header {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #ffffff;
    padding: 12px;
  }

  .edp-popover.edp-mobile .edp-grid-wrap {
    overflow: auto;
    padding: 12px;
  }

  .edp-popover.edp-mobile .edp-day-btn,
  .edp-popover.edp-mobile .edp-week-btn {
    min-height: 44px;
    font-size: 16px;
  }

  .edp-popover.edp-mobile .edp-footer {
    position: sticky;
    bottom: 0;
    z-index: 2;
    background: #ffffff;
    justify-content: space-between;
    padding: 12px;
  }

  .edp-popover.edp-mobile .edp-footer-apply {
    display: none;
  }

  .edp-popover.edp-mobile .edp-footer-done {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}
