/* ToDo: refractor CSS */

:root {
  --matchmaking-color-page-background: #ffbe55;
  --matchmaking-color-surface: #fff;
  --matchmaking-color-surface-secondary: #f2f2f2;
  --matchmaking-color-text: #17181b;
  --matchmaking-color-black: #000;
  --matchmaking-color-primary: #1579c7;
  --matchmaking-color-primary-hover: #0b4d84;
  --matchmaking-color-secondary-hover: #e99813;
  --matchmaking-color-hero-fade-start: rgba(255, 190, 85, 0);
  --matchmaking-color-hero-fade-mid: rgba(255, 190, 85, 0.6);
}

/* Fonts */

@font-face {
    font-family: 'Poppins';
    src: url(../../assets/fonts/Poppins-Light.ttf) format('woff2');
    font-weight: 300;
}
 
 
@font-face {
    font-family: 'Poppins';
    src: url(../../assets/fonts/Poppins-Regular.ttf) format('woff2');
    font-weight: 400;
}
 
@font-face {
    font-family: 'Poppins';
    src: url(../../assets/fonts/Poppins-SemiBold.ttf) format('woff2');
    font-weight: 600;
}
 
@font-face {
    font-family: 'Poppins';
    src: url(../../assets/fonts/Poppins-Bold.ttf) format('woff2');
    font-weight: 700;
}
 
@font-face {
    font-family: 'Poppins';
    src: url(../../assets/fonts/Poppins-ExtraBold.ttf) format('woff2');
    font-weight: 800;
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Page layout */
.matchmaking-page {
  min-height: 100vh;
  background: var(--matchmaking-color-page-background);
}

/* Hero section */
.dashboard-hero {
  min-height: 720px;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  position: relative;
}

.dashboard-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to bottom,
      var(--matchmaking-color-hero-fade-start) 76%,
      var(--matchmaking-color-hero-fade-mid) 88%,
      var(--matchmaking-color-page-background) 100%
    );
}

/* Main card layout */
.matchmaking-card-wrap {
  max-width: 1290px;
  margin: -500px auto 0;
  padding: 0 20px 70px;
  position: relative;
  z-index: 2;
}

.matchmaking-card {
  background: var(--matchmaking-color-surface);
  border-radius: 20px;
  padding: 45px 60px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 420px);
  gap: 55px;
  margin-bottom: -70px;
}

/* Content section */
.matchmaking-content h1 {
  margin-bottom: 16px;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 130%;
  font-weight: 700;
}

.matchmaking-content p {
  margin-bottom: 22px;
  font-size: clamp(16px, 2vw, 18px);
  line-height: 150%;
  font-weight: 300;
}

.matchmaking-label {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--matchmaking-color-text);
  font-size: 18px;
  font-weight: 600;
  text-transform: uppercase;
}

/* Action buttons */
.matchmaking-actions {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 6px 14px;
  border-radius: 15px;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  border: 0;
  cursor: pointer;
}

.btn.btn-primary,
button.btn.btn-primary {
  background: var(--matchmaking-color-primary);
  color: var(--matchmaking-color-surface);
}

.btn.btn-primary:hover,
button.btn.btn-primary:hover {
  background: var(--matchmaking-color-primary-hover);
  color: var(--matchmaking-color-surface);
  text-decoration: none;
}

.btn-secondary {
  background: var(--matchmaking-color-page-background);
  color: var(--matchmaking-color-text);
}

.btn-secondary:hover {
  background: var(--matchmaking-color-secondary-hover);
}

.btn-delete {
  background: var(--matchmaking-color-delete);
  box-shadow: 2px 2px 0 var(--matchmaking-color-black);
  color: var(--matchmaking-color-surface);
}

.btn-delete:hover {
  background: var(--matchmaking-color-delete-hover);
  box-shadow: 2px 2px 0 var(--matchmaking-color-black);
}



/* Login card */
.matchmaking-login-card {
  background: var(--matchmaking-color-surface-secondary);
  border-radius: 20px;
  padding: 30px;
}

