/**
 * Partner Portal Modal Styles — In The Cards (nthecards.com)
 * Luxury Architectural Styling for Partner Onboarding Hierarchy:
 * Step 1: Partner Account
 * Step 2: Register Venue
 * Step 3: Host Events
 */

.partner-portal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(9, 13, 22, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.partner-portal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.partner-portal-sheet {
  background: #ffffff;
  width: 100%;
  max-width: 840px;
  max-height: 90vh;
  border-radius: 28px;
  border: 2px solid #090d16;
  box-shadow: 0 24px 64px rgba(9, 13, 22, 0.28), 0 4px 16px rgba(9, 13, 22, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  transform: translateY(20px) scale(0.98);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.partner-portal-backdrop.is-open .partner-portal-sheet {
  transform: translateY(0) scale(1);
}

/* Modal Header */
.partner-portal-header {
  padding: 1.5rem 2rem 1.25rem;
  border-bottom: 2px solid #090d16;
  background: #fdfefe;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.partner-portal-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  background: #090d16;
  color: #d4af37;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.partner-portal-badge svg {
  width: 14px;
  height: 14px;
}

.partner-portal-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #090d16;
  letter-spacing: -0.02em;
  margin-top: 0.35rem;
}

.partner-portal-subtitle {
  font-size: 0.82rem;
  color: #64748b;
  margin-top: 0.15rem;
}

.partner-portal-close-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid #090d16;
  background: #ffffff;
  color: #090d16;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.partner-portal-close-btn:hover {
  background: #090d16;
  color: #ffffff;
  transform: scale(1.05);
}

.partner-portal-close-btn svg {
  width: 18px;
  height: 18px;
}

/* Hierarchical Navigation / Step Indicator */
.partner-hierarchy-nav {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 2rem;
  background: #f8fafc;
  border-bottom: 1.5px solid rgba(9, 13, 22, 0.1);
  flex-shrink: 0;
  overflow-x: auto;
}

.hierarchy-step-btn {
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.hierarchy-step-btn:hover:not(:disabled) {
  border-color: #090d16;
  color: #090d16;
}

.hierarchy-step-btn.active {
  background: #090d16;
  color: #ffffff;
  border-color: #090d16;
}

.hierarchy-step-btn.completed {
  border-color: #10b981;
  color: #065f46;
  background: rgba(16, 185, 129, 0.08);
}

.hierarchy-step-btn.completed.active {
  background: #090d16;
  color: #ffffff;
  border-color: #090d16;
}

.hierarchy-step-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(9, 13, 22, 0.08);
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
}

.hierarchy-step-btn.active .step-num {
  background: #d4af37;
  color: #090d16;
}

.step-connector {
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 700;
}

/* Step Prompts */
.partner-step-prompt {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
}

.prompt-badge {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #d4af37;
  background: #090d16;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  display: inline-block;
}

.prompt-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #090d16;
  margin-top: 0.4rem;
}

.prompt-desc {
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.5;
  margin-top: 0.25rem;
}

/* Partner Account Auth Box */
.partner-auth-box {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 580px;
  margin: 0 auto;
}

.partner-auth-toggle-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #f1f5f9;
  padding: 0.35rem;
  border-radius: 9999px;
  border: 1.5px solid #cbd5e1;
}

