/* Modal Content */
.profile-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 32px; /* ⬆️ slightly more padding */
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  z-index: 1000;
  max-height: 85vh; /* Keep it readable on short screens */
  max-width: 80vw;  /* ⬆️ wider than before */
  width: 500px;     /* ⬆️ about 50% larger than standard modal sizes */
  overflow-y: auto;
  font-size: 1.05rem; /* ⬆️ slightly bump text size */
  font-weight: 400;
}

.profile-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5); /* Dimmed background */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.profile-modal .close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

.profile-modal .profile-header {
  text-align: center;
}

.profile-modal .profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin-bottom: 10px;
}

.profile-modal .profile-details {
  margin-top: 20px;
}

.profile-modal-container {
  background: #fff;
  border-radius: 10px;
  max-width: 600px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 32px;
  position: relative;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  margin: 20px;
}

.close-button {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

.profile-content {
  font-family: Arial, sans-serif;
  color: #333;
}

.profile-section {
  margin-bottom: 20px;
}

.section-divider {
  border: 0;
  height: 1px;
  background: #ddd;
  margin: 15px 0;
}

.profile-website {
  color: #007bff;
  text-decoration: none;
}

.profile-website:hover {
  text-decoration: underline;
}

.social-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.social-icon {
  width: 40px;
  height: 40px;
  display: inline-block;
}

.social-icon img {
  width: 100%;
  height: 100%;
  -o-object-fit: contain;
     object-fit: contain;
}

/* Profile Image */
.profile-image-container {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.profile-image {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  -o-object-fit: cover;
     object-fit: cover;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.user-bio {
  margin-top: 10px;
  font-size: 1rem; /* Adjust font size */
  color: #666; /* Optional: Gray text color for better contrast */
  line-height: 1.5; /* Improve readability */
}

* Example style for a label + input grouping */
.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
}

/* Example style for inputs - can be further refined */
.form-group label {
  font-weight: bold;
  margin-bottom: 4px;
}

.input {
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
}

/* Example button styling (optional) */
.form-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* TokenGallery styles within the modal - 3-column grid layout */
.token-gallery-modal .token-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  justify-items: center;
  align-items: start;
}

.token-gallery-modal .token-card {
  width: 100%;
  max-width: 90px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.02);
  border-radius: 8px;
}

/* Hover effects removed - tokens are flat/static display */

.token-gallery-modal .token-image {
  width: 64px;
  height: 64px;
  margin-bottom: 8px;
  overflow: hidden;
  position: relative;
  border-radius: 50%;
}

.token-gallery-modal .token-image img {
  border-radius: 50%; /* ⭕ makes the image circular */
  -o-object-fit: cover;
     object-fit: cover;
}

.token-gallery-modal .token-placeholder {
  width: 64px;
  height: 64px;
  margin-bottom: 8px;
  background-color: rgba(0, 0, 0, 0.05);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.token-gallery-modal .token-name {
  text-align: center;
  font-size: 11px;
  font-weight: 500;
  width: 100%;
  line-height: 1.3;
  overflow-wrap: break-word;
}

/* Mobile: 2 columns */
@media (max-width: 600px) {
  .token-gallery-modal .token-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .token-gallery-modal .token-card {
    max-width: 80px;
  }
}

/* Token Summary Section - REMOVED (redundant with TokenGallery display) */


/* Scoped button styling - only applies to buttons with .btn class */
.btn[type="submit"],
.btn[type="button"] {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.btn[type="submit"] {
  background-color: #2F5D50;
  color: #FFFFFF;
}

.btn[type="button"] {
  background-color: #ddd;
  color: #333;
}

.option-label {
  font-weight: 400;
  font-size: 0.95rem; /* Optional: adjust size if needed */
}


/* Profile Header Layout for Funding Button */
.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.profile-info {
    flex: 1;
}

.profile-actions {
    flex-shrink: 0;
    display: flex;
    gap: 8px;
}

/* Interests Section - Rich Formatting */
.interests-section {
  background-color: #ffffff;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.interests-subsection {
  margin-bottom: 20px;
}

.interests-subsection:last-child {
  margin-bottom: 0;
}

.interests-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
}

.interests-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
}

.interests-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.interest-tag {
  display: inline-block;
  background: #F1FBE2;
  color: #2d5a3d;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.interest-tag:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.seeking-tag {
  background: #B5E7EE;
  color: #2d5a5a;
}

.interests-empty {
  color: #999;
  font-style: italic;
  font-size: 0.9rem;
}

.connect-status {
  display: flex;
  align-items: center;
}

.connect-badge {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
}

.connect-badge.low_limited {
  background: linear-gradient(90deg, #ffeeee 0%, #ffe8e8 100%);
  color: #c33;
  border: 1px solid #fcc;
}

.connect-badge.open_available {
  background: linear-gradient(90deg, #ddefbb 0%, #e8f5d8 100%);
  color: #3a5a2d;
  border: 1px solid #b8d89a;
}

.connect-badge.actively_collaborate {
  background: linear-gradient(90deg, #ffeeee 0%, #ddefbb 100%);
  color: #4a5a3d;
  border: 1px solid #c8d8aa;
  font-weight: 700;
}

.connect-badge.not-specified {
  background-color: #f5f5f5;
  color: #666;
  border: 1px solid #ddd;
}

@media (max-width: 600px) {
  .profile-modal {
    width: 95vw;
    padding: 20px;
    font-size: 1rem;
  }

  /* Mobile responsiveness for profile header */
  .profile-header {
      flex-direction: column;
      align-items: stretch;
  }

  .profile-actions {
      justify-content: flex-end;
  }

  /* Mobile adjustments for interests */
  .interest-tag {
    font-size: 0.8rem;
    padding: 5px 12px;
  }
}

/* === NEW: Social Links (List Format with Lucide Icons) === */
.social-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.social-link-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  padding: 4px 0;
}

.social-link-icon {
  color: #555;
  flex-shrink: 0;
}

.social-link-label {
  font-weight: 500;
  color: #333;
  min-width: 80px;
}

.social-link-url {
  color: #007bff;
  text-decoration: none;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-link-url:hover {
  text-decoration: underline;
}

/* === NEW: Action Buttons (Message & Gift) === */
.profile-action-buttons {
  display: flex;
  gap: 12px;
  margin: 16px 0;
  justify-content: flex-start;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.message-btn {
  background-color: #e3f2fd;
  color: #1565c0;
  border: 1px solid #90caf9;
}

.message-btn:hover {
  background-color: #bbdefb;
}

.message-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.gift-btn {
  background-color: #f3e5f5;
  color: #7b1fa2;
  border: 1px solid #ce93d8;
}

.gift-btn:hover {
  background-color: #e1bee7;
}

.gift-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 600px) {
  .profile-action-buttons {
    flex-direction: column;
    gap: 8px;
  }

  .action-btn {
    width: 100%;
    justify-content: center;
  }
}
