/* Minimal & Refined StoreBridge Date Picker */
:root {
  --ccdp-blue: #10847E;
  --ccdp-blue-dark: #0B6B66;
  --ccdp-line: #e2e8f0;
  --ccdp-text: #1e293b;
  --ccdp-muted: #94a3b8;
}

input.ccdp-enabled,
button.ccdp-enabled {
  cursor: pointer !important;
  caret-color: transparent;
  padding-right: 42px !important;
  font-variant-numeric: tabular-nums;
}

.ccdp-input-shell {
  position: relative !important;
}

.ccdp-input-shell:focus-within {
  border-color: var(--ccdp-blue) !important;
  box-shadow: 0 0 0 3px rgba(16, 132, 126, 0.14) !important;
}

.ccdp-input-shell > .bi-calendar3,
.ccdp-input-shell > .bi-calendar,
.ccdp-input-shell > [data-date-icon] {
  position: absolute !important;
  right: 13px !important;
  top: 50% !important;
  z-index: 2;
  margin: 0 !important;
  transform: translateY(-50%) !important;
  color: #64748b !important;
  pointer-events: none !important;
}

.ccdp-generated-icon {
  font-size: 14px;
}

.ccdp-popover {
  position: fixed;
  z-index: 9999;
  width: 214px;
  display: none;
  padding: 16px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  color: var(--ccdp-text);
  box-shadow: 0 18px 42px -12px rgba(15, 23, 42, 0.14), 0 4px 12px -2px rgba(15, 23, 42, 0.05) !important;
  font-family: var(--cc-font-family, 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  font-size: 12px;
}

.ccdp-popover,
.ccdp-popover * {
  box-sizing: border-box;
}

.ccdp-popover.ccdp-open {
  display: block;
}

.ccdp-popover.ccdp-custom-open {
  width: min(728px, calc(100vw - 24px));
  display: block;
}

.ccdp-popover.ccdp-custom-open .ccdp-range {
  display: grid;
  grid-template-columns: 166px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

/* Presets Sidebar */
.ccdp-presets {
  display: grid;
  gap: 4px;
}

.ccdp-popover.ccdp-custom-open .ccdp-presets {
  padding-right: 18px;
  border-right: 1px solid #f1f5f9;
}

.ccdp-preset {
  height: 32px;
  padding: 0 12px;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: #475569 !important;
  text-align: left;
  font: inherit;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.ccdp-preset:hover {
  background: #f8fafc !important;
  color: #0f172a !important;
  border-color: transparent !important;
}

.ccdp-preset.ccdp-selected {
  background: #10847E !important;
  color: #ffffff !important;
  border: 1px solid #10847E !important;
  font-weight: 600 !important;
}

/* Footer Actions */
.ccdp-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

.ccdp-actions button {
  flex: 1;
  min-width: 68px;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 12px !important;
  border-radius: 8px !important;
  font: inherit;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.15s ease;
}

body .ccdp-popover .ccdp-apply {
  background: #10847E !important;
  color: #ffffff !important;
  border: 1px solid #10847E !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08) !important;
}

body .ccdp-popover .ccdp-apply:hover {
  background: #0B6B66 !important;
  border-color: #0B6B66 !important;
}

body .ccdp-popover .ccdp-clear {
  background: #ffffff !important;
  color: #64748b !important;
  border: 1px solid #e2e8f0 !important;
}

body .ccdp-popover .ccdp-clear:hover {
  background: #f8fafc !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

/* Custom Range Area */
.ccdp-custom {
  display: none;
  min-width: 0;
}

.ccdp-custom.ccdp-show {
  display: block;
}

.ccdp-date-time-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 14px;
}

.ccdp-date-time-field {
  min-width: 0;
}

.ccdp-date-display {
  width: 100%;
  height: 34px;
  padding: 0 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  background: #f8fafc !important;
  color: #0f172a !important;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: inherit;
  font-size: 11px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  outline: 0;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.ccdp-date-display.ccdp-active {
  background: #ffffff !important;
  border-color: #10847E !important;
  box-shadow: 0 0 0 3px rgba(16, 132, 126, 0.14) !important;
}

.ccdp-time-row {
  height: 32px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 2px;
  color: #64748b;
}

.ccdp-time-row i {
  margin-right: auto;
  font-size: 13px;
  color: #94a3b8;
}

.ccdp-time-row select {
  height: 28px;
  min-width: 48px;
  padding: 0 6px;
  border: 1px solid #e2e8f0 !important;
  border-radius: 7px !important;
  background: #ffffff !important;
  color: #0f172a !important;
  font: inherit;
  font-size: 11px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  outline: 0;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.ccdp-time-row select:hover,
.ccdp-time-row select:focus {
  border-color: #94a3b8 !important;
}

.ccdp-time-row .ccdp-minute {
  min-width: 50px;
}

.ccdp-time-row .ccdp-period {
  min-width: 52px;
}

/* Dual Calendars */
.ccdp-calendar-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.ccdp-calendar {
  min-width: 0;
}

.ccdp-calendar-head {
  height: 32px;
  margin-bottom: 6px;
  display: grid;
  grid-template-columns: 28px 1fr 28px;
  align-items: center;
}

.ccdp-calendar-head strong {
  text-align: center;
  color: #0f172a;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.ccdp-month-button {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0 !important;
  border: 1px solid transparent !important;
  border-radius: 7px !important;
  background: transparent !important;
  color: #64748b !important;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.ccdp-month-button:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border-color: transparent !important;
}

.ccdp-month-button.ccdp-placeholder {
  visibility: hidden;
}

.ccdp-weekdays,
.ccdp-calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.ccdp-weekdays {
  margin-bottom: 4px;
}

.ccdp-weekdays span {
  height: 22px;
  display: grid;
  place-items: center;
  color: #94a3b8;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.ccdp-day {
  position: relative;
  height: 30px;
  padding: 0 !important;
  border: 1px solid transparent !important;
  border-radius: 7px !important;
  background: transparent !important;
  color: #1e293b !important;
  font: inherit;
  font-size: 11px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.ccdp-day:hover {
  z-index: 1;
  background: #f1f5f9 !important;
  border-color: transparent !important;
  color: #0f172a !important;
}

.ccdp-day.ccdp-other {
  color: #cbd5e1 !important;
  background: transparent !important;
}

.ccdp-day.ccdp-in-range {
  background: #e6f4f3 !important;
  color: #0b6b66 !important;
  border-radius: 6px !important;
}

.ccdp-day.ccdp-today {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ccdp-day.ccdp-start,
.ccdp-day.ccdp-end,
.ccdp-day.ccdp-single-selected {
  z-index: 2;
  border-color: #10847E !important;
  background: #10847E !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 6px rgba(16, 132, 126, 0.22);
  text-decoration: none;
}

/* Single Date Mode */
.ccdp-single {
  display: none;
}

.ccdp-popover.ccdp-single-mode {
  width: 276px;
}

.ccdp-popover.ccdp-single-mode .ccdp-range {
  display: none;
}

.ccdp-popover.ccdp-single-mode .ccdp-single {
  display: block;
}

.ccdp-single-title {
  margin: 0 0 10px;
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
}

@media (max-width: 720px) {
  .ccdp-popover.ccdp-custom-open {
    width: calc(100vw - 20px);
    max-height: 75vh;
    display: block;
    overflow: auto;
  }
  .ccdp-popover.ccdp-custom-open .ccdp-range {
    display: block;
  }
  .ccdp-popover.ccdp-custom-open .ccdp-presets {
    padding-right: 0;
    border-right: 0;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
  }
  .ccdp-custom.ccdp-show {
    min-width: 500px;
    margin-top: 14px;
  }
}
