/* ============================================
   Edit Profile Modal Styles
   Modal for editing user profile information
   ============================================ */

/* Google Places Autocomplete Dropdown - Must be higher than modal */
.pac-container {
  z-index: 1060 !important;
}

/* Edit Address Link */
.edit-address-link {
  color: var(--acec-gold-dark);
  text-decoration: underline;
  font-weight: 500;
  display: inline-block;
  cursor: pointer;
  transition: color 0.2s ease-in-out;
}

.edit-address-link:hover {
  color: var(--acec-gold);
  text-decoration: underline;
}

/* Hidden class for address search */
.hidden {
  display: none !important;
}

/* Demographics Display - Show values as labels instead of dropdowns */
.demographics-display {
  display: none;
  padding: 0.75rem;
  font-size: 1rem;
  color: var(--acec-navy);
  background-color: var(--acec-light-gray);
  border-radius: 0.375rem;
  font-weight: 500;
  position: relative;
  align-items: center;
  gap: 0.5rem;
}

.demographics-display.active {
  display: flex;
}

.demographics-value {
  flex: 1;
}

.demographics-info-icon {
  color: var(--acec-navy);
  font-size: 1rem;
  cursor: help;
  transition: color 0.2s;
  flex-shrink: 0;
}

.demographics-info-icon:hover {
  color: var(--acec-gold);
}

/* Modal Overlay */
.edit-profile-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1050;
  animation: fadeIn 0.2s ease-in-out;
}

.edit-profile-modal-overlay.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Modal Container */
.edit-profile-modal {
  position: relative;
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  max-width: 42rem;
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slideIn 0.2s ease-out;
}

/* Modal Header */
.edit-profile-modal-header {
  position: relative;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--acec-border);
  min-height: 3.5rem;
}

/* Close Button */
.edit-profile-modal-close {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 0.25rem;
  padding: 0.5rem;
  cursor: pointer;
  transition: background-color 0.2s;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
}

.edit-profile-modal-close:hover {
  background-color: rgba(0, 0, 0, 0.7);
}

.edit-profile-modal-close i {
  color: var(--acec-gold);
  font-size: 1.2rem;
}

/* Modal Body */
.edit-profile-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

/* Assistance Text */
.assistance-text {
  font-size: 0.875rem;
  color: var(--acec-gray);
  margin: 0 0 1.5rem 0;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--acec-border);
}

.assistance-text a {
  color: var(--acec-gold);
  text-decoration: none;
}

.assistance-text a:hover {
  text-decoration: underline;
}

/* Form Sections */
.form-section {
  margin-bottom: 1rem;
  margin-top: 2rem;
}

.form-section:last-child {
  margin-bottom: 0;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--acec-navy);
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--acec-navy);
  margin-bottom: 0.75rem;
}

/* Form Groups */
.form-group {
  margin-bottom: 0.75rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--acec-navy);
  margin-bottom: 0.25rem;
}

/* Form Controls */
.form-control,
.form-select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  border: 1px solid var(--acec-border);
  border-radius: 0.375rem;
  background-color: white;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--acec-gold);
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(247, 201, 93, 0.25);
}

.form-control:disabled,
.form-select:disabled {
  background-color: var(--acec-light-gray);
  cursor: not-allowed;
}

/* Textarea */
textarea.form-control {
  resize: vertical;
  min-height: 60px;
}

textarea.form-control[readonly] {
  background-color: var(--acec-light-gray);
  color: var(--acec-gray);
  resize: none;
}

/* Address Autocomplete */
.address-autocomplete {
  position: relative;
}

.address-suggestions {
  position: absolute;
  z-index: 1000;
  width: 100%;
  margin-top: 0.25rem;
  background-color: white;
  border: 1px solid var(--acec-border);
  border-radius: 0.375rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  max-height: 200px;
  overflow-y: auto;
}

.address-suggestion-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-size: 0.875rem;
  transition: background-color 0.15s;
  border: none;
  width: 100%;
  text-align: left;
  background: white;
  color: var(--acec-navy);
}

.address-suggestion-item:hover {
  background-color: rgba(247, 201, 93, 0.2);
}

/* Checkbox Groups */
.checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.checkbox-group label {
  margin-bottom: 0;
  font-size: 0.875rem;
  color: var(--acec-navy);
  cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  cursor: pointer;
  accent-color: var(--acec-gold);
}

/* Organization Display */
.organization-display {
  color: var(--acec-navy);
  font-weight: 500;
  margin-bottom: 1rem;
  font-size: 1rem;
}

/* Required Field Note */
.required-note {
  font-size: 0.875rem;
  color: var(--acec-gold-dark);
}

/* Modal Footer */
.edit-profile-modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--acec-border);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: auto;
}

/* Buttons - Matching Committee Card Button Styles */
.btn-cancel,
.btn-save {
  padding: 0.5rem 0.75rem;
  font-size: 0.89rem;
  font-family: var(--font-btn);
  cursor: pointer;
}

/* Cancel Button - Matches .btn-view from committee cards */
.btn-cancel {
  background-color: var(--acec-btn-secondary-bg, rgba(0,0,0,0)) !important;
  border: var(--border-width) solid var(--acec-gold) !important;
  color: var(--acec-navy) !important;
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-btn, 0.08em);
  border-radius: var(--radius-md);
  transition: background 0.2s, color 0.2s;
}

.btn-cancel:hover {
  background-color: var(--acec-gold) !important;
  color: var(--acec-navy) !important;
}

/* Save Button - Matches .join-committee-btn from committee cards */
.btn-save {
  background-color: var(--acec-gold) !important;
  border: var(--bs-btn-border-width) solid var(--acec-gold) !important;
  border-color: var(--acec-gold) !important;
  color: var(--acec-navy) !important;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: var(--radius-md) !important;
  transition: background 0.2s, color 0.2s;
}

.btn-save:hover {
  background-color: var(--acec-gold) !important;
  color: var(--acec-navy) !important;
  opacity: 0.85;
}

/* Hidden Class */
.hidden {
  display: none !important;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Scrollbar Styling */
.edit-profile-modal-body::-webkit-scrollbar {
  width: 8px;
}

.edit-profile-modal-body::-webkit-scrollbar-track {
  background: var(--acec-light-gray);
  border-radius: 4px;
}

.edit-profile-modal-body::-webkit-scrollbar-thumb {
  background: var(--acec-gold);
  border-radius: 4px;
}

.edit-profile-modal-body::-webkit-scrollbar-thumb:hover {
  background: var(--acec-gold-dark);
}

.avatar-camera-btn {
  z-index: 10;
}

/* Address Display Textarea - Keep visible but disabled */
#addressDisplay {
  background-color: var(--acec-light-gray);
  color: var(--acec-gray);
  border: 1px solid var(--acec-border);
}

#businessPhone {
  margin-bottom: 1.5rem;
}
#businessEmail {
  margin-bottom: 1.25rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .edit-profile-modal {
    width: 95%;
    max-height: 95vh;
  }

  .edit-profile-modal-header {
    padding: 0.75rem 1rem;
    min-height: 3rem;
  }

  .edit-profile-modal-body,
  .edit-profile-modal-footer {
    padding: 1rem;
  }

  .assistance-text {
    font-size: 0.8125rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
  }

  .section-title {
    font-size: 1.25rem;
  }

  .form-control,
  .form-select {
    font-size: 0.9375rem;
  }
}

@media (max-width: 576px) {
  .edit-profile-modal-footer {
    flex-direction: column-reverse;
  }

  .btn-cancel,
  .btn-save {
    width: 100%;
  }
}
