/* ==============================
   PROFESSIONAL LIST MAIN STYLES
   ============================== */
#professionals-list {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  padding: 20px;
  max-width: 1000px;
  margin: 20px auto;
  font-family: system-ui, sans-serif;
}

#professionals-list h2 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 1.4rem;
  font-weight: 600;
}

#professionals-list input[type="text"],
#professionals-list input[type="email"],
#professionals-list input[type="search"],
#professionals-list input[type="tel"] {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin: 8px 0;
  font-size: 0.95em;
}

#submit-professional {
  background: #0066cc;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 10px;
  font-size: 0.95em;
  width: auto;
}

#submit-professional:hover {
  background: #004b99;
}

/* ==============================
   TABLE STYLING
   ============================== */
.professionals-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  table-layout: fixed;
  font-size: 0.93em;
}

.professionals-table th,
.professionals-table td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: left;
  vertical-align: top;
  word-wrap: break-word;
}

.professionals-table th {
  background-color: #f2f2f2;
  font-weight: 600;
}

/* Alternate row color */
.professionals-table tr:nth-child(even) {
  background-color: #fafafa;
}

.professionals-table tr:hover {
  background-color: #f5f5f5;
}

/* Column widths */
.professionals-table th.select-col,
.professionals-table td.select-col { width: 8%; }
.professionals-table th.picture-col,
.professionals-table td.picture-col { width: 12%; }
.professionals-table th.name-col,
.professionals-table td.name-col { width: 22%; }
.professionals-table th.profile-col,
.professionals-table td.profile-col { width: 35%; }

/* ==============================
   IMAGE STYLING
   ============================== */
.professionals-table img.prof-thumb {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #ddd;
}

.professionals-table .no-thumb {
  color: #999;
  font-size: 0.9em;
}

/* ==============================
   PROFILE DESCRIPTION WITH READ MORE / SHOW LESS
   ============================== */
.profile-cell {
  position: relative;
  max-width: 280px;
}

.profile-text {
  overflow: hidden;
  line-height: 1.4em;
  max-height: 2.8em;
  transition: max-height 0.3s ease;
  color: #333;
  font-size: 0.93em;
}

.profile-text.expanded {
  max-height: 1000px;
}

.profile-cell .read-more {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.88em;
  color: #0066cc;
  cursor: pointer;
  text-decoration: underline;
  font-weight: 500;
}

.profile-cell .read-more:hover {
  color: #004b99;
}

/* ==============================
   USER INFO FIELDS LAYOUT
   ============================== */
.user-info {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

.user-info input {
  flex: 1;
}

/* ==============================
   Request Description & Button Layout
   ============================== */

/* Desktop view */
#professionals-list textarea#request_description {
    width: 100%;
    min-height: 100px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    resize: vertical;
    font-size: 0.95em;
    margin-bottom: 12px;
}

#submit-professional {
    display: inline-block;
    background: #0066cc;
    color: #fff;
    border: none;
    padding: 10px 22px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    transition: background 0.3s ease;
}

#submit-professional:hover {
    background: #004b99;
}

/* ==============================
   MOBILE VIEW: CARD LAYOUT
   ============================== */
@media (max-width: 768px) {
  #professionals-list { padding: 15px; }
  .professionals-table { border: none; }

  /* Hide table headers */
  .professionals-table thead { display: none; }

  .professionals-table tr {
    display: block;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    margin-bottom: 15px;
    padding: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  }

  .professionals-table td {
    display: flex;
    align-items: flex-start;
    border: none;
    padding: 6px 0;
    font-size: 0.85em;
  }

  .professionals-table td::before {
    content: attr(data-label);
    font-weight: 600;
    width: 90px;
    flex-shrink: 0;
    color: #333;
  }

  .professionals-table img.prof-thumb {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    margin-right: 10px;
  }

  .profile-cell { max-width: 100%; }
  .profile-text { font-size: 0.83em; line-height: 1.4em; }
  .profile-cell .read-more { font-size: 0.8em; margin-top: 5px; color: #0073e6; }

  /* Form inputs stack vertically */
  #professionals-list .user-info { flex-direction: column; }
  #professionals-list .user-info input { width: 100%; }
	
	#professionals-list textarea#request_description {
        min-height: 80px;
    }

    #submit-professional {
        width: 100%;
        padding: 10px;
        margin-top: 8px;
    }
}

/* ==============================
   SEARCH & FILTER STYLING
   ============================== */
.professional-filters {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.professional-filters select {
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 14px;
  min-width: 160px;
  background: #fff;
  color: #333;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 220px;
}

.search-box input[type="search"] {
  width: 100%;
  padding: 8px 35px 8px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 14px;
}

.search-box .search-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: #555;
  transition: color 0.2s ease;
}

.search-box .search-btn:hover {
  color: #0066cc;
}

@media (max-width: 600px) {
  .professional-filters { flex-direction: column; align-items: stretch; }
  .search-box { width: 100%; }
}

/* ==============================
   Load More Button
   ============================== */
.load-more-wrap {
  text-align: right;
  margin-top: 10px;
}

#load-more-resources,
#load-more-professionals {
  background: #fff;
  color: #000;
  border: 1px solid #000;
  border-radius: 6px;
  padding: 8px 18px;
  font-size: 0.9em;
  cursor: pointer;
  transition: background 0.2s ease;
}

#load-more-resources:hover,
#load-more-professionals:hover {
  background: #f3f3f3;
}

@media (max-width: 768px) {
  .load-more-wrap {
    text-align: center;
  }
}