/* Modern E-Cell Custom Date & Clock Time Pickers */

.custom-picker-overlay {
  position: fixed;
  inset: 0;
  background: rgba(45, 42, 38, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.custom-picker-overlay.open {
  opacity: 1;
  visibility: visible;
}

.custom-picker-card {
  background: #FFFFFF;
  border-radius: 20px;
  box-shadow: 0 20px 40px -10px rgba(199, 91, 57, 0.15), 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  border: 1px solid #F3EBE3;
  width: 100%;
  max-width: 360px;
  overflow: hidden;
  transform: scale(0.92) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  color: #2D2A26;
  font-family: inherit;
}

.custom-picker-overlay.open .custom-picker-card {
  transform: scale(1) translateY(0);
}

/* Header */
.picker-header {
  background: linear-gradient(135deg, #C75B39 0%, #A84525 100%);
  color: #FFFFFF;
  padding: 1.2rem 1.2rem 1rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.picker-header-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.9;
}

.picker-close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #FFF;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: background 0.2s ease;
}

.picker-close-btn:hover {
  background: rgba(255, 255, 255, 0.35);
}

/* Clock Header Display */
.clock-display-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 6px;
}

.clock-digits-box {
  display: flex;
  align-items: center;
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: 1px;
  line-height: 1;
}

.clock-digit-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #FFF;
  padding: 4px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.clock-digit-btn.active {
  background: #FFFFFF;
  color: #C75B39;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.clock-colon {
  margin: 0 3px;
  opacity: 0.8;
}

.ampm-toggle-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ampm-btn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #FFF;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ampm-btn.active {
  background: #FFFFFF;
  color: #C75B39;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Clock Dial Body */
.clock-body {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #FFFAF5;
}

.clock-mode-tabs {
  display: flex;
  background: #EFE4D8;
  border-radius: 20px;
  padding: 3px;
  margin-bottom: 1rem;
}

.clock-mode-tab {
  border: none;
  background: transparent;
  padding: 5px 16px;
  border-radius: 16px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #5B4A3A;
  cursor: pointer;
  transition: all 0.2s ease;
}

.clock-mode-tab.active {
  background: #C75B39;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(199, 91, 57, 0.3);
}

.clock-face-wrapper {
  position: relative;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 4px solid #F3EBE3;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.04), 0 8px 20px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  touch-action: none;
}

.clock-center-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #C75B39;
  z-index: 10;
}

.clock-hand {
  position: absolute;
  bottom: 50%;
  left: calc(50% - 1.5px);
  width: 3px;
  height: 75px;
  background: #C75B39;
  transform-origin: bottom center;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 5;
  border-radius: 3px 3px 0 0;
}

.clock-hand::after {
  content: '';
  position: absolute;
  top: -14px;
  left: -13.5px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(199, 91, 57, 0.25);
  border: 2px solid #C75B39;
  box-sizing: border-box;
}

.clock-number {
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #5B4A3A;
  cursor: pointer;
  transition: all 0.15s ease;
  z-index: 6;
}

.clock-number.active {
  background: #C75B39;
  color: #FFFFFF;
  box-shadow: 0 3px 8px rgba(199, 91, 57, 0.35);
}

.clock-number:hover:not(.active) {
  background: #FFF0E6;
  color: #C75B39;
}

/* Quick Presets Grid */
.picker-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0.8rem 1.2rem;
  background: #FFFFFF;
  border-top: 1px solid #F3EBE3;
  justify-content: center;
}

.preset-chip {
  background: #FFF5EE;
  border: 1px solid #FADCCE;
  color: #C75B39;
  font-size: 0.73rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.preset-chip:hover {
  background: #C75B39;
  color: #FFFFFF;
  border-color: #C75B39;
}

/* Footer Actions */
.picker-footer {
  padding: 0.8rem 1.2rem;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid #F3EBE3;
}

.picker-cancel-btn {
  background: transparent;
  border: 1px solid #E5DCD3;
  color: #5B4A3A;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.picker-cancel-btn:hover {
  background: #F5EBE1;
}

.picker-confirm-btn {
  background: linear-gradient(135deg, #C75B39 0%, #A84525 100%);
  border: none;
  color: #FFFFFF;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 20px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(199, 91, 57, 0.25);
  transition: transform 0.15s ease, opacity 0.2s ease;
}

.picker-confirm-btn:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

/* Calendar Date Body */
.calendar-body {
  padding: 1.2rem;
  background: #FFFAF5;
}

.calendar-month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.calendar-nav-btn {
  background: #FFFFFF;
  border: 1px solid #E5DCD3;
  color: #5B4A3A;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  transition: all 0.2s ease;
}

.calendar-nav-btn:hover {
  background: #C75B39;
  color: #FFF;
  border-color: #C75B39;
}

.calendar-month-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #2D2A26;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #8C7868;
  margin-bottom: 6px;
  text-transform: uppercase;
}

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

.calendar-day-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: #2D2A26;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.calendar-day-cell:hover:not(.empty):not(.disabled) {
  background: #FFF0E6;
  color: #C75B39;
}

.calendar-day-cell.today {
  border: 1.5px solid #C75B39;
  color: #C75B39;
  font-weight: 800;
}

.calendar-day-cell.selected {
  background: #C75B39 !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 10px rgba(199, 91, 57, 0.3);
  font-weight: 800;
}

.calendar-day-cell.empty {
  cursor: default;
  opacity: 0;
}

.calendar-day-cell.disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Styled Input Trigger Wrapper */
.custom-picker-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 100%;
}

.custom-picker-trigger input {
  padding-right: 36px !important;
  cursor: pointer !important;
}

.custom-picker-icon-btn {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  color: #C75B39;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 6px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.custom-picker-icon-btn:hover {
  transform: scale(1.1);
  opacity: 0.9;
}
