/* Profile Page Custom Styles */

/* Fix stacking context for profile page */
.header-wrapper {
  position: relative;
  z-index: 3000; /* Ensures header is above page content */
}

/* Structural fix for profile page stacking context */
.profile-page header {
  /* Create a new stacking context */
  position: relative;
  transform: translateZ(0);
  /* Give the header the highest stacking order */
  z-index: 3000;
}

@media (min-width: 768px) {
  .profile-page .hamburger {
    /* Keep stacking context when visible on larger screens without changing position */
    z-index: 5;
  }
}

/* Ensure the profile modal doesn't overlay the header elements */
.container {
  /* Lower z-index than header */
  position: relative;
  z-index: 1;
}

.profile-modal {
  position: relative;
  margin-top: 1rem;
}

.profile-main {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 60vh;
  padding: 2rem 0 3rem 0;
  background: none;
}

/* Remove card look, use modal-content/auth-container look for modal */

/* Remove background from .profile-section, .card */
.profile-section, .profile-section.card {
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
  min-width: 0;
  max-width: 100%;
  margin: 0;
}

.profile-form .form-group,
.profile-form .form-group.padded {
  margin-bottom: 1.5rem;
  padding: 0.25rem 0.5rem;
}

.profile-form label {
  font-weight: 600;
  margin-bottom: 0.3rem;
  display: block;
  color: var(--text-primary, #fff);
}

.profile-form input[type="text"] {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid #444;
  border-radius: 7px;
  background: #23232a;
  color: #fff;
  font-size: 1rem;
  margin-top: 0.2rem;
}

.profile-form input[type="checkbox"] {
  margin-right: 0.5rem;
  transform: scale(1.2);
}

.profile-form small {
  color: #aaa;
  margin-top: 0.2rem;
  display: block;
}

.form-error {
  color: #cc190c;
  font-size: 0.95em;
  margin-top: 0.3rem;
}

#public-url-section {
  background: #18181a;
  border-radius: 8px;
  padding: 1rem 1.1rem;
  margin-bottom: 1.5rem;
  border: 1px solid #333;
}

.public-url {
  font-family: monospace;
  color: #ffb347;
  font-size: 1.09em;
  margin: 0.3rem 0 0.2rem 0;
  word-break: break-all;
}

/* Local feedback next to Share Profile button */
#share-profile-feedback {
  display: none;
  margin-left: 0.5em;
  font-size: 0.9em;
  color: var(--primary);
}

.profile-actions {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding-top: 1.2rem;
}

.auth-button.danger {
  background: #cc190c;
  color: #fff;
  border: none;
  transition: background 0.2s;
}
.auth-button.danger:hover {
  background: #a31200;
}

#delete-account-btn {
  background: none !important;
  border: none !important;
  color: #cc190c !important;
  font-weight: 700;
  padding: 0;
  cursor: pointer;
  font-size: 1em;
  box-shadow: none;
  text-decoration: underline;
}
#delete-account-btn:hover {
  color: #ff3c3c !important;
  text-decoration: underline;
  background: none !important;
}

@media (max-width: 600px) {
  .profile-section.card {
    padding: 1.3rem 0.7rem 1.5rem 0.7rem;
    min-width: 0;
    max-width: 98vw;
  }
  .profile-main {
    padding: 0.8rem 0 2rem 0;
  }
}

/* Share Profile button: force black background */
#share-profile-btn {
  background: #000;
}
#share-profile-btn:hover {
  background: #2b2b2b;
}
#share-profile-btn:active {
  background: #ff6600;
}