/* --- Event Creation Modern Styles (Matching Edit Page) --- */

#create-event-modal .modal-content {
  background: #111422 !important;
}

#create-event-form.explorer-scroll-area {
  padding: 0 !important;
}

#create-event-form .create-emoji-preview-wrapper {
  box-shadow: none;
  background: none !important;
  border: none !important;
}

#create-event-form .create-emoji-header {
  background: #282b3e !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  margin: 15px;
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#create-event-form .create-emoji-header #create-emoji-preview {
  font-size: 64px;
  line-height: 1;
  display: block;
}

#create-event-form .create-emoji-header .ios-emoji-edit-hint {
  font-size: 13px;
  color: #a1a1a1;
  font-weight: 500;
  text-transform: none;
  margin-top: 8px;
  opacity: 0.9;
}

/* Form Structure */
.create-event-card {
  background: #282b3e !important;
  border-radius: 12px;
  overflow: hidden;
  margin: 0 15px 15px 15px;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.create-event-row {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  position: relative;
  min-height: 52px;
  gap: 12px;
  background: #282b3e;
  transition: background 0.2s ease;
  flex-wrap: wrap;
  border: none;
  width: 100%;
  text-align: left;
}

.create-event-row:not(:last-child)::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 16px;
  right: 0;
  height: 0.5px;
  background: rgba(255, 255, 255, 0.06);
}

.create-event-row.no-border::after {
  display: none;
}

.create-row-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}

/* Icon Colors */
.create-row-icon.blue {
  background: #007aff;
}

.create-row-icon.gray {
  background: #8e8e93;
}

.create-row-icon.orange {
  background: #ff9500;
}

.create-row-icon.purple {
  background: #af52de;
}

.create-row-icon.green {
  background: #34c759;
}

.create-row-icon.red {
  background: #ff3b30;
}

.create-row-label {
  font-size: 19px;
  color: #fff;
  font-weight: 400;
  flex: 1;
}

.create-row-content {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.create-row-content.flex-row {
  flex-wrap: nowrap;
  flex-direction: row;
  justify-content: flex-end;
}

.create-row-content input,
.create-event-row input {
  background: #202232 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
  font-size: 17px !important;
  width: 100% !important;
  outline: none !important;
  border-radius: 12px;
  padding: 10px !important;
  text-align: center !important;
}

.create-row-content input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

/* Section Toggles */
.create-section-toggle {
  cursor: pointer;
}

.create-section-toggle:active {
  background: rgba(255, 255, 255, 0.05);
}

.create-chevron {
  color: rgba(255, 255, 255, 0.3);
  transition: transform 0.3s ease;
  margin-left: auto;
}

.create-section-toggle.active .create-chevron {
  transform: rotate(90deg);
}

/* Inner Containers */
.create-inner-container {
  padding: 0 0 15px 0;
}

.create-textarea {
  background: rgba(0, 0, 0, 0.2) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px !important;
  padding: 12px !important;
  font-size: 16px !important;
  width: calc(100% - 32px) !important;
  margin: 0 16px !important;
  resize: none;
  outline: none;
}

.create-row-hint {
  padding: 8px 16px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.4;
}

/* Submit Bar */
.create-submit-bar {
  padding: 20px 16px;
  background: #1c1c1e;
  border-top: 0.5px solid rgba(255, 255, 255, 0.1);
}

.create-submit-btn {
  background: var(--accent) !important;
  color: #000 !important;
  border-radius: 12px !important;
  padding: 16px !important;
  font-weight: 700 !important;
  font-size: 17px !important;
  width: 100% !important;
  border: none !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.create-submit-btn:active {
  transform: scale(0.97);
}

/* iOS Switch Styling (No Nesting for maximum compatibility) */
.ios-switch {
  position: relative;
  display: inline-block;
  width: 51px;
  height: 31px;
  margin-left: auto;
  flex-shrink: 0;
}

.ios-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.ios-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #363638;
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 34px;
}

.ios-slider:before {
  position: absolute;
  content: "";
  height: 27px;
  width: 27px;
  left: 2px;
  bottom: 2px;
  background-color: #ffffff;
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.ios-switch input:checked+.ios-slider {
  background-color: #34c759;
}

.ios-switch input:checked+.ios-slider:before {
  transform: translateX(20px);
}

/* Emoji Picker Modernization */
.modern-emoji-picker {
  background: #1c1c1e !important;
  border-radius: 18px;
  padding: 16px !important;
}

.emoji-grid-content {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  max-height: 250px;
  overflow-y: auto;
  padding: 10px 0;
}

.emoji-option {
  font-size: 28px;
  padding: 8px;
  cursor: pointer;
  text-align: center;
  border-radius: 10px;
  transition: transform 0.1s ease;
}

.emoji-tab-btn {
  background: none;
  border: none;
  font-size: 20px;
  padding: 8px;
  cursor: pointer;
  border-radius: 10px;
}

.emoji-tab-btn.active {
  background: rgba(255, 255, 255, 0.1) !important;
}

.emoji-picker-footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Date Poll Rows */
.date-poll-row .create-event-row {
  flex-wrap: wrap;
}

.date-poll-row .create-event-row .create-row-label {
  flex: none !important;
  font-size: 15px;
  opacity: 0.7;
}

#create-add-date-option-btn,
#add-item-btn,
#add-bring-along-item-btn {
  border-radius: 10px;
  margin: 0 15px;
  width: auto !important;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  #create-event-modal .explorer-scroll-area {
    padding-bottom: 80px !important;
  }

  #create-event-modal .create-submit-bar {
    position: relative;
    bottom: auto;
    z-index: 1;
  }
}

#create-single-date-section {
  .create-row-label {
    flex: unset;
  }
}