
#fact-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.7); /* Darker slate */
    backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    z-index: 10000; transition: opacity 0.3s;
}

.fact-hidden { display: none !important; opacity: 0; }

.fact-card {
    position: absolute;
    top: 128px;
    background: white;
    width: 95%; max-width: 500px;
    margin-right: 4px;
    margin-left: 4px;
    
    border: 2px;
    border-color: #9b0215;
    border-style: solid;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    background-color: #dfdddd;
}

.fact-card .header {
    color: white;
}

.fact-card-content {
    margin: 8px;
}

#fact-body {
    font-size: 14px;
}

.fact-body-loader {
    display: flex;
    justify-content: center;
    align-items: center;
}

.fact-body-loader .loader {
  border: 10px solid #f3f3f3; /* Light grey background border */
  border-top: 10px solid #3498db; /* Blue spinning section */
  border-radius: 50%; /* Makes the div a circle */
  width: 20px;
  height: 20px;
  animation: spin 2s linear infinite; /* Animation properties */
  margin-top: 20px;
  margin-bottom: 20px;
}

.chart-wrapper {
    margin-top: 20px;
    display: none; /* Hidden by default */
    height: 250px; /* Only takes up space when display is block/flex */
    position: relative;
}

.fact-close {
    position: absolute; 
    top: 0px;
    right: 10px;
    background-color: #dfdddd;
    border: none; 
    border-radius: 50%;
    width: 32px; 
    height: 32px; 
    cursor: pointer; 

    display: flex;
    align-items: center;
    justify-content: center; 

    font-size: 14px;           /* Large but fits 32px circle */
    line-height: 0;            /* Strips baseline alignment */
    padding: 0;
}