/**
 * Team Member Gate - Modal Styles
 * Matches Relume component styling from doubleknotpictures.com
 */

/* ========== BLUR EFFECT ========== */
.dk-gate-blur {
  filter: blur(8px);
  pointer-events: none;
  user-select: none;
  transition: filter 0.3s ease;
}

/* ========== OVERLAY ========== */
.dk-gate-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 60px;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
  overflow-y: auto;
}

.dk-gate-overlay.dk-visible {
  opacity: 1;
}

/* ========== MODAL ========== */
.dk-gate-modal {
  background: #fff;
  border-radius: 16px;
  padding: 48px 40px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: translateY(-20px);
  transition: transform 0.3s ease;
  margin-bottom: 60px;
}

.dk-gate-overlay.dk-visible .dk-gate-modal {
  transform: translateY(0);
}

/* ========== PROFILE IMAGE ========== */
.dk-gate-profile-image {
  width: 88px;
  height: 88px;
  margin: 0 auto 24px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dk-gate-profile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ========== TYPOGRAPHY ========== */
/* Matches heading-style-h5 from Relume */
.dk-gate-title {
  font-family: freight-display-pro, Georgia, 'Times New Roman', serif;
  font-size: 1.75rem;
  font-weight: 400;
  letter-spacing: 0.0175rem;
  line-height: 1.2;
  color: #000;
  margin: 0 0 8px 0;
  text-align: center;
}

/* Matches text-size-medium */
.dk-gate-subtitle {
  font-family: aktiv-grotesk, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  color: #666;
  margin: 0 0 24px 0;
  text-align: center;
  line-height: 1.5;
}

/* ========== FORM ========== */
.dk-gate-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dk-gate-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Matches text-weight-semibold */
.dk-gate-label {
  font-family: aktiv-grotesk, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: #000;
}

.dk-gate-label .dk-optional {
  font-weight: 400;
  color: rgba(0, 0, 0, 0.5);
}

/* Matches form_input from Relume */
.dk-gate-input {
  font-family: aktiv-grotesk, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  border: 1px solid transparent;
  background-color: rgba(0, 0, 0, 0.05);
  color: #000;
  border-radius: 12px;
  height: auto;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  line-height: 1.6;
  transition: all 0.2s ease;
  outline: none;
  width: 100%;
  box-sizing: border-box;
}

.dk-gate-input:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

.dk-gate-input:focus {
  border-color: #000;
  background-color: rgba(0, 0, 0, 0.05);
}

.dk-gate-input::placeholder {
  color: rgba(0, 0, 0, 0.5);
}

.dk-gate-input.dk-error {
  border-color: #dc2626;
}

/* ========== BUTTON ========== */
/* Matches .button from Relume with purple gradient (mulled-wine to lotus) */
.dk-gate-submit {
  font-family: aktiv-grotesk, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #514372;
  background-image: linear-gradient(135deg, #514372 20%, #764141);
  color: #fff;
  text-align: center;
  border: none;
  border-radius: 12px;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  margin-top: 8px;
  transition: all 0.2s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.dk-gate-submit:hover {
  background-image: linear-gradient(135deg, #40355b, #5e3434);
}

.dk-gate-submit:active {
  transform: scale(0.98);
}

.dk-gate-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ========== ERROR MESSAGE ========== */
.dk-gate-error-msg {
  font-family: aktiv-grotesk, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #dc2626;
  font-size: 0.875rem;
  text-align: center;
  margin-top: 8px;
  display: none;
}

.dk-gate-error-msg.dk-show {
  display: block;
}

/* ========== LOADING STATE ========== */
.dk-gate-submit.dk-loading {
  position: relative;
  color: transparent;
}

.dk-gate-submit.dk-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: dk-spin 0.8s linear infinite;
}

@keyframes dk-spin {
  to { transform: rotate(360deg); }
}

/* ========== PRIVACY NOTE ========== */
/* Matches text-size-tiny */
.dk-gate-privacy {
  font-family: aktiv-grotesk, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.75rem;
  color: rgba(0, 0, 0, 0.5);
  text-align: center;
  margin-top: 16px;
  line-height: 1.4;
}

/* ========== FLATPICKR OVERRIDES ========== */
/* Match site styling for date picker */
.dk-gate-input.flatpickr-input,
.dk-gate-input.flatpickr-input + .flatpickr-input {
  cursor: pointer;
}

/* Remove focus outline from Flatpickr inputs */
.dk-gate-input.flatpickr-input:focus,
.dk-gate-input.flatpickr-input:active,
.dk-gate-input + input.flatpickr-input:focus,
.dk-gate-input + input.flatpickr-input:active,
.flatpickr-input:focus,
.flatpickr-input:active,
input.flatpickr-input:focus,
input.flatpickr-input:active {
  outline: none !important;
  box-shadow: none !important;
  border-color: #000 !important;
}

/* Alt input created by Flatpickr */
.dk-gate-modal input.flatpickr-input {
  font-family: aktiv-grotesk, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  border: 1px solid transparent;
  background-color: rgba(0, 0, 0, 0.05);
  color: #000;
  border-radius: 12px;
  height: auto;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  line-height: 1.6;
  transition: all 0.2s ease;
  outline: none !important;
  box-shadow: none !important;
  width: 100%;
  box-sizing: border-box;
}

.dk-gate-modal input.flatpickr-input:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

.dk-gate-modal input.flatpickr-input:focus {
  border-color: #000;
  background-color: rgba(0, 0, 0, 0.05);
  outline: none !important;
  box-shadow: none !important;
}

/* Style selected date with brand color */
.flatpickr-day.selected,
.flatpickr-day.selected:hover,
.flatpickr-day.selected:focus,
.flatpickr-day.today.selected {
  background-color: #514372 !important;
  border-color: #514372 !important;
}

/* Style today indicator */
.flatpickr-day.today {
  border-color: #514372 !important;
}

.flatpickr-day.today:hover {
  background-color: rgba(81, 67, 114, 0.1) !important;
  border-color: #514372 !important;
  color: #000 !important;
}

/* Flatpickr calendar styling */
.flatpickr-calendar {
  font-family: aktiv-grotesk, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.flatpickr-months {
  border-radius: 12px 12px 0 0;
}

.flatpickr-current-month {
  font-weight: 500;
}

/* ========== MOBILE ========== */
@media (max-width: 480px) {
  .dk-gate-overlay {
    padding-top: 24px;
  }
  
  .dk-gate-modal {
    padding: 32px 24px;
    margin: 0 16px 40px;
    border-radius: 12px;
  }
  
  .dk-gate-title {
    font-size: 1.5rem;
  }
  
  .dk-gate-profile-image {
    width: 72px;
    height: 72px;
  }
}
