/* =====================================================
   PROFISSIONAL PROFILE + MODAL + LEADS
   Extracted from profissionais.css for performance.
   Used by: profissional.html, portal-profissional
   ===================================================== */

/* =====================================================
   PROFILE PAGE — public professional profile
   Used by: profissional.html
   ===================================================== */

/* Page body offset */
.page-profissional {
  padding-top: 120px;
}

/* Hero — profile variant (centred, no search bar) */
.prof-profile-hero {
  padding: clamp(48px, 8vw, 80px) 0 clamp(40px, 6vw, 64px);
  text-align: center;
}

.prof-profile-avatar-wrap {
  margin: 0 auto 20px;
  width: 88px;
  height: 88px;
}

.prof-profile-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-500) 0%, var(--blue-700) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.03em;
  box-shadow: 0 6px 24px rgba(33, 53, 119, 0.3);
  border: 3px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
  margin: 0 auto;
}

.prof-profile-avatar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: rgba(255, 255, 255, 0.12);
  border-radius: inherit;
}

.prof-profile-name {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.prof-profile-name-text {
  display: inline;
}

.prof-profile-districts {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
}

.prof-profile-districts svg {
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.6);
}

/* ── Profile main layout ─────────────────────────── */
.prof-profile-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.prof-profile-loading {
  padding: clamp(32px, 5vw, 60px) 0;
}

.prof-profile-skeleton {
  max-width: 720px;
  margin: 0 auto;
}

.prof-profile-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}

/* ── Profile sections ────────────────────────────── */
.prof-profile-section {
  padding: clamp(24px, 4vw, 40px) 0;
  border-bottom: 1px solid var(--gray-100);
}

.prof-profile-section:last-child {
  border-bottom: none;
}

.prof-profile-section-title {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 1.15rem);
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

/* ── Bio ─────────────────────────────────────────── */
.prof-profile-bio-text {
  font-family: var(--font-body);
  font-size: 0.975rem;
  color: var(--gray-700);
  line-height: 1.75;
  white-space: pre-line;
}

/* ── Meta (years, CV) ────────────────────────────── */
.prof-profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.prof-profile-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--gray-600);
  font-weight: 500;
  text-decoration: none;
}

.prof-profile-cv-link {
  color: var(--blue-500);
  font-weight: 600;
  transition: color var(--transition-fast);
}

.prof-profile-cv-link:hover {
  color: var(--blue-700);
  text-decoration: underline;
}

.prof-profile-cv-link:focus-visible {
  outline: 2px solid var(--orange-500);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ── Services list ───────────────────────────────── */
.prof-profile-services-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.prof-profile-service-item {
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.prof-profile-service-item:hover {
  border-color: var(--blue-100);
  box-shadow: var(--shadow-sm);
}

.prof-profile-service-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.prof-profile-service-price {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--orange-600);
  white-space: nowrap;
}

.prof-profile-service-desc {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--gray-600);
  line-height: 1.65;
  margin: 0;
}

/* ── Contact — Fase 2 placeholder ────────────────── */
.prof-profile-contact-section {
  border-bottom: none;
}

.prof-profile-contact-card {
  background: linear-gradient(135deg, var(--blue-50) 0%, rgba(255, 255, 255, 0.6) 100%);
  border: 1px solid var(--blue-100);
  border-radius: var(--radius-xl);
  padding: clamp(20px, 3vw, 32px);
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.prof-profile-contact-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--white);
  border: 1px solid var(--blue-100);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue-400);
}

.prof-profile-contact-body {
  flex: 1;
  min-width: 160px;
}

.prof-profile-contact-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.prof-profile-contact-desc {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--gray-500);
  margin: 0;
}

.prof-profile-contact-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 24px;
  background: var(--orange-500);
  color: var(--white);
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  box-shadow: 0 2px 8px rgba(209, 124, 43, 0.3);
}

.prof-profile-contact-btn:hover {
  background: var(--orange-600);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(209, 124, 43, 0.4);
}

.prof-profile-contact-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(209, 124, 43, 0.25);
}

.prof-profile-contact-btn:focus-visible {
  outline: 2px solid var(--orange-500);
  outline-offset: 3px;
}

/* Mobile adjustments */
@media (max-width: 639px) {
  .prof-profile-contact-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .prof-profile-contact-btn {
    width: 100%;
    justify-content: center;
  }

  .prof-profile-name {
    flex-direction: column;
    gap: 8px;
  }
}