.matchmaking-login-card h2 {
  margin-bottom: 22px;
  font-size: 24px;
  line-height: 150%;
  font-weight: 800;
}

.matchmaking-login-card form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.matchmaking-login-card label {
  font-size: 16px;
  font-weight: 600;
}

.matchmaking-login-card input {
  width: 100%;
  height: 50px;
  border: 1px solid var(--matchmaking-color-black);
  border-radius: 5px;
  padding: 0 15px;
  font-family: "Poppins", sans-serif;
  font-size: 16px;
}

.matchmaking-login-card input:focus {
  border-color: var(--matchmaking-color-primary);
  outline: none;
}

.full-width {
  width: 100%;
  margin-top: 10px;
}

.matchmaking-login-card p {
  margin-top: 18px;
  font-size: 16px;
  line-height: 150%;
}

/* Matching Score */ 

.match-score-summary {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    align-items: center;
}

.match-score-large {
    font-size: 3rem;
    font-weight: 800;
    color: #f5a623;
    white-space: nowrap;
}

.match-score-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.match-score-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #ddd;
}

.match-score-table td:first-child {
    font-weight: 700;
}

.match-explanation-list {
    margin: 0.75rem 0 1.5rem;
    padding-left: 1.25rem;
}

.match-explanation-list li {
    margin-bottom: 0.5rem;
}

.match-explanation-list.positive li::marker {
    content: "✓ ";
}

.match-explanation-list.warning li::marker {
    content: "⚠ ";
}

.match-confidence {
    margin-top: 0.5rem;
    font-size: 0.95rem;
    opacity: 0.85;
}

.match-data-warning {
    border-left: 4px solid #f0ad4e;
    background: rgba(240, 173, 78, 0.12);
}

@media (max-width: 768px) {
    .match-score-summary {
        flex-direction: column;
        align-items: flex-start;
    }

    .match-score-large {
        font-size: 2.25rem;
    }
}

/* Searchbar for candidates */

.search-panel {
    margin-bottom: 24px;
    padding: 24px;
    border: 2px solid #111;
    border-radius: 14px;
    background: #fff;
}

.search-panel .form-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.search-panel label {
    font-weight: 700;
}

.search-panel input {
    width: 100%;
    max-width: 520px;
    padding: 12px 14px;
    border: 1px solid #d5d5d5;
    border-radius: 10px;
    font-size: 15px;
}

.search-panel input:focus {
    outline: none;
    border-color: #1e83d3;
    box-shadow: 0 0 0 3px rgba(30, 131, 211, 0.15);
}

.search-panel .form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Preview cards */

.candidate-skill-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 6px 0 14px;
}

