/* styles.css */

.reveal table {
  border-collapse: collapse;
  border: 1px solid black; /* adds border around entire table */
}

.reveal th,
.reveal td {
  border: 1px solid black;
  padding: 6px;
  text-align: center;
}

.reveal thead tr th {
  border-bottom: 2px solid black; /* stronger bottom border on header */
}

.reveal tbody tr:last-child td {
  border-bottom: 1px solid black; /* ensure bottom border on last row */
}s

/* 1. Container for each code block: This wrapper will hold the <pre>, button, and feedback.
      It's crucial for positioning the button/feedback relative to the code block. */
.code-block-container {
  position: relative; /* Establishes a positioning context for absolute children */
  margin-bottom: 1em; /* Space between code blocks */
  background-color: #f8f8f8; /* Light background for the code block area */
  border: 1px solid #ddd; /* Subtle border */
  border-radius: 5px; /* Rounded corners */
  overflow: hidden; /* Ensures content doesn't spill out, good for rounded corners */
}


/* 3. Style for the feedback message (e.g., "Copied!") */
.feedback-message {
  position: absolute; /* Positioned relative to .code-block-container */
  top: 0.5em;    /* Align with button */
  right: 5.5em;  /* Position to the left of the button (adjust as needed) */
  background-color: rgba(0, 0, 0, 0.7); /* Semi-transparent black background */
  color: white;
  padding: 0.3em 0.6em;
  border-radius: 4px;
  font-size: 0.8em;
  opacity: 0;   /* Initially hidden */
  transition: opacity 0.4s ease-in-out; /* Smooth fade in/out */
  pointer-events: none; /* Allows clicks to pass through to elements behind it */
  z-index: 9;         /* Below the button */
  white-space: nowrap; /* Prevent feedback message from wrapping */
}

/* 4. Style for the <pre> (preformatted text) element itself */
/* Targeting pre inside .sourceCode, which Quarto often wraps code blocks in */
.sourceCode pre {
  white-space: pre-wrap !important; /* CRITICAL: Auto text wrap */
  word-wrap: break-word !important; /* Breaks long words if necessary */
  overflow-x: auto; /* Adds horizontal scrollbar if content cannot wrap */
  padding: 1.5em; /* General padding for content */
  padding-top: 2.5em; /* Extra padding at the top to make space for button/feedback */
  box-sizing: border-box; /* Include padding in the element's total width/height */
  margin: 0; /* Remove default margin from <pre> */
  height: auto !important; /* Ensure height adjusts to content */
  min-height: 0 !important; /* Ensure no minimum height is forcing it */
}

/* Ensure the code content itself also wraps */
.sourceCode code {
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
    display: block; /* Treat <code> as a block to help with wrapping */
}


/* Optional: Basic styling for the entire page for better presentation */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 20px;
    background-color: #f4f4f4;
    color: #333;
}

h1, h2, h3 {
    color: #0056b3;
    text-align: center;
}

/* Features */

/* Feature Grid Styling */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  padding: 2rem;
}

.feature-box {
  background-color: #f8f9fa;
  border-radius: 1rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  padding: 2rem;
  text-align: center;
  transition: transform 0.2s ease;
}

.feature-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.feature-box i {
  color: #007bff;
  margin-bottom: 1rem;
}

.feature-box h3 {
  margin-top: 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.feature-box p {
  margin: 0.3rem 0;
  color: #555;
}

/* Slider Styling */
.slider {
  max-width: 600px;
  margin: 2rem auto;
  position: relative;
  text-align: center;
}

.slides {
  display: flex;
  overflow: hidden;
  width: 100%;
  height: 250px;
  border-radius: 1rem;
  transition: transform 0.5s ease-in-out;
}

.slide {
  flex: 1 0 100%;
  padding: 2rem;
  background-color: #f0f8ff;
  text-align: center;
}

.slide i {
  color: #1f78d1;
  margin-bottom: 1rem;
}

.slider input[type="radio"] {
  display: none;
}

#slide1:checked ~ .slides { transform: translateX(0); }
#slide2:checked ~ .slides { transform: translateX(-100%); }
#slide3:checked ~ .slides { transform: translateX(-200%); }

.slider-nav {
  margin-top: 1rem;
}

.slider-nav label {
  display: inline-block;
  width: 12px;
  height: 12px;
  background-color: #ccc;
  border-radius: 50%;
  margin: 0 5px;
  cursor: pointer;
}

.slider-nav label:hover,
#slide1:checked ~ .slider-nav label[for="slide1"],
#slide2:checked ~ .slider-nav label[for="slide2"],
#slide3:checked ~ .slider-nav label[for="slide3"] {
  background-color: #007bff;
}

.glider-container {
  max-width: 700px;
  margin: 2rem auto;
  position: relative;
  text-align: center;
}

.glide-item {
  padding: 2rem;
  text-align: center;
  background: #f0f8ff;
  border-radius: 1rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.glider-prev, .glider-next {
  background: #007bff;
  border: none;
  color: white;
  font-size: 1.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
}

.glider-prev { left: -40px; }
.glider-next { right: -40px; }

.dots {
  margin-top: 1rem;
}
