/* styles.css */

/* General body styling */
body {
    font-family: Arial, sans-serif;
    background: url('Helix3.jpeg') no-repeat center center fixed;
    background-size: cover;
    margin: 0;
    padding: 0;
    color: #333;
}

/* Navigation bar */
.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 10px 20px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    color: white;
}

/* Nav-left styling */
.nav-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.nav-left h2 {
    margin: 0;
    color: white;
}

/* Tiny logo next to the dashboard title */
.tiny-logo {
    height: 30px;
    width: auto;
    object-fit: contain;
}

/* Nav-right styling */
.nav-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
}
.nav-right a,
.nav-right .dropbtn {
    color: white;
    text-decoration: none;
    padding: 10px 20px; 
    background-color: #2889a7;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    font-size: 16px;
}
.same-size-btn {
    min-width: 140px;
    text-align: center;
    margin: 0 5px;
}
.nav-right a:hover,
.nav-right .dropbtn:hover {
    background-color: #0056b3;
}

/* Dropdown styling */
.dropdown {
    position: relative;
}
.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    z-index: 1000;
}
.dropdown-content a {
    color: white;
    padding: 10px 15px;
    text-decoration: none;
    display: block;
}
.dropdown-content a:hover {
    background-color: #f1f1f1;
}
.dropdown:hover .dropdown-content {
    display: block;
}

/* Box styling for top/bottom sections */
.top-box,
.bottom-box {
    background-color: rgba(255, 255, 255, 0.95);
    margin: 80px auto 20px auto;
    width: 90%;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    color: black;
    position: relative;
}
.bottom-box {
    margin-top: 0; /* We rely on .background-gap for spacing */
}

/* Analysis Box (Medication Safety & Gap Analysis) */
.analysis-box {
    background-color: rgba(255, 255, 255, 0.95);
    margin: 20px auto;
    width: 90%;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    color: black;
    position: relative;
}

/* Gap for background */
.background-gap {
    height: 40px;
}

/* Demo form styling */
.demo-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

/* 
   1) The top box (alternatives-table) => no wrap
   2) The middle box (#patientsTable) => no wrap
   3) The bottom box (#analysisTable) => wrap text
*/

/* 1) Top "Recommended Drug Alternatives" table */
.alternatives-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    border: 1px solid #ddd;
}
.alternatives-table th,
.alternatives-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
    /* no wrap */
    white-space: nowrap;
}

/* 2) Middle "patientsTable" => no wrap */
#patientsTable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    border: 1px solid #ddd;
}
#patientsTable th,
#patientsTable td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
    /* no wrap */
    white-space: nowrap;
}

/* 3) Bottom "analysisTable" => wrap text by default */
#analysisTable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    border: 1px solid #ddd;
    table-layout: auto;
}
#analysisTable th,
#analysisTable td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
    /* wrap by default */
    white-space: normal;
    word-wrap: break-word;
}

/* 
   OVERRIDE for columns 3, 4, and 5 in the analysis table
   to keep "DAYS:30" or "NDC:123" on one line and 
   give them a bit more width.
*/
#analysisTable th:nth-child(3),
#analysisTable td:nth-child(3),
#analysisTable th:nth-child(4),
#analysisTable td:nth-child(4),
#analysisTable th:nth-child(5),
#analysisTable td:nth-child(5) {
    white-space: nowrap;      /* prevent line breaks */
    min-width: 160px;         /* extra width for single-line content */
}

/* The bottom box table with horizontal scroll (if needed) */
.table-container {
    margin-top: 10px;
    width: 100%;
    overflow-x: scroll; 
    border: 1px solid #ddd;
    padding-bottom: 10px;
}

/* Optional custom scrollbar */
.table-container::-webkit-scrollbar {
    height: 12px;
    background: #ccc;
}
.table-container::-webkit-scrollbar-thumb {
    background-color: #888;
    border-radius: 6px;
}

/* HEADERS: .dark-header => shorter row height */
.dark-header {
    background-color: #333;
    color: #fff;
    font-weight: bold;
    text-align: left;
    /* ~ 40% less thick than 48px */
    height: 28px;
    line-height: 28px;
}
.white-subheader {
    background-color: #fff;
    color: #000;
    font-weight: bold;
}

/* Buttons */
.btn.danger-btn {
    background-color: rgb(204, 0, 126);
    color: #fff;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
}
.btn.danger-btn:hover {
    background-color: #a00;
}

.btn.green-btn {
    background-color: #2889a7;
    color: #fff;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
    font-size: 16px;
}
.btn.green-btn:hover {
    background-color: #0056b3;
}

.button-container {
    margin-top: 15px;
}

.table-scroll-container {
    max-height: 300px; 
    overflow-y: auto;  
    position: relative;
}
.table-scroll-container thead th {
    position: sticky;
    top: 0;
    background-color: #555; 
    z-index: 2;        
}

/* DNA Spiral Loader */
.dna-loader {
    display: inline-block;
    position: relative;
    width: 64px;
    height: 64px;
}
.dna-loader div {
    transform-origin: 32px 32px;
    animation: dnaSpiral 1.2s linear infinite;
    position: absolute;
}
.dna-loader div:after {
    content: " ";
    display: block;
    position: absolute;
    top: 3px;
    left: 29px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #2889a7;
}
.dna-loader div:nth-child(1) {
  transform: rotate(0deg);
  animation-delay: -1.1s;
}
.dna-loader div:nth-child(2) {
  transform: rotate(45deg);
  animation-delay: -1.0s;
}
.dna-loader div:nth-child(3) {
  transform: rotate(90deg);
  animation-delay: -0.9s;
}
.dna-loader div:nth-child(4) {
  transform: rotate(135deg);
  animation-delay: -0.8s;
}
.dna-loader div:nth-child(5) {
  transform: rotate(180deg);
  animation-delay: -0.7s;
}
.dna-loader div:nth-child(6) {
  transform: rotate(225deg);
  animation-delay: -0.6s;
}
.dna-loader div:nth-child(7) {
  transform: rotate(270deg);
  animation-delay: -0.5s;
}
.dna-loader div:nth-child(8) {
  transform: rotate(315deg);
  animation-delay: -0.4s;
}

@keyframes dnaSpiral {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.care-gap-type {
    /* Background image fills the cell */
    background: url("/HelixCareGaps.jpg") no-repeat center center;
    background-size: cover; 
   
    /* Font/color details */
    color: #000; 
    font-weight: bold;       /* optional */
    text-align: center;      /* if you want horizontal centering */
  
    /* Ensures the cell has some height for the image: */
    min-height: 50px;
  
    /* Key property to push text to bottom in a table cell: */
    vertical-align: bottom;
    
  }
  
  .poly-pharmacy-type {
    /* Background image fills the cell */
    background: url("/HelixPolyPharmacy3.jpg") no-repeat center center;
    background-size: cover; 
   
    /* Font/color details */
    color: #000; 
    font-weight: bold;       /* optional */
    text-align: center;      /* if you want horizontal centering */
  
    /* Ensures the cell has some height for the image: */
    min-height: 50px;
  
    /* Key property to push text to bottom in a table cell: */
    vertical-align: bottom;
    
  }