.skill-pill {
    background: #eef6ff;
    color: #1e83d3;
    border-radius: 999px;
    border: 2px solid black;
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.skill-pill-more {
    background: #f3f3f3;
    color: #555;
}

.empty-state-small {
    display: inline-block;
    margin-bottom: 14px;
    color: #666;
    font-size: 13px;
}

.match-card-footer {
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: stretch;
    margin-top: 18px;
}

.match-actions {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 12px;
    align-items: stretch;
}

.send-match-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.match-feedback-input {
    width: 100%;
    min-height: 95px;
    padding: 12px 14px;
    border: 1px solid #cfcfcf;
    border-radius: 12px;
    font-family: "Poppins", sans-serif;
    font-size: 14px;
    resize: vertical;
}

.match-feedback-input:focus {
    outline: none;
    border-color: var(--matchmaking-color-primary);
    box-shadow: 0 0 0 3px rgba(21, 121, 199, 0.15);
}

.match-actions .btn,
.match-actions button.btn {
    width: 100%;
    min-height: 46px;
    border-radius: 14px;
}

.match-actions > .btn,
.match-actions > button.btn {
    align-self: end;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 650px;
    padding: 24px;
    border-radius: 20px;
}

.modal-content textarea {
    width: 100%;
    min-height: 180px;
    margin: 16px 0;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}


/* Tablet responsive */
@media (max-width: 1024px) {
  .dashboard-hero {
    min-height: 560px;
  }

  .matchmaking-card {
    grid-template-columns: 1fr;
    gap: 35px;
    padding: 40px 35px;
  }

  .matchmaking-login-card {
    max-width: 520px;
    width: 100%;
  }
}

/* Mobile responsive */
@media (max-width: 767px) {
  .dashboard-hero {
    min-height: 390px;
    background-position: center top;
  }

  .matchmaking-card-wrap {
    margin-top: -65px;
    padding: 0 14px 50px;
  }

  .matchmaking-card {
    padding: 28px 20px;
    gap: 28px;
    border-radius: 18px;
  }

  .matchmaking-actions {
    flex-direction: column;
    gap: 12px;
  }

  .matchmaking-actions .btn {
    width: 100%;
  }

  .matchmaking-login-card {
    padding: 24px 18px;
  }
}

/* AI score recalculating */

.ai-loading-box {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    gap: 1rem;
    align-items: center;
}

.ai-spinner {
    width: 28px;
    height: 28px;
    border: 4px solid rgba(255, 255, 255, 0.25);
    border-top-color: #fff;
    border-radius: 50%;
    animation: aiSpin 1s linear infinite;
    flex-shrink: 0;
}

@keyframes aiSpin {
    to {
        transform: rotate(360deg);
    }
}

/* Tablet responsive */
@media (max-width: 1024px) {
  .dashboard-hero {
    min-height: 560px;
  }

  .matchmaking-card-wrap {
    margin-top: -360px;
    padding: 0 24px 60px;
  }

  .matchmaking-card {
    grid-template-columns: 1fr;
    gap: 35px;
    padding: 40px 35px;
  }

  .matchmaking-login-card {
    max-width: 520px;
    width: 100%;
  }

  .match-actions {
    grid-template-columns: 1fr 1fr;
  }
}

/* =========================================================
   MATCHMAKER DASHBOARD OVERHAUL
========================================================= */

.matchmaker-dashboard-hero-card {
  padding: 28px;
  border: 2px solid #000;
  border-radius: 28px;
  background: linear-gradient(135deg, #fff8ec, #ffffff);
  box-shadow: 5px 5px 0 #000;
  margin-bottom: 26px;
}

.matchmaker-dashboard-hero-card .dashboard-kicker {
  color: var(--matchmaking-color-primary);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.matchmaker-dashboard-hero-card h1 {
  margin: 6px 0 10px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.05;
  font-weight: 900;
}

.matchmaker-dashboard-hero-card p {
  max-width: 720px;
  color: #555;
  line-height: 1.6;
}

/* KPI cards */
.matchmaker-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 20px;
  margin: 24px 0;
}

.matchmaker-overview .dashboard-stat {
  position: relative;
  min-height: 280px;
  padding: 28px;

  display: flex;
  flex-direction: column;
  justify-content: flex-end;

  border: 2px solid #000;
  border-radius: 26px;
  background: linear-gradient(135deg, #ffffff, #fff8ec);
  box-shadow: 4px 4px 0 #000;
  overflow: hidden;
}

.matchmaker-overview .dashboard-stat > span {
  position: absolute;
  top: 22px;
  left: 28px;

  font-size: clamp(5rem, 8vw, 7.5rem);
  font-weight: 900;
  line-height: 1;

  color: var(--matchmaking-color-primary);
}

.matchmaker-overview .dashboard-stat > p {
  position: relative;
  z-index: 2;

  margin: 0;
  max-width: 100%;

  color: #6b7280;
  font-size: 0.85rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Pipeline card */
.dashboard-stat-pipeline {
  gap: 16px;
}

.dashboard-stat-pipeline > p {
  margin-bottom: 6px;
}

.pipeline-stats {
  display: grid;
  gap: 10px;
}

.pipeline-stats div {
  padding: 12px 14px;
  border: 2px solid #000;
  border-radius: 18px;
  background: #fff;
  box-shadow: 2px 2px 0 #000;
}

.pipeline-stats strong {
  color: #111827;
}

.pipeline-stats span {
  color: var(--matchmaking-color-primary) !important;
  font-size: 2rem !important;
}

/* Activity panel */
.matchmaker-activity-panel {
  border: 2px solid #000;
  border-radius: 28px;
  background: linear-gradient(135deg, #ffffff, #fff8ec);
  box-shadow: 5px 5px 0 #000;
}

.matchmaker-activity-panel h2 {
  margin-bottom: 14px;
}

.dashboard-activity-panel {
  max-height: 520px;
  padding-right: 8px;
}

.activity-list {
  gap: 14px;
}

.activity-card {
  padding: 16px;
  border: 2px solid #000;
  border-left: 8px solid var(--matchmaking-color-primary);
  border-radius: 20px;
  background: #fff;
  box-shadow: 3px 3px 0 #000;
}

.activity-header {
  align-items: center;
  gap: 14px;
}

.activity-header strong {
  font-size: 1rem;
  font-weight: 900;
}

.activity-header span {
  color: #6b7280;
  font-size: 0.8rem;
  font-weight: 700;
}

.activity-body {
  margin-top: 8px;
  color: #333;
  line-height: 1.5;
}

/* Responsive */
@media (max-width: 1100px) {
  .matchmaker-overview {
    grid-template-columns: 1fr 1fr;
  }

  .dashboard-stat-pipeline {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767px) {
  .matchmaker-dashboard-hero-card {
    padding: 22px;
    border-radius: 22px;
  }

  .matchmaker-overview {
    grid-template-columns: 1fr;
  }

  .matchmaker-overview .dashboard-stat {
    min-height: 180px;
  }

  .matchmaker-overview .dashboard-stat > span {
    font-size: 5rem;
  }

  .activity-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Mobile responsive */
@media (max-width: 767px) {
  .dashboard-hero {
    min-height: 390px;
    background-position: center top;
  }

  .matchmaking-card-wrap {
    margin-top: -65px;
    padding: 0 14px 50px;
  }

  .matchmaking-card {
    padding: 28px 20px;
    gap: 28px;
    border-radius: 18px;
  }

  .matchmaking-content h1 {
    font-size: 24px;
  }

  .matchmaking-content p,
  .matchmaking-label {
    font-size: 16px;
  }

  .matchmaking-actions,
  .search-panel .form-actions,
  .modal-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .matchmaking-actions .btn,
  .search-panel .form-actions .btn,
  .modal-actions .btn {
    width: 100%;
  }

  .matchmaking-login-card {
    padding: 24px 18px;
  }

  .match-score-summary {
    flex-direction: column;
    align-items: flex-start;
  }

  .match-score-large {
    font-size: 2.25rem;
  }

  .match-score-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .search-panel {
    padding: 18px;
  }

  .search-panel input {
    max-width: none;
  }

  .match-actions {
    grid-template-columns: 1fr;
  }

  .modal-overlay {
    padding: 14px;
  }

  .modal-content {
    max-height: 90vh;
    overflow-y: auto;
    padding: 20px;
  }
}

/* Small mobile responsive */
@media (max-width: 480px) {
  .dashboard-hero {
    min-height: 320px;
  }

  .matchmaking-card-wrap {
    margin-top: -45px;
  }

  .matchmaking-card {
    padding: 24px 16px;
  }

  .matchmaking-login-card h2 {
    font-size: 21px;
  }

  .btn {
    width: 100%;
    min-height: 44px;
  }

  .match-score-large {
    font-size: 2rem;
  }

  .skill-pill {
    white-space: normal;
  }
}


/* Temporary fix for matchmaker dash*/
.dashboard-overview.matchmaker-overview > .dashboard-stat:not(.dashboard-stat-pipeline) > span {
  position: absolute !important;
  top: 22px !important;
  left: 28px !important;

  display: block !important;

  font-size: 7rem !important;
  font-weight: 900 !important;
  line-height: 1 !important;

  color: var(--matchmaking-color-primary) !important;
}

.dashboard-overview.matchmaker-overview > .dashboard-stat:not(.dashboard-stat-pipeline) {
  position: relative !important;
  min-height: 280px !important;
  justify-content: flex-end !important;
}