
/* =========================================
   MyNominee.In — Analysis Workspace
   File: css/analysis.css
   ========================================= */

.analysis-page {
  min-height: 100vh;
  background: #f5f9fa;
  color: #19323b;
}

/* ---------- Main layout ---------- */

.analysis-main {
  min-height: calc(100vh - 150px);
  padding: 125px 0 60px;
}

.analysis-heading {
  max-width: 780px;
  margin-bottom: 32px;
}

.analysis-heading h1 {
  margin: 0;
  color: #19323b;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.055em;
}

.analysis-heading h1 span {
  display: block;
  color: #1a7d9c;
}

.analysis-heading p {
  max-width: 680px;
  margin: 16px 0 0;
  color: #667b83;
  font-size: 13px;
  line-height: 1.9;
}

/* ---------- Workspace cards ---------- */

.workspace-card {
  padding: 30px;
  border: 1px solid #e3edef;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(21, 73, 84, 0.045);
}

.workspace-card-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.workspace-card-heading h2 {
  margin: 0;
  color: #203d46;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.workspace-card-heading p {
  margin: 5px 0 0;
  color: #819197;
  font-size: 11px;
  line-height: 1.7;
}

.workspace-icon {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  color: #1a7d9c;
  border-radius: 15px;
  background: #e8f6f7;
  font-size: 21px;
}

/* ---------- Upload dropzone ---------- */

.upload-dropzone {
  display: flex;
  min-height: 260px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  border: 2px dashed #c9e0e5;
  border-radius: 20px;
  background: #f8fcfc;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease,
    transform 0.2s ease;
}

.upload-dropzone:hover,
.upload-dropzone:focus-visible,
.upload-dropzone.drag-over {
  border-color: #1a9b9d;
  background: #f0fbfa;
}

.upload-dropzone:focus-visible {
  outline: 3px solid rgba(37, 166, 161, 0.25);
  outline-offset: 3px;
}

.upload-icon {
  display: grid;
  width: 65px;
  height: 65px;
  margin-bottom: 16px;
  place-items: center;
  color: #1a7d9c;
  border: 1px solid #d9edef;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(21, 73, 84, 0.06);
  font-size: 29px;
}

.upload-dropzone h3 {
  margin: 0;
  color: #27444c;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 17px;
  font-weight: 800;
}

.upload-dropzone p {
  margin: 6px 0 15px;
  color: #7d9096;
  font-size: 12px;
}

.browse-link {
  padding: 0;
  color: #16879b;
  border: 0;
  background: transparent;
  font-size: inherit;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.browse-link:hover {
  color: #104f61;
}

.upload-formats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.upload-formats span {
  padding: 5px 10px;
  color: #52737b;
  border: 1px solid #dce9eb;
  border-radius: 8px;
  background: #fff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.upload-dropzone small {
  margin-top: 15px;
  color: #93a2a7;
  font-size: 10px;
}

/* ---------- Upload status and selected file ---------- */

.upload-status {
  display: none;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.6;
}

.upload-status:not(:empty) {
  display: block;
}

.upload-status.status-error {
  color: #9b3434;
  border: 1px solid #f2d4d4;
  background: #fff5f5;
}

.upload-status.status-success {
  color: #216b51;
  border: 1px solid #ccebdd;
  background: #f1fbf6;
}

.upload-status.status-info {
  color: #245e77;
  border: 1px solid #d4e8f2;
  background: #f2f9fd;
}

.selected-file {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 15px;
  border: 1px solid #e0ebed;
  border-radius: 15px;
  background: #fff;
}

.selected-file-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  color: #218b7e;
  border-radius: 12px;
  background: #e9f8f2;
  font-size: 19px;
}

