/* ==========================
   EcelMentees Frontend Styles
   ========================== */

/* Container & Loader */
#ecel-mentees-app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
}

.ecel-loader {
  text-align: center;
  padding: 40px 0;
  font-size: 1.1rem;
  color: #555;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Grid Layout */
.ecel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

.ecel-card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  outline: none;
}

.ecel-card:hover,
.ecel-card:focus {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.ecel-photo {
  width: 100%;
  padding-top: 100%; /* 1:1 ratio */
  background-size: cover;
  background-position: center;
  background-color: #f4f4f4;
}

.ecel-name {
  margin: 12px 0;
  font-weight: 600;
  font-size: 1rem;
  color: #222;
}

/* Empty or Error states */
.ecel-empty,
.ecel-error {
  text-align: center;
  color: #777;
  padding: 40px;
}

/* ==========================
   Modal Styles
   ========================== */
.ecel-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.ecel-modal-inner {
  position: relative;
  background: #fff;
  width: 100%;
  max-width: 850px;
  border-radius: 12px;
  display: flex;
  flex-direction: row;
  gap: 24px;
  padding: 24px;
  box-shadow: 0 6px 25px rgba(0,0,0,0.25);
}

.ecel-modal-left img {
  width: 230px;
  border-radius: 8px;
  object-fit: cover;
}

.ecel-modal-right {
  flex: 1;
  overflow-y: auto;
  max-height: 80vh;
}

.ecel-modal-right h2 {
  margin-top: 0;
  font-size: 1.4rem;
  color: #111;
}

.ecel-modal-right p {
  margin: 6px 0;
  color: #333;
  line-height: 1.5;
}

.ecel-bio {
  margin-top: 10px;
  font-style: italic;
  color: #555;
  border-top: 1px solid #eee;
  padding-top: 10px;
}

.ecel-modal-close {
  position: absolute;
  right: 16px;
  top: 10px;
  background: none;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  color: #999;
  cursor: pointer;
  transition: color 0.2s ease;
}

.ecel-modal-close:hover {
  color: #111;
}

/* ==========================
   Responsive Design
   ========================== */
@media (max-width: 768px) {
  .ecel-modal-inner {
    flex-direction: column;
    max-width: 95%;
    padding: 20px;
  }
  .ecel-modal-left img {
    width: 100%;
    max-height: 300px;
  }
  .ecel-modal-right {
    max-height: 60vh;
  }
}

@media (max-width: 480px) {
  .ecel-name {
    font-size: 0.95rem;
  }
  .ecel-modal-right h2 {
    font-size: 1.2rem;
  }
}

/* Prevent background scroll when modal is open */
body.ecel-modal-open {
  overflow: hidden;
}
