/* public/css/styles.css — Clinical Slate & Emerald theme */

body {
    font-family: 'Inter', sans-serif;
}

/* Multi-select */
select[multiple] {
    min-height: 120px;
}

/* Modal overlay */
#studyDetailModal {
    align-items: center;
    justify-content: center;
    position: fixed;
    inset: 0;
    z-index: 50;
    background-color: rgba(15, 23, 42, 0.45); /* slate-900/45 */
}

/* Contenuto scrollabile del modale */
.modal-content {
    overflow-y: auto;
    flex-grow: 1;
    padding: 1.25rem;
}

/* Toggle criteri */
.criteria-item .type-toggle-btn {
    transition: background-color 150ms, color 150ms;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Slider eleggibilità */
.criteria-toggle:checked + div {
    background-color: #10b981; /* emerald-500 */
}
.criteria-toggle:not(:checked) + div {
    background-color: #ef4444;
}
.criteria-toggle:checked + div.peer-checked\:after\:translate-x-full:after {
    transform: translateX(100%);
}
.criteria-toggle:not(:checked) + div.peer-checked\:after\:translate-x-full:after {
    transform: translateX(0);
}

/* ===== Slider SÌ / NO criteri ===== */
.criteria-switch {
  position: relative;
  width: 46px;
  height: 24px;
}
.criteria-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.criteria-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #cbd5e1; /* slate-300 */
  border-radius: 999px;
  transition: background-color 0.25s;
}
.criteria-slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  top: 3px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.25s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
}
/* stato SÌ — emerald */
.criteria-switch input:checked + .criteria-slider {
  background-color: #10b981;
}
.criteria-switch input:checked + .criteria-slider::before {
  transform: translateX(22px);
}

/* ===== Pulsanti primari ===== */
.btn-primary {
    background-color: #10b981;
    color: #fff;
    font-weight: 600;
    border-radius: 0.5rem;
    padding: 0.625rem 1.25rem;
    transition: background-color 0.15s;
}
.btn-primary:hover { background-color: #059669; }

/* ===== Card ===== */
.app-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.875rem;
    padding: 2rem;
    margin-bottom: 2rem;
}

/* ===== Badge codice studio ===== */
.study-code-badge {
    display: inline-block;
    background-color: #d1fae5;  /* emerald-100 */
    color: #065f46;             /* emerald-800 */
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 9999px;
    letter-spacing: 0.06em;
    vertical-align: middle;
    margin-right: 6px;
}

/* ===== Input focus ring ===== */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16,185,129,0.18);
}

/* ===== ClinicalTrials.gov filter pills ===== */
.ctgov-filter-pill {
    display: inline-block;
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    background: #f8fafc;
    color: #64748b;
    border-right: 1px solid #e2e8f0;
    transition: background 0.15s, color 0.15s;
    user-select: none;
    white-space: nowrap;
}
.ctgov-filter-pill:last-child { border-right: none; }
.ctgov-filter-pill:hover { background: #e2e8f0; }
.ctgov-filter-pill.active {
    background: #1a3a5c;
    color: #ffffff;
}

/* ===== CT.gov result card ===== */
.ctgov-card {
    background: #fff;
    border: 1.5px solid #bfdbfe;  /* blue-200 */
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    transition: box-shadow 0.2s, border-color 0.2s;
}
.ctgov-card:hover {
    box-shadow: 0 4px 24px rgba(26,58,92,0.10);
    border-color: #93c5fd;
}
.ctgov-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background-color: #1a3a5c;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 9999px;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}
.ctgov-note {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 0.6rem;
    padding: 8px 12px;
    font-size: 0.75rem;
    color: #92400e;
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin-top: 0.75rem;
}

/* ===== CT.gov checkbox pill ===== */
.ctgov-checkbox-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    user-select: none;
}
.ctgov-checkbox-pill:hover {
    background: #e2e8f0;
}
.ctgov-checkbox-pill.active {
    background: #eff6ff;
    color: #1e40af;
    border-color: #bfdbfe;
}

