/* ========================================= */
/* RADIOTHERAPY CLINICAL TRIALS PLATFORM */
/* THEME SYSTEM */
/* ========================================= */


/* ========================= */
/* LIGHT MODE (DEFAULT) */
/* ========================= */

:root {

  /* NHS Core */
  --nhs-blue: #005eb8;
  --nhs-green: #007f3b;
  --nhs-red: #d5281b;

  /* Page Backgrounds */
  --bg-page: #ffffff;
  --bg-section: #f4f8fb;
  --bg-card: #ffffff;
  --bg-header: var(--nhs-blue);
  --bg-nav: var(--nhs-blue);

  /* Text */
  --text-primary: #1d1d1d;
  --text-secondary: #4a4a4a;
  --text-inverse: #ffffff;

  /* Borders */
  --border-light: #e1e1e1;

  /* Buttons */
  --btn-primary-bg: var(--nhs-blue);
  --btn-primary-text: #ffffff;
  --btn-accent-bg: var(--nhs-green);

  /* Map & Table */
  --accent-border: var(--nhs-blue);
  --section-heading: var(--nhs-blue);

  /* Table rows */
  --table-row-bg: #ffffff;
  --table-row-alt: #f5f8fb;
  --table-row-hover: #e9eef3;

  /* Effects */
  --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.08);
  --radius: 8px;
  --transition: 0.25s ease;
}


/* ========================= */
/* DARK MODE */
/* ========================= */

[data-theme="dark"] {

  /* Core NHS */
  --nhs-blue: #163c6b;
  --nhs-green: #1f8a4c;

  /* Page Backgrounds */
  --bg-page: #a0a0a0;
  --bg-section: #132b47;
  --bg-card: #163c6b;
  --bg-header: #0d2e55;

  /* Text */
  --text-primary: #f1f1f1;
  --text-secondary: #cfcfcf;
  --text-inverse: #ffffff;

  /* Borders */
  --border-light: rgba(255,255,255,0.1);

  /* Buttons */
  --btn-primary-bg: #1f6fd2;
  --btn-primary-text: #ffffff;
  --btn-accent-bg: var(--nhs-green);

  /* Map & Table */
  --accent-border: #1f6fd2;
  --section-heading: #ffffff;

  /* Table rows */
  --table-row-bg: #163c6b;
  --table-row-alt: #1a4478;
  --table-row-hover: #2f5f9c;

  /* Effects */
  --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.5);
}


/* =====================================
   DARK MODE – Match Background
===================================== */

html[data-theme="dark"] .display-study-image {
  background: var(--bg-page);
}


/* ========================= */
/* GLOBAL APPLICATION */
/* ========================= */

body {
  background: var(--bg-page);
  color: var(--text-primary);
  transition:
    background var(--transition),
    color var(--transition);
}

header {
  background: var(--bg-header);
  color: var(--text-inverse);
}

.nhs-nav {
  background: var(--bg-nav);
}


/* ========================= */
/* GENERIC CARDS */
/* ========================= */

.card,
.study-card,
.dashboard-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-soft);
  border-radius: var(--radius);
  transition:
    background var(--transition),
    border var(--transition);
}


/* ========================= */
/* ADMIN FORM SAFETY */
/* ========================= */

input,
textarea,
select {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--nhs-blue);
}


/* ========================= */
/* GENERIC TABLE BASE */
/* ========================= */

table {
  background: var(--bg-card);
  color: var(--text-primary);
  border-collapse: collapse;
}

th,
td {
  border: 1px solid var(--border-light);
  padding: 8px;
}

tbody tr {
  background: var(--table-row-bg);
}

tbody tr:nth-child(even) {
  background: var(--table-row-alt);
}

tbody tr:hover {
  background: var(--table-row-hover);
}


/* ======================================
   DARK MODE – ACTIVE BUTTON FIX
====================================== */

html[data-theme="dark"] .button-background.button-active {
  outline: 3px solid #5fb3ff;
  box-shadow: 0 0 12px rgba(95,179,255,0.6);
}


/* ========================= */
/* INDICATION ICON CELL */
/* ========================= */

.indication-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
}

.indication-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  padding: 8px;
  border-radius: 10px;
}

html[data-theme="light"] .indication-icon {
  background: #f4f6f8;
}

html[data-theme="dark"] .indication-icon {
  background: var(--bg-page);
}

/* =========================================
   SUBMIT STUDY INFO PAGE
========================================= */

.submit-info-container {
  max-width: 1000px;
  margin: 40px auto;
  padding: 0 20px;
}

/* Card wrapper */

.submit-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-soft);
  border-radius: var(--radius);
  padding: 40px;
}

/* Headings */

.submit-info-card h1 {
  margin-bottom: 20px;
  color: var(--section-heading);
}

.submit-info-card h2 {
  margin-top: 30px;
  margin-bottom: 10px;
  color: var(--section-heading);
}

/* Text */

.submit-info-card p {
  line-height: 1.6;
  margin-bottom: 16px;
}

.submit-info-card ul {
  margin-left: 20px;
  margin-bottom: 20px;
}

.submit-info-card li {
  margin-bottom: 6px;
}

/* Button */

.submit-study-btn {
  display: inline-block;
  margin-top: 25px;
  padding: 12px 24px;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.submit-study-btn:hover {
  opacity: 0.9;
}

.editor-placeholder{
    color:#999;
}

.study-image-hidden {
    display: none;
}

.video-empty-state {
    text-align: center;
    opacity: 0.7;
}