.selected-file-info {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.selected-file-info strong {
  overflow-wrap: anywhere;
  color: #29464e;
  font-size: 12px;
  font-weight: 800;
}

.selected-file-info small {
  margin-top: 3px;
  color: #829398;
  font-size: 10px;
}

.remove-file {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  color: #7d8f95;
  border: 1px solid #e4edef;
  border-radius: 10px;
  background: white;
  cursor: pointer;
}

.remove-file:hover {
  color: #b33f4d;
  border-color: #f0cfd3;
  background: #fff5f6;
}

.upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.upload-actions .btn {
  min-height: 44px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ---------- Dataset overview ---------- */

#datasetOverview {
  margin-top: 40px;
}

.results-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.results-heading h2 {
  margin: 0;
  color: #19323b;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.results-heading p {
  margin: 7px 0 0;
  color: #7b8e94;
  font-size: 12px;
}

.dataset-ready {
  flex: 0 0 auto;
  padding: 8px 12px;
  color: #247b5b;
  border: 1px solid #cfe9dc;
  border-radius: 100px;
  background: #effaf4;
  font-size: 10px;
  font-weight: 800;
}

/* ---------- Summary cards ---------- */

.summary-card {
  height: 100%;
  min-height: 150px;
  padding: 21px;
  border: 1px solid #e3edef;
  border-radius: 19px;
  background: #fff;
  box-shadow: 0 5px 20px rgba(21, 73, 84, 0.035);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.summary-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(21, 73, 84, 0.075);
}

.summary-card-icon {
  display: grid;
  width: 39px;
  height: 39px;
  margin-bottom: 15px;
  place-items: center;
  color: #1a7d9c;
  border-radius: 12px;
  background: #eaf6f8;
  font-size: 17px;
}

.summary-card p {
  margin: 0;
  color: #819197;
  font-size: 11px;
  font-weight: 700;
}

.summary-card h3 {
  margin: 5px 0 0;
  color: #203d46;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
}

/* ---------- Tables ---------- */

.analysis-table {
  margin-bottom: 0;
  color: #405961;
  font-size: 12px;
  vertical-align: middle;
}

.analysis-table thead th {
  padding: 14px 15px;
  color: #657b83;
  border-bottom: 1px solid #e4edef;
  background: #f7fafb;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.analysis-table tbody td {
  padding: 14px 15px;
  border-bottom: 1px solid #edf2f3;
}

.analysis-table tbody tr:last-child td {
  border-bottom: 0;
}

.analysis-table tbody tr:hover td {
  background: #f9fcfc;
}

.analysis-table td:first-child {
  color: #27444c;
  font-weight: 700;
}

.type-badge {
  display: inline-block;
  padding: 5px 9px;
  color: #286d82;
  border: 1px solid #d8ebef;
  border-radius: 7px;
  background: #eef8fa;
  font-size: 10px;
  font-weight: 800;
}

.missing-badge {
  display: inline-block;
  min-width: 28px;
  padding: 4px 7px;
  color: #9b5b2e;
  border-radius: 7px;
  background: #fff3e7;
  font-size: 10px;
  font-weight: 800;
}

.preview-label {
  padding: 7px 10px;
  color: #617a82;
  border: 1px solid #e1ebed;
  border-radius: 8px;
  background: #f7fafb;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.preview-note {
  margin-top: 12px;
  color: #84949a;
  font-size: 10px;
}

/* ---------- Statistical test controls ---------- */

.analysis-page .form-label {
  margin-bottom: 8px;
  color: #405961;
  font-size: 11px;
  font-weight: 800;
}

.analysis-page .form-select {
  min-height: 46px;
  padding: 11px 38px 11px 13px;
  color: #29464e;
  border: 1px solid #dce7e9;
  border-radius: 12px;
  background-color: #fff;
  font-size: 12px;
  box-shadow: none;
}

.analysis-page .form-select:focus {
  border-color: #54b9bc;
  box-shadow: 0 0 0 4px rgba(37, 166, 161, 0.12);
}

.analysis-page .form-select:disabled {
  color: #93a2a7;
  background-color: #f5f8f9;
  cursor: not-allowed;
}

.analysis-notice {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 14px 16px;
  color: #426d7a;
  border: 1px solid #d8eaf0;
  border-radius: 13px;
  background: #f2f9fc;
  font-size: 11px;
  line-height: 1.8;
}

.analysis-notice > i {
  margin-top: 2px;
  color: #1a7d9c;
  font-size: 16px;
}

.test-results {
  padding: 22px;
  border: 1px solid #dcebed;
  border-radius: 16px;
  background: #f8fcfc;
}

.test-results h3 {
  margin-bottom: 15px;
  color: #27444c;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 17px;
  font-weight: 800;
}

/* ---------- Return link and footer ---------- */

.analysis-back-link {
  margin-top: 28px;
  text-align: center;
}

.analysis-back-link a {
  color: #617a82;
  font-size: 12px;
  font-weight: 700;
}

.analysis-back-link a:hover {
  color: #1a7d9c;
}


/* ---------- Responsive layout ---------- */

@media (max-width: 767.98px) {
  .analysis-main {
    padding-top: 110px;
  }

  .analysis-heading {
    margin-bottom: 25px;
  }

  .workspace-card {
    padding: 22px;
    border-radius: 19px;
  }

  .results-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .summary-card {
    min-height: 135px;
    padding: 17px;
  }

  .summary-card h3 {
    font-size: 24px;
  }

  .upload-dropzone {
    min-height: 235px;
    padding: 25px 15px;
  }
}

@media (max-width: 575.98px) {
  .analysis-main {
    padding: 102px 0 40px;
  }

  .analysis-heading h1 {
    font-size: 33px;
  }

  .analysis-heading p {
    font-size: 12px;
  }

  .workspace-card {
    padding: 18px;
  }

  .workspace-card-heading h2 {
    font-size: 16px;
  }

  .workspace-card-heading p {
    font-size: 10px;
  }

  .workspace-icon {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    font-size: 19px;
  }

  .upload-actions {
    flex-direction: column;
  }

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

  .analysis-table {
    font-size: 11px;
  }

  .analysis-table thead th,
  .analysis-table tbody td {
    padding: 12px 10px;
  }

  .preview-label {
    font-size: 9px;
  }

  .analysis-notice {
    padding: 12px;
  }

  .test-results {
    padding: 16px;
  }
}

/* Keep the Statistical Analysis footer identical to Home */

.analysis-page .site-footer {
  margin-top: 0;
  padding: 64px 0 0;
  background: #103f4e;
  color: #e5eff1;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.analysis-page .site-footer .footer-heading {
  color: #fff;
}

.analysis-page .site-footer .footer-description,
.analysis-page .site-footer .footer-info-text,
.analysis-page .site-footer .footer-links a {
  color: #bfd1d6;
}

.analysis-page .site-footer .footer-disclaimer {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(213, 235, 239, 0.13);
}

.analysis-page .site-footer .footer-disclaimer p {
  color: #bfd1d6;
}

.analysis-page .site-footer .footer-bottom {
  border-top-color: rgba(213, 235, 239, 0.12);
}

.analysis-page .site-footer .footer-copyright {
  color: #a9c2c8;
}

@media (max-width: 575.98px) {
  .analysis-page .site-footer {
    padding-top: 36px;
  }
}
