/* Shahum's Calendar - Light Mode Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

:root {
  --background: #FCF7E9;
  /* Exact user requested cream */
  --foreground: #171717;
  /* Soft Black */
  --gray-50: #F3EEE0;
  /* Slightly darker cream for inputs */
  --gray-100: #EBE9E0;
  --gray-200: #D8D6CD;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --accent: #171717;
  /* Minimalist black accent */
  --accent-hover: #333333;
  --error: #ef4444;
  --radius: 24px;
  /* More rounded/friendly */
  --radius-sm: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--background);
  color: var(--foreground);
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  padding: 24px;
  -webkit-font-smoothing: antialiased;
}

/* Container */
.container {
  width: 100%;
  max-width: 440px;
  padding: 0;
  margin-top: 40px;
}

/* Main Card Wrapper */
.main-card {
  background: var(--background);
  /* If body is same color, no border needed? But user wants a 'screen'. */
  /* Let's assume the whole screen behaves like this. */
}

/* Header Section */
.header-section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  /* Left align */
  margin-bottom: 32px;
  /* Ensure header background matches */
}

.avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.subtitle {
  color: var(--gray-500);
  font-size: 16px;
  font-weight: 400;
}

/* Form Styles */
.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 8px;
}

input,
textarea,
select {
  width: 100%;
  padding: 14px 16px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 16px;
  /* Native font size */
  color: var(--foreground);
  transition: all 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--foreground);
  background: #fff;
  box-shadow: 0 0 0 1px var(--foreground);
}

/* Native Picker Styling */
input[type="date"],
input[type="time"] {
  min-height: 52px;
  cursor: text;
}

/* Button */
.btn {
  width: 100%;
  padding: 16px;
  background: var(--foreground);
  color: var(--background);
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.1s ease, opacity 0.2s ease;
  margin-top: 12px;
}

.btn:hover {
  opacity: 0.9;
}

.btn:active {
  transform: scale(0.98);
}

/* Utilities */
.hp-field {
  display: none;
}

.error-msg {
  color: var(--error);
  font-size: 13px;
  margin-top: 6px;
}

.time-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
    /* Subtle polished movement */
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.header-section {
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

#eventForm .form-group,
.hp-field {
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

#eventForm .form-group:nth-child(1) {
  animation-delay: 0.1s;
}

#eventForm .form-group:nth-child(2) {
  animation-delay: 0.15s;
}

#eventForm .form-group:nth-child(3) {
  animation-delay: 0.2s;
}

#eventForm .form-group:nth-child(4) {
  animation-delay: 0.25s;
}

#eventForm .form-group:nth-child(5) {
  animation-delay: 0.3s;
}

#eventForm .form-group:nth-child(6) {
  animation-delay: 0.35s;
}

.btn {
  animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.4s;
}

/* Success Section (Dark Mode) */
.success-section {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60vh;
  /* Covers slightly more than half for safety/aesthetic */
  background: #171717;
  color: #FFFFFF;
  padding: 40px 0;
  /* Use 0 horizontal padding, rely on inner container alignment */
  border-radius: 0;
  /* Remove curved edges */
  text-align: left;
  animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  /* Position content at top, not center */
  align-items: flex-start;
  /* Align to left edge */
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.1);
  z-index: 100;
}

/* Wrapper to align text with the main container */
.success-content {
  width: 100%;
  max-width: 440px;
  margin-left: calc(50% - 220px);
  /* Center the 440px container */
  padding: 0;
}

.success-section h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #FFFFFF;
}

.subtitle-dark {
  color: #A3A3A3;
  /* Gray text for dark mode */
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
}

.location-icon {
  margin-bottom: 24px;
}

/* Dark Button for Success Screen */
.btn-dark {
  background: #FFFFFF;
  color: #171717;
}

.btn-dark:hover {
  background: #E5E5E5;
}

/* Form Styles Override for Cream Theme */
input,
textarea,
select {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
}

input:focus,
textarea:focus {
  background: #FFFFFF;
  border-color: var(--foreground);
}

/* Mobile Responsive */
@media (max-width: 480px) {
  body {
    padding: 16px;
  }

  .container {
    margin-top: 24px;
  }

  .success-section {
    height: 55vh;
    /* Slightly smaller for balanced split */
    padding: 32px 0;
  }

  .success-content {
    margin-left: 0;
    padding: 0 16px;
    /* Match body padding on mobile */
  }

  .success-section h2 {
    font-size: 24px;
  }

  .subtitle-dark {
    font-size: 15px;
  }
}

/* Toast Notification */
.toast {
  position: fixed;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: #dc2626;
  color: white;
  padding: 16px 24px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  transition: top 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 90%;
  text-align: center;
}

.toast.show {
  top: 24px;
}