/* Reduced motion — profile additions */
@media (prefers-reduced-motion: reduce) {
  .prof-profile-service-item,
  .prof-profile-cv-link,
  .prof-profile-contact-btn {
    transition: none !important;
    transform: none !important;
  }
}

/* ═══════════════════════════════════════════════════
   MODAL — Pedir Orçamento
═══════════════════════════════════════════════════ */
.prof-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  padding: 16px;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  animation: prof-modal-fade-in 0.18s ease;
}

@keyframes prof-modal-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.prof-modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  animation: prof-modal-slide-up 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes prof-modal-slide-up {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.prof-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
  border-bottom: 1px solid var(--gray-100);
  padding-bottom: 16px;
}

.prof-modal-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0;
}

.prof-modal-close {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--gray-100);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--gray-500);
  flex-shrink: 0;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.prof-modal-close:hover {
  background: var(--gray-200);
  color: var(--gray-900);
}

.prof-modal-close:focus-visible {
  outline: 2px solid var(--orange-500);
  outline-offset: 2px;
}

.prof-modal-body {
  padding: 20px 24px 24px;
}

.prof-modal-desc {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--gray-500);
  margin: 0 0 20px;
  line-height: 1.6;
}

.prof-modal-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 480px) {
  .prof-modal-form-row { grid-template-columns: 1fr; }
}

.prof-modal-field {
  margin-bottom: 14px;
}

.prof-modal-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 5px;
}

.prof-modal-required {
  color: var(--orange-500);
  margin-left: 2px;
}

.prof-modal-optional {
  color: var(--gray-400);
  font-weight: 400;
  margin-left: 2px;
}

.prof-modal-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 13px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.925rem;
  color: var(--gray-900);
  background: var(--gray-50);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  appearance: none;
  -webkit-appearance: none;
}

.prof-modal-input:focus {
  border-color: var(--orange-500);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(209, 124, 43, 0.1);
}

textarea.prof-modal-input {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}

select.prof-modal-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.prof-modal-hint {
  font-family: var(--font-body);
  font-size: 0.76rem;
  color: var(--gray-400);
  margin: 4px 0 0;
  text-align: right;
}

.prof-modal-error {
  background: rgba(239, 68, 68, 0.07);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-md);
  color: #991b1b;
  font-family: var(--font-body);
  font-size: 0.875rem;
  padding: 10px 14px;
  margin-bottom: 14px;
  line-height: 1.5;
}

.prof-modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.prof-modal-cancel {
  padding: 10px 20px;
  background: none;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-600);
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

.prof-modal-cancel:hover {
  border-color: var(--gray-400);
  color: var(--gray-900);
}

.prof-modal-cancel:focus-visible {
  outline: 2px solid var(--orange-500);
  outline-offset: 2px;
}

.prof-modal-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
}

/* Success state */
.prof-modal-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 16px 0 4px;
}

.prof-modal-success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(5, 150, 105, 0.1);
  border: 2px solid rgba(5, 150, 105, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #059669;
}

.prof-modal-success-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0;
}

.prof-modal-success-desc {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--gray-500);
  margin: 0;
  line-height: 1.6;
  max-width: 320px;
}

/* ═══════════════════════════════════════════════════
   LEADS — Portal do Profissional
═══════════════════════════════════════════════════ */
.leads-empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--gray-400);
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.leads-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lead-item {
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.lead-item:hover {
  border-color: var(--blue-100);
  box-shadow: var(--shadow-sm);
}

.lead-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.lead-item-name {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gray-900);
}

.lead-item-date {
  font-family: var(--font-body);
  font-size: 0.76rem;
  color: var(--gray-400);
  white-space: nowrap;
  flex-shrink: 0;
}

.lead-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.lead-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  background: var(--blue-50);
  color: var(--blue-600);
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 600;
}

.lead-item-desc {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--gray-600);
  line-height: 1.6;
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lead-contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--gray-100);
}

.lead-contact-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lead-contact-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-400);
}

.lead-contact-value {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--gray-800);
  font-weight: 500;
  word-break: break-all;
}

.lead-contact-value a {
  color: var(--orange-600);
  text-decoration: none;
  font-weight: 600;
}

.lead-contact-value a:hover {
  text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
  .prof-modal-overlay { animation: none; }
  .prof-modal { animation: none; }
  .lead-item,
  .prof-modal-close,
  .prof-modal-input,
  .prof-modal-cancel { transition: none !important; }
}
