/**
 * SL Profile Header - Modern & Stijlvol Design
 * Version: 2.0.0
 */

/* ============================================
   MAIN CONTAINER - Glassmorphism Card
   ============================================ */
.sl-profiel-header {
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 2em;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  margin: 0 auto;
  transition: all 0.3s ease;
  width: 100%;
}

.sl-profiel-header:hover {
  box-shadow: 0 12px 48px rgba(0,0,0,0.4);
  border-color: rgba(255,255,255,0.15);
}

/* ============================================
   LAYOUT
   ============================================ */
.sl-profiel-left {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

/* ============================================
   AVATAR SECTION
   ============================================ */
.sl-profiel-avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.sl-profiel-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50% !important;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.2);
  box-shadow: 0 4px 24px rgba(0,0,0,0.4), 
              0 0 0 1px rgba(255,255,255,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.sl-profiel-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5),
              0 0 20px rgba(255,255,255,0.1);
}

.sl-profiel-avatar.uploading {
  opacity: 0.6;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 0.9; }
}

/* Change foto link */
.sl-profiel-change {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
}

.sl-profiel-change:hover {
  color: #667eea;
  background: rgba(102, 126, 234, 0.1);
  text-decoration: none;
}

.sl-profiel-input {
  display: none;
}

/* ============================================
   NAME & INFO SECTION
   ============================================ */
.sl-profiel-naam {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.sl-profiel-naam-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sl-profiel-display {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: #ffffff;
  line-height: 1.2;
}

/* Potlood icon - subtiel naast naam */
.sl-profiel-edit-icon {
  width: 18px;
  height: 18px;
  opacity: 0.4;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  margin-top: 4px;
}

.sl-profiel-edit-icon:hover {
  opacity: 1;
  transform: scale(1.1);
}

.sl-profiel-edit-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

/* Verberg edit icon tijdens edit mode */
.sl-profiel-header[data-editing="1"] .sl-profiel-edit-icon {
  display: none;
}

.sl-profiel-logout-inline {
  display: inline-block;
  font-size: 0.6em;
  opacity: 0.6;
  margin-top: 2px;
  text-decoration: none;
  color: #fff;
  transition: all 0.2s ease;
  font-weight: 500;
}

.sl-profiel-logout-inline:hover {
  opacity: 1;
  color: #ff6b6b;
  text-decoration: none;
}

/* ============================================
   VIEW MODE - Profile Info Display
   ============================================ */
.sl-profiel-view {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sl-profiel-role-view {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 4px 12px;
  background: rgba(255,255,255,0.06);
  border-radius: 6px;
  display: inline-block;
  align-self: flex-start;
}

.sl-profiel-bio-view {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255,255,255,0.8);
  margin-top: 4px;
}

/* ============================================
   EDIT MODE - Form Fields
   ============================================ */
.sl-profiel-edit {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sl-profiel-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sl-profiel-field-label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.3px;
}

.sl-profiel-role,
.sl-profiel-bio {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 12px 16px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}

.sl-profiel-role:focus,
.sl-profiel-bio:focus {
  background: rgba(255,255,255,0.08);
  border-color: #667eea;
  outline: none;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.sl-profiel-role::placeholder,
.sl-profiel-bio::placeholder {
  color: rgba(255,255,255,0.4);
}

.sl-profiel-bio {
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
}

.sl-profiel-help {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  font-style: italic;
}

/* ============================================
   BUTTONS & ACTIONS
   ============================================ */
.sl-profiel-actions {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.sl-profiel-save {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  padding: 11px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  font-family: inherit;
}

.sl-profiel-save:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.sl-profiel-save:active {
  transform: translateY(0);
}

.sl-profiel-save:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.sl-profiel-cancel {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 10px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  color: rgba(255,255,255,0.9);
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.sl-profiel-cancel:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.25);
}

/* ============================================
   STATUS MESSAGES
   ============================================ */
.sl-profiel-status {
  margin-top: 12px;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  display: none;
}

.sl-profiel-status:not(:empty) {
  display: block;
  animation: slideIn 0.3s ease;
}

.sl-profiel-status.ok {
  background: rgba(72, 187, 120, 0.15);
  border: 1px solid rgba(72, 187, 120, 0.3);
  color: #48bb78;
}

.sl-profiel-status.err {
  background: rgba(245, 101, 101, 0.15);
  border: 1px solid rgba(245, 101, 101, 0.3);
  color: #f56565;
}

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

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 640px) {
  .sl-profiel-header {
    padding: 24px;
    border-radius: 16px;
  }

  .sl-profiel-left {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .sl-profiel-naam {
    align-items: center;
  }

  .sl-profiel-naam-row {
    justify-content: center;
  }

  .sl-profiel-display {
    font-size: 24px;
  }

  .sl-profiel-avatar {
    width: 100px;
    height: 100px;
  }

  .sl-profiel-role-view {
    align-self: center;
  }

  .sl-profiel-actions {
    justify-content: center;
    width: 100%;
  }

  .sl-profiel-actions button {
    flex: 1;
    min-width: 120px;
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.sl-profiel-save:focus-visible,
.sl-profiel-cancel:focus-visible,
.sl-profiel-change:focus-visible,
.sl-profiel-edit-icon:focus-visible {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
[hidden] {
  display: none !important;
}

/* Dark mode verbetering (optioneel extra contrast) */
@media (prefers-color-scheme: dark) {
  .sl-profiel-header {
    background: linear-gradient(135deg, rgba(255,255,255,0.10), rgba(255,255,255,0.05));
  }
}