/* 
* -----------------------------------------------------------------------------------
* Stylesheet for Vanilla Timeline Demo Pages
* ----------------------------------------------------------------------------------- 
*/

/* Load Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Delius&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

body { 
    background-color: white;
    color: black;
    font-size: 16px;
    font-family: "Roboto", Arial, Helvetica, sans-serif; 
    padding: 10px;
    margin: 0;
}

/* javascript disabled warning */
.noscript {
  padding: 8px 16px; 
  background: #fff3cd; 
  border: 2px solid black;
  border-radius: 24px; 
  margin-bottom: 50px;
}

/* hide content */
.hidethis {
  display: none;
  opacity: 0;
}

/* center content */
.center {
  text-align: center;
}

/* bold text */
.bold {
  font-weight: bold;
}

/* subtle text */
.graytext {
  color: gray;
}

/* subtle link */
.graylink {
  color: #3f3f3f;
  font-weight: bold;
  text-decoration: none;
}

/* monospaced font */
.mono {
  font-family: monospace;
}

/* spacing utilities */
.space-left {
  margin-left: 10px;
}
.space-right {
  margin-right: 10px;
}
.space-top {
  margin-top: 10px;
}
.space-bottom {
  margin-bottom: 10px;
}

.lighttext {
  opacity: 0.5;
}

/* --------------------------------- Google Fonts --------------------------------- */
.delius {
  font-family: "Delius", cursive;
  font-weight: 400;
  font-style: normal;
}

.roboto {
  font-family: "Roboto", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-variation-settings:
    "wdth" 100;
}

/* ----------------------------- Main Logo and Heading ---------------------------- */

/* flexbox which contains logo and title */
.fbox {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0;
  margin-bottom: 30px;
}

/* vanilla flower image */
.demo-index-logo img {
  margin: 0;
  padding: 0;
}

/* main heading */
.demo-index-head h1 {
  font-family: "Delius";
  font-size: 42px;
  line-height: 42px;
}

/* ------------------------------- Demo page header  --------------------------- */

.demo-page-head {
  width: 85%;
  margin: 25px 0 25px 0;
}

.demo-h1 {
  text-align: center; 
  margin: 25px 0 80px 0;
}

/* ------------------------------- Demo page elements --------------------------- */

/* content wrapper */
.wrapper { 
  max-width: 1800px;
  margin: 0 auto; 
}

.demo-cdn-link-wrapper {
  border: 2px solid black; 
  border-radius: 24px; 
  padding: 0 0 10px 10px; 
  width: 100%;
}

.demo-cdn-link-head {
  margin-bottom: 5px;
}

.demo-cdn-link-input {
  width: 95%; 
  font-size: 16px; 
  padding: 8px 10px;
  border-radius: 6px;
  background-color: #e1e1e1;
}

.textcontainer {
  margin: 0 auto;
  padding: 20px;
  width: 65vw;
  max-width: 1500px;
  min-width: 400px;
}

.mainhead {
  font-size: 42px;
  margin-bottom: 20px;
}

.timeline-section {
  background: #fff;
  padding: 20px;
  margin: 30px 0 60px 0;
  border: 3px solid black;
  border-radius: 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.multitext {
  color: white;
}

/* dark background color */
.darkmode {
  background-color: rgb(50, 53, 53);
}

.lightlink {
  color: white;
  font-weight: bold;
  color: gold;
}

.demo-section {
  margin: 60px 0;
}

.demo-section h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0 0 20px;
  color: #333;
}

.demo-section p {
  font-size: 1rem;
  line-height: 1.6;
  color: #666;
  margin: 0 0 30px;
}

.demo-live-example {
  margin: 0 auto 25px auto; 
  padding: 20px; 
  width: 80%;
  border: 2px solid black; 
  border-radius: 36px;
}

.demo-live-example-left {
  padding: 20px; 
  width: 80%;
  border: 2px solid black; 
  border-radius: 36px;
}

.code-block {
  background-color: #f4f4f4;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 15px;
  margin: 20px 0;
  overflow-x: auto;
  font-size: 0.9rem;
  font-family: 'Courier New', monospace;
  line-height: 1.5;
}

.time-datestring {
  text-align: center;
  background-color: azure;
  margin: 25px auto 25px auto;
  font-size: 18px;
  padding: 12px 15px;
  font-family: monospace;
  width: 80%;
  min-width: 400px;
  max-width: 600px;
}

.time-btn {
  margin-left: 2px; 
  border-radius: 0 !important; 
  padding: 12px 16px !important; 
  font-size: 18px !important;
}

.time-list {
  margin: 30px 0;
}

.time-list li {
  margin-top: 10px;
}

/* --------------------------------- Table styling ------------------------------ */

table {
  width:100%; 
  border-spacing: 0;
  border: 2px solid black; 
  padding: 10px; 
  text-align: left;
  margin-bottom: 25px;
}

thead {
  font-size: 18px;
  background-color: #e1e1e1;
}

/* table cells: remove large global min-width and size columns explicitly */
th, td {
  padding: 5px 10px;
  font-family: monospace;
  border: 1px solid rgb(160 160 160);
  vertical-align: top;
}

/* First column (Data Attribute) gets a comfortable minimum width */
th:first-child {
  min-width: 220px;
  width: 20%;
  vertical-align: middle;
}

td:first-child {
  vertical-align: middle;
}

/* Type column: keep compact and prevent wrapping */
th:nth-child(2), td:nth-child(2) {
  width: 120px;
  max-width: 160px;
  white-space: nowrap;
  vertical-align: middle;
  text-align: center;
}

