/**
 * Profile Modal Styles
 * Consistent with auth.css and existing site design
 */

/* Profile Backdrop */
.profile-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.3s ease;
}

.profile-backdrop[hidden] {
  display: none;
}

/* Profile Modal */
.profile-modal {
  position: relative;
  width: min(90vw, 800px);
  max-height: 85vh;
  background: rgba(10, 10, 10, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

/* Profile Modal Header */
.profile-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-modal-header h2 {
  font-family: 'Diatype-bold', sans-serif;
  font-size: 1.5rem;
  color: white;
  margin: 0;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.profile-close {
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  padding: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s ease, transform 0.2s ease;
  line-height: 1;
}

.profile-close:hover {
  color: rgb(255, 221, 0);
  transform: scale(1.1);
}

/* Profile Modal Body */
.profile-modal-body {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 221, 0, 0.3) transparent;
}

.profile-modal-body::-webkit-scrollbar {
  width: 6px;
}

.profile-modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.profile-modal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 221, 0, 0.3);
  border-radius: 3px;
}

.profile-modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 221, 0, 0.5);
}

/* Profile Section */
.profile-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.password-section {
  padding-top: 2.5rem;
  margin-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.password-section h3 {
  font-family: 'Diatype-bold', sans-serif;
  font-size: 1.25rem;
  color: white;
  margin: 0 0 1.5rem 0;
  letter-spacing: 0.05em;
}

/* Profile Avatar Section */
.profile-avatar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar-label {
  font-family: 'Diatype-light', sans-serif;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  text-align: center;
}

/* Profile Fields */
.profile-fields {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.profile-form,
.password-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Form Groups */
.profile-form .form-group,
.password-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.profile-form .form-group label,
.password-form .form-group label {
  font-family: 'Diatype-bold', sans-serif;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.profile-form .form-group input,
.password-form .form-group input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: white;
  font-family: 'Diatype-light', sans-serif;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.profile-form .form-group input:focus,
.password-form .form-group input:focus {
  border-color: rgb(255, 221, 0);
  background: rgba(255, 255, 255, 0.12);
}

.profile-form .form-group input[readonly] {
  background: rgba(255, 255, 255, 0.03);
  cursor: not-allowed;
  opacity: 0.6;
}

/* Submit Buttons */
.profile-submit-btn {
  width: fit-content;
  padding: 0.875rem 2.5rem;
  background: rgb(255, 221, 0);
  color: black;
  border: none;
  border-radius: 12px;
  font-family: 'Diatype-bold', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.profile-submit-btn:hover {
  background: rgb(255, 230, 50);
  transform: translateY(-2px);
}

.profile-submit-btn:active {
  transform: translateY(0);
}

.profile-submit-btn:disabled {
  background: rgba(255, 221, 0, 0.5);
  cursor: not-allowed;
  transform: none;
}

/* Error Messages */
.profile-error,
.password-error {
  display: none;
  padding: 0.75rem 1rem;
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: 8px;
  color: rgb(248, 113, 113);
  font-family: 'Diatype-light', sans-serif;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.profile-error.show,
.password-error.show {
  display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
  .profile-modal {
    width: 95vw;
    padding: 1.5rem;
  }

  .profile-modal-header h2 {
    font-size: 1.25rem;
  }

  .profile-avatar {
    width: 100px;
    height: 100px;
  }

  .profile-submit-btn {
    width: 100%;
  }
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
