.lawyer-detail-screen {
  min-height: 100vh;
  background: var(--gray-50);
  padding-bottom: 40px;
  width: 100%;
  overflow-x: hidden;
}

.detail-header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--gray-200);
}

.back-button {
  background: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-700);
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
}

.back-button:hover {
  background: var(--primary);
  color: white;
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

/* ===== Profile Section - Clean layout without overlaps ===== */
.lawyer-profile {
  background: linear-gradient(180deg, white 0%, #fafbfc 100%);
  padding: 32px 20px 28px;
  text-align: center;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.profile-avatar-large {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 5px solid white;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  flex-shrink: 0;
}

.profile-avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar-large svg {
  color: var(--gray-500);
}

.profile-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 500px;
}

.lawyer-name-large {
  font-size: 22px;
  font-weight: 800;
  color: var(--secondary);
  letter-spacing: -0.02em;
  line-height: 1.3;
  padding: 0 10px;
  word-break: break-word;
}

.lawyer-english-name {
  font-size: 13px;
  color: var(--gray-500);
  font-weight: 500;
  font-style: italic;
  padding: 0 10px;
  word-break: break-word;
}

.specialization-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 4px;
  max-width: 100%;
}

.specialization-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(91, 157, 217, 0.3);
  white-space: nowrap;
}

.lawyer-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--primary);
  font-weight: 600;
  direction: ltr;
  background: rgba(91, 157, 217, 0.08);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  margin-top: 4px;
  word-break: break-all;
  max-width: 100%;
}

.lawyer-phone svg {
  flex-shrink: 0;
}

.detail-content {
  padding: 20px 20px;
  max-width: 700px;
  margin: 0 auto;
}

/* Quick Actions Bar */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}

.action-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px 12px;
  background: white;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  color: var(--gray-700);
  font-size: 13px;
  font-weight: 700;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.action-button:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.action-button.call-action {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border-color: transparent;
}

.action-button.call-action:hover {
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.35);
}

.action-button.email-action:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.action-button.location-action {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border-color: transparent;
}

.action-button.location-action:hover {
  box-shadow: var(--shadow-primary-hover);
}

/* Info Grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.info-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  transition: all var(--transition);
}

.info-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.info-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(91, 157, 217, 0.12) 0%, rgba(91, 157, 217, 0.06) 100%);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.info-content {
  flex: 1;
  min-width: 0;
  text-align: right;
}

.info-card .info-label {
  font-size: 11px;
  color: var(--gray-500);
  margin-bottom: 4px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.info-card .info-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-900);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Detail Sections */
.detail-section {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  transition: all var(--transition);
}

.detail-section:hover {
  box-shadow: var(--shadow-md);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 800;
  color: var(--secondary);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gray-100);
  letter-spacing: -0.01em;
}

.section-title svg {
  color: var(--primary);
  flex-shrink: 0;
}

.section-content {
  padding: 0;
}

.section-text {
  font-size: 14px;
  color: var(--gray-700);
  line-height: 1.8;
  margin: 0;
  font-weight: 500;
  word-break: break-word;
}

/* Contact Rows */
.contact-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-100);
  gap: 12px;
  flex-wrap: wrap;
}

.contact-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.contact-row:first-child {
  padding-top: 0;
}

.contact-label {
  font-size: 13px;
  color: var(--gray-500);
  font-weight: 600;
  flex-shrink: 0;
}

.contact-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-900);
  text-align: left;
  word-break: break-all;
  direction: ltr;
}

.contact-link {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

.contact-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Location Button */
.location-button {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border-radius: var(--radius-full);
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
  box-shadow: var(--shadow-primary);
  transition: all var(--transition);
  letter-spacing: 0.01em;
  border: none;
  cursor: pointer;
}

.location-button:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-primary-hover);
}

.location-button:active {
  transform: translateY(-1px);
}

.error-message {
  text-align: center;
  padding: 80px 20px;
  font-size: 18px;
  color: var(--gray-500);
  font-weight: 600;
}

/* Loading state */
.detail-loading {
  text-align: center;
  padding: 100px 20px;
  color: var(--gray-500);
}

.detail-loading .spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