.partner-auth-toggle {
  padding: 0.6rem 1rem;
  border-radius: 9999px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.partner-auth-toggle.active {
  background: #090d16;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(9, 13, 22, 0.15);
}

.partner-google-row {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.partner-google-btn {
  width: 100%;
  padding: 0.75rem 1.25rem;
  border-radius: 9999px;
  border: 2px solid #090d16;
  background: #ffffff;
  color: #090d16;
  font-weight: 700;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.partner-google-btn:hover {
  background: #f8fafc;
  transform: translateY(-1px);
}

.partner-divider {
  text-align: center;
  position: relative;
  margin: 0.5rem 0;
}

.partner-divider::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 1px;
  background: #e2e8f0;
}

.partner-divider span {
  position: relative;
  background: #ffffff;
  padding: 0 0.85rem;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

/* Signed in Partner Card */
.partner-signed-in-card {
  border: 2px solid #090d16;
  border-radius: 20px;
  padding: 1.75rem;
  background: #f8fafc;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.partner-avatar-badge {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #090d16;
  color: #d4af37;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #d4af37;
  flex-shrink: 0;
}

.partner-avatar-badge svg {
  width: 28px;
  height: 28px;
}

.partner-signed-info {
  flex: 1;
}

.partner-status-tag {
  font-size: 0.7rem;
  font-weight: 800;
  color: #10b981;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.partner-signed-name {
  font-size: 1.35rem;
  font-weight: 800;
  color: #090d16;
  margin-top: 0.15rem;
}

.partner-signed-meta {
  font-size: 0.82rem;
  color: #64748b;
  margin-top: 0.25rem;
}

.partner-signed-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Existing Venues Banner */
.partner-existing-venues-banner {
  background: #f1f5f9;
  border: 1.5px solid #cbd5e1;
  border-radius: 16px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.existing-venues-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.existing-venues-title {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #090d16;
}

.partner-venues-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.partner-venue-mini-chip {
  background: #ffffff;
  border: 1.5px solid #090d16;
  border-radius: 9999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
  color: #090d16;
}

.partner-link-btn {
  background: none;
  border: none;
  color: #090d16;
  font-weight: 800;
  font-size: 0.82rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.partner-link-btn:hover {
  color: #d4af37;
}

.partner-btn-primary {
  padding: 0.65rem 1.35rem;
  border-radius: 9999px;
  border: 2px solid #090d16;
  background: #090d16;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.2s ease;
}

.partner-btn-primary:hover {
  background: #d4af37;
  color: #090d16;
  border-color: #090d16;
}

.partner-btn-secondary {
  padding: 0.65rem 1.25rem;
  border-radius: 9999px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.partner-btn-secondary:hover {
  border-color: #090d16;
  color: #090d16;
}

/* Dashboard View */
.partner-dashboard-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.dashboard-banner {
  background: #090d16;
  color: #ffffff;
  border-radius: 20px;
  padding: 1.5rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.dash-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
}

.dash-sub {
  font-size: 0.82rem;
  color: #94a3b8;
  margin-top: 0.25rem;
}

.dash-sub code {
  color: #d4af37;
}

.dash-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.dash-section-header h4 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #090d16;
}

.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.dash-card {
  border: 1.5px solid #090d16;
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
  display: flex;
  flex-direction: column;
}

.dash-card-img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.dash-card-body {
  padding: 0.85rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.dash-card-body h5 {
  font-size: 0.95rem;
  font-weight: 800;
  color: #090d16;
  margin-bottom: 0.25rem;
}

.dash-card-meta {
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 0.2rem;
}

.dash-card-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  margin-top: 0.4rem;
  align-self: flex-start;
}

.dash-empty-notice {
  grid-column: 1 / -1;
  padding: 2rem;
  background: #f8fafc;
  border: 1.5px dashed #cbd5e1;
  border-radius: 16px;
  text-align: center;
  color: #64748b;
  font-size: 0.85rem;
}

/* Body / Form Container */
.partner-portal-body {
  padding: 1.75rem 2rem;
  overflow-y: auto;
  flex: 1;
}

.partner-form-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.partner-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.partner-field-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.75rem;
}

.partner-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.partner-field label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #090d16;
}

.partner-input,
.partner-select,
.partner-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #090d16;
  font-family: inherit;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.partner-input:focus,
.partner-select:focus,
.partner-textarea:focus {
  border-color: #090d16;
  box-shadow: 0 0 0 3px rgba(9, 13, 22, 0.08);
}

.partner-textarea {
  min-height: 90px;
  resize: vertical;
}

/* Image preview upload zone */
.partner-image-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: 16px;
  padding: 1.25rem;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.partner-image-dropzone:hover {
  border-color: #090d16;
  background: #f1f5f9;
}

.partner-dropzone-preview {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 10px;
  margin-top: 0.75rem;
  border: 1.5px solid #090d16;
}

.partner-dropzone-hint {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 0.35rem;
}

/* Modal Footer */
.partner-portal-footer {
  padding: 1.25rem 2rem;
  border-top: 2px solid #090d16;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.partner-cancel-btn {
  padding: 0.65rem 1.25rem;
  border-radius: 9999px;
  border: 1.5px solid #cbd5e1;
  background: transparent;
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.partner-cancel-btn:hover {
  border-color: #090d16;
  color: #090d16;
}

.partner-submit-btn {
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  border: 2px solid #090d16;
  background: #090d16;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(9, 13, 22, 0.2);
}

.partner-submit-btn:hover {
  background: #d4af37;
  color: #090d16;
  border-color: #090d16;
  transform: translateY(-1px);
}

.partner-submit-btn svg {
  width: 16px;
  height: 16px;
}

@media (max-width: 640px) {
  .partner-field-row,
  .partner-field-row-3 {
    grid-template-columns: 1fr;
  }

  .partner-portal-header,
  .partner-portal-body,
  .partner-portal-footer {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}
