/*
 * Profile Page Styles
 * Brigitte.de Design System
 */

/* ============================================
   HEADER - AUTH STATE
   ============================================ */

#headerLoginIcon {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

#headerLoginIcon:hover {
  opacity: 0.7;
}

#headerLoginIcon.hidden {
  display: none;
}

.header__meta-icon--login {
  display: block;
  width: 24px;
  height: 24px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.header__auth-icons {
  display: none;
  align-items: center;
  gap: 16px;
}

.header__auth-icons.active {
  display: flex;
}

.header__auth-icon {
  width: 24px;
  height: 24px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.header__auth-icon:hover {
  opacity: 1;
}

.header__auth-icon--profile {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='%23d8115f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E")
    center/contain no-repeat;
}

.header__auth-icon--logout {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/%3E%3Cpolyline points='16,17 21,12 16,7'/%3E%3Cline x1='21' y1='12' x2='9' y2='12'/%3E%3C/svg%3E")
    center/contain no-repeat;
}

/* ============================================
   PROFILE PAGE
   ============================================ */

.profile-page {
  min-height: calc(100vh - 200px);
  background: linear-gradient(180deg, #fdf2f6 0%, #f8f8f8 30%);
}

/* Not Logged In State */
.profile-not-logged-in {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  text-align: center;
}

.profile-not-logged-in.active {
  display: none;
}

.profile-not-logged-in__title {
  font-family: "Outfit", sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: #333;
  margin: 0 0 16px 0;
}

.profile-not-logged-in__text {
  font-family: "Outfit", sans-serif;
  font-size: 1rem;
  color: #666;
  margin: 0 0 24px 0;
}

.profile-not-logged-in__btn {
  display: inline-block;
  background: #d8115f;
  color: white;
  padding: 14px 32px;
  font-family: "Outfit", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 2px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: background 0.2s ease;
}

.profile-not-logged-in__btn:hover {
  background: #b80e50;
}

/* Profile Content */
.profile-content {
  display: none;
  max-width: 700px;
  margin: 0 auto;
  padding: 48px 24px;
}

.profile-content.active {
  display: block;
}

/* Profile Header */
.profile-header {
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e5e5e5;
}

.profile-header__greeting {
  font-family: "Outfit", sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: #000;
  margin: 0 0 8px 0;
}

.profile-header__email {
  font-family: "Outfit", sans-serif;
  font-size: 1rem;
  color: #666;
  margin: 0;
}

/* Profile Card */
.profile-card {
  background: white;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  margin-bottom: 24px;
}

.profile-card__header {
  padding: 20px 24px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.profile-card__title {
  font-family: "Outfit", sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.profile-card__body {
  padding: 28px;
}

/* Quick Actions */
.profile-actions-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.profile-action {
  flex: 1;
  min-width: 140px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 4px;
  text-decoration: none;
  color: #333;
  font-family: "Outfit", sans-serif;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.profile-action:hover {
  background: #fdf2f6;
  border-color: #d8115f;
}

.profile-action__icon {
  font-size: 1.2rem;
}

/* Logout Section */
.profile-logout {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #eee;
  text-align: center;
}

.logout-btn {
  background: transparent;
  border: 2px solid #d32f2f;
  color: #d32f2f;
  padding: 12px 32px;
  font-family: "Outfit", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.logout-btn:hover {
  background: #dc3545;
  color: white;
}

/* ============================================
   FORM GRID LAYOUT
   ============================================ */

.form-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 500px) {
  .form-row-2 {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   SDK FIELD STYLING (::part selectors)
   ============================================ */

/* Field Labels */
u-field::part(field_label) {
  font-family: "Outfit", sans-serif !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  color: #888 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  margin-bottom: 8px !important;
  display: block !important;
}

/* Input Fields - Brigitte Style (underline) */
u-field::part(input_field),
u-field::part(textarea_field),
u-field::part(select_field) {
  width: 100% !important;
  padding: 10px 0 !important;
  border: none !important;
  border-bottom: 2px solid #e0e0e0 !important;
  border-radius: 0 !important;
  font-family: "Outfit", sans-serif !important;
  font-size: 1rem !important;
  background: transparent !important;
  color: #333 !important;
  transition: border-color 0.2s ease !important;
  box-sizing: border-box !important;
  outline: none !important;
}

u-field::part(input_field):hover,
u-field::part(select_field):hover {
  border-bottom-color: #d8115f !important;
}

u-field::part(input_field):focus,
u-field::part(select_field):focus {
  border-bottom-color: #d8115f !important;
  outline: none !important;
}

/* Select Fields */
u-field::part(select_field) {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23d8115f' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 0 center !important;
  padding-right: 24px !important;
}

/* Radio Group (Anrede) */
u-field::part(radio-group_field) {
  display: inline-flex !important;
  gap: 0 !important;
  border: 1px solid #e0e0e0 !important;
  border-radius: 50px !important;
  overflow: hidden !important;
  background: #fafafa !important;
}

u-field::part(radio-group-item_radio) {
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

u-field::part(radio-group-item_label) {
  padding: 10px 20px !important;
  cursor: pointer !important;
  background: transparent !important;
  color: #666 !important;
  font-family: "Outfit", sans-serif !important;
  font-size: 0.9rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease !important;
  border-right: 1px solid #e0e0e0 !important;
  margin: 0 !important;
}

u-field::part(radio-group-item_label):last-child {
  border-right: none !important;
}

u-field::part(radio-group-item_label):hover {
  background: #fdf2f6 !important;
  color: #d8115f !important;
}

u-field::part(radio_checked) {
  background: #d8115f !important;
  color: #ffffff !important;
  font-weight: 600 !important;
}

/* ============================================
   PROFILE ACTIONS & SUBMIT BUTTON
   ============================================ */

.profile-actions {
  margin-top: 32px;
  text-align: center;
}

.profile-submit-btn,
.profile-actions u-submit-button button {
  display: inline-block;
  width: 100%;
  max-width: 280px;
  padding: 14px 32px;
  background: #d8115f;
  color: white;
  border: none;
  border-radius: 2px;
  font-family: "Outfit", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.profile-submit-btn:hover,
.profile-actions u-submit-button button:hover {
  background: #b80e50;
}

/* ============================================
   UPDATE MESSAGES
   ============================================ */

.profile-update-message {
  margin-top: 20px;
  text-align: center;
}

.profile-message {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 4px;
  font-family: "Outfit", sans-serif;
  font-size: 0.9rem;
  animation: slideIn 0.3s ease;
}

.profile-message--success {
  background: #d8115f;
  color: #ffffff;
}

.profile-message--error {
  background: #dc3545;
  color: #ffffff;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 600px) {
  .profile-content {
    padding: 32px 16px;
  }

  .profile-header__greeting {
    font-size: 1.5rem;
  }

  .profile-card__body {
    padding: 20px 16px;
  }

  .profile-actions-grid {
    flex-direction: column;
  }

  .profile-action {
    min-width: auto;
  }
}