.detail-loading p {
  font-size: 15px;
  font-weight: 600;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
  .lawyer-profile {
    padding: 28px 16px 24px;
    gap: 14px;
  }

  .profile-avatar-large {
    width: 110px;
    height: 110px;
  }

  .lawyer-name-large {
    font-size: 20px;
  }

  .lawyer-english-name {
    font-size: 12px;
  }

  .lawyer-phone {
    font-size: 13px;
    padding: 7px 14px;
  }

  .specialization-badge {
    font-size: 12px;
    padding: 6px 16px;
  }

  .detail-content {
    padding: 18px 16px;
  }

  .info-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .info-card {
    padding: 14px;
  }

  .info-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
  }

  .info-card .info-value {
    font-size: 13px;
  }

  .detail-section {
    padding: 18px 20px;
  }

  .section-title {
    font-size: 15px;
  }

  .section-text {
    font-size: 13px;
  }

  .location-button {
    font-size: 14px;
    padding: 15px;
  }

  .action-button {
    padding: 14px 10px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .lawyer-profile {
    padding: 24px 14px 20px;
  }

  .profile-avatar-large {
    width: 100px;
    height: 100px;
  }

  .lawyer-name-large {
    font-size: 18px;
  }

  .specialization-badge {
    font-size: 11px;
    padding: 5px 14px;
  }

  .info-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .info-card .info-value {
    white-space: normal;
  }

  .detail-section {
    padding: 16px 18px;
  }

  .section-title {
    font-size: 14px;
  }

  .section-text {
    font-size: 12.5px;
  }

  .contact-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .contact-value {
    text-align: right;
    width: 100%;
  }

  .location-button {
    font-size: 13px;
    padding: 14px;
  }

  .quick-actions {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* Expertise tags in detail page */
.expertise-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.expertise-tag {
  display: inline-block;
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(91, 157, 217, 0.1) 0%, rgba(91, 157, 217, 0.05) 100%);
  color: var(--primary);
  border: 1px solid rgba(91, 157, 217, 0.2);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  transition: all var(--transition);
}

.expertise-tag:hover {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-primary);
}

@media (max-width: 480px) {
  .expertise-tag {
    font-size: 12px;
    padding: 5px 12px;
  }
}


/* ---- Review banner (needs_review lawyers) ---- */
.review-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #fff8e1 0%, #fff3c4 100%);
  color: #8a6d00;
  padding: 12px 20px;
  border-right: 4px solid #f5c518;
  font-size: 13px;
  font-weight: 600;
  margin: 0;
}

.review-banner svg {
  color: #f5c518;
  flex-shrink: 0;
}

/* ---- Provider type tag ---- */
.provider-type-tag {
  display: inline-block;
  background: rgba(30, 58, 95, 0.08);
  color: var(--secondary);
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  margin-top: 8px;
  border: 1px solid rgba(30, 58, 95, 0.15);
}

/* ---- Invalid contact styling ---- */
.contact-invalid {
  color: var(--gray-500) !important;
  text-decoration: line-through;
  font-style: italic;
}

.review-flag {
  display: inline-block;
  background: #fff8e1;
  color: #8a6d00;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  margin-inline-start: 8px;
  border: 1px solid #f5c518;
  vertical-align: middle;
}

.suggested-fix {
  display: block;
  margin-top: 4px;
  padding: 4px 10px;
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  direction: ltr;
}

/* ---- Detail bullet list ---- */
.detail-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-list li {
  padding: 10px 14px;
  background: var(--gray-50);
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--gray-700);
  border-inline-start: 3px solid var(--primary-light);
  line-height: 1.6;
}

/* ---- Audience & cost tags (distinct colors) ---- */
.audience-tag {
  display: inline-block;
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(201, 169, 97, 0.12) 0%, rgba(201, 169, 97, 0.05) 100%);
  color: #a0812e;
  border: 1px solid rgba(201, 169, 97, 0.3);
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 700;
}

.cost-tag {
  display: inline-block;
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.03) 100%);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 700;
}

@media (max-width: 480px) {
  .review-banner {
    font-size: 12px;
    padding: 10px 16px;
  }
  .detail-list li {
    font-size: 12.5px;
    padding: 9px 12px;
  }
}