/* Default column: keep compact and prevent wrapping */
th:nth-child(3), td:nth-child(3) {
  width: 110px;
  max-width: 140px;
  white-space: nowrap;
  vertical-align: middle;
  text-align: center;
}

/* Description column: allow to grow and wrap as needed */
th:nth-child(4), td:nth-child(4) {
  width: auto;
  white-space: normal;
}

.greentext {
  color: #114211;
}

.redtext {
  color: #700a0a;
}

/* center em-dashes */
/* removed .mdash in favor of column-wide centering */

/* ------------------------------- Demo page footers  --------------------------- */

.btn-footer {
  opacity: 1.0;
  margin-top: 90px;
  margin-bottom: 100px;
}

footer {
  margin-top: 300px;
  text-align: center;
  font-size: 12px;
  font-family: monospace;
  color: #3a3a3a;
  opacity: 0.6;
}

footer a:link {
  text-decoration: none;
}

/* ------------------------------- Alert messages ------------------------------- */

/* top div where alerts appear */
.topnotice {
  width: 97%;
  text-align: center;
  margin-bottom: 50px;
}

.alert {
  font-size: 12px;
  color: white;
  background-color: #f44336; 
  padding: 8px 15px;
  width: 98%;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  visibility: hidden;
}

.alerttxt {
  flex-grow: 1;
}

.closebtn {
  margin-left: 15px;
  color: white;
  font-weight: bold;
  float: right;
  font-size: 22px;
  line-height: 20px;
  cursor: pointer;
  transition: 0.3s;
}
.closebtn:hover {
  color: black;
  transform: scale(1.2);
}

/* ------------------------------- Instructions component --------------------------- */

/* div for instructions accordion menu */
#instructions {
  margin-top: 30px;
}

.step {
  margin-top: 30px;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: left;
  align-items: flex-start;
  gap: 10px;
}

.steptext {
  font-size: 30px;
  display: flex;
  align-items: center;
  min-height: 50px;
}

/* container that holds the step text and code vertically */
.stepcontent {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.scriptwrapper {
  margin-top: 0;
  padding: 20px;
  border: 2px solid black;
  border-radius: 8px;
}

/* ------------------------------- Accordion menus ------------------------------- */

.accordion {
  background-color: #dff5fc;
  color: #444;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  padding: 18px;
  width: 100%;
  text-align: left;
  border: none;
  outline: none;
  transition: 0.4s;
}

.accordion:after {
  content: '\25BC'; /* down-triangle */
  font-size: 18px;
  color: #444;
  float: right;
  margin-left: 5px;
}

.accordion.accordion--active, .accordion:hover {
  background-color: #a8ebff;
}

.accordion.accordion--active:after {
  content: '\25B2'; /* up-triangle */
}

.accordion + .panel {
  padding: 0 18px;
  background-color: white;
  display: none;
  overflow: hidden;
}

/* ----------------------- Bootstrap style outline buttons --------------------- */

.btn {
  border: 2px solid black;
  border-radius: 8px;
  background-color: white;
  color: black;
  padding: 10px 22px;
  font-size: 16px;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  min-width: 140px;
  text-align: center;
}

/* green */
.success {
  border-color: #04AA6D;
  color: green;
}
.success:hover {
  background-color: #04AA6D;
  color: white;
}

/* blue */
.info {
  border-color: #2196F3;
  color: dodgerblue
}
.info:hover {
  background: #2196F3;
  color: white;
}

/* orange */
.warning {
  border-color: #ff9800;
  color: orange;
}
.warning:hover {
  background: #ff9800;
  color: white;
}

/* red */
.danger {
  border-color: #f44336;
  color: red
}
.danger:hover {
  background: #f44336;
  color: white;
}

/* gray */
.secondary {
  border-color: #6C757D;
  color: #6C757D;
}
.secondary:hover {
  background: #e9ecef;
  color: black;
}

/* ----------------------- Bootstrap style cards ----------------------- */

/* meta layout for all the cards */
.cardlayout {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 30px;
  width: 80%;
  margin: 0 auto;
}

.card {
  width: 330px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
  transition: 0.3s;
  border: 1px solid black;
  border-radius: 24px;
}

.card:hover {
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0);
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  text-align: center;
  padding: 10px 25px;
}

.card-body h3 {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 12px;
}

.card-body img {
  margin: 0 auto;
}

.btn-wrapper {
  margin-top: auto;
  padding-top: 15px;
  text-align: center; 
}

/* used on Advanced Javascript text */
.txtwarning {
  font-family: monospace;
  color: red;
}

code .hljs-id-attr {
  font-weight: 700;
  color: inherit;
  background: transparent;
}

.dl-list {
  margin-bottom: 10px;
  font-size: 18px;
  font-family: monospace;
}



/* --------------------------------- Tooltips --------------------------------- */

.tooltip {
  position: relative;
  display: inline-block;
  border-bottom: 1px dotted black;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 350px;
  background-color: black;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 7px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -60px;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 14px;
}

.tooltip .tooltiptext::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: black transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

/* --------------------------------- Media Queries ------------------------------ */ 

@media (min-width: 850px) {
  /* Demo Index page: stack logo and heading on small screens */
  .fbox {
    gap: 25px;
  }
}

@media (min-width: 992px) {
  .demo-cdn-link-wrapper {
    width: 75%;
    padding: 0 0 20px 20px; 
  }
  .demo-cdn-link-input {
    width: 85%;
  }
}

/* --------------------------------- Animations --------------------------------- */ 

/* fade-in animation */
.fade-in {
  display: block; /* make sure element is visible */
  animation: fadeIn 360ms ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}