/* Reset */
body, h1, h2, p {
  margin: 0;
  padding: 0;
}

body {
  /* font-family: "Verdana", sans-serif; */
  /* font-family: "Tiro Devanagari Sanskrit", serif; */
  font-family: "PT Serif", serif;
  font-weight: 400;
  font-style: normal;
  background: #fdfdfd;
  color: #333;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header {
  text-align: center;
  padding: 15px;
  border-bottom: 1px solid #ccc;
  background-color: bisque;
}

header h1 {
  margin-bottom: 10px;
  font-size: 2em;
}

nav a {
  margin: 0 12px;
  text-decoration: none;
  color: black;
  font-weight: bold;
}

nav a:hover {
  text-decoration: underline;
}

main {
  flex: 1;
  padding: 20px;
  text-align: center;

  max-width: 800px;   
  margin: 0 auto;     
  width: 100%;
  box-sizing: border-box;        
}

div.match-content {
  position: relative;
}

p.map_toggle_msg {
  margin-bottom: 10px;
}

.td_sans {
  width:50%;
  border: 1px solid #ccc;
  text-align:center;
  vertical-align:top;
  padding: 10px 0px 20px 0px;
}

.td_trans {
  border: 1px solid #ccc;
  text-align:justified;
  padding:5px;
}

span.map_toggle_msg_btn {
    text-align: center;
    background-color: #A0F0A0;
    /* Apply the animation */
    /* animation: retro-color-cycle 5s linear infinite;
    /* transition: background-color 0.5s ease-in-out; /* Smooth transition */
}

/* Define the color cycling animation */
@keyframes retro-color-cycle {
    0%   { background-color: #5bb8f7; } /* Magenta */
    25%  { background-color: #3eb83e; } /* Cyan */
    50%  { background-color: #ce8740; } /* Yellow */
    75%  { background-color: #ee5aa4; } /* Green */
    100% { background-color: #f88659; } /* Back to Magenta */
}

.chapter-nav {
    /* Existing styles */
    text-align: center;
    margin: 30px 0 0 0;
    font-size: 0.95em;
    background-color: bisque;
    padding: 20px 0;

    /* New styles for all screens */
    display: flex;
    justify-content: center; /* Horizontally centers the buttons */
    align-items: center; /* Vertically centers the buttons */
    flex-wrap: nowrap; /* Prevents wrapping on large screens */
    gap: 15px; /* Adds space between the buttons */
}

span.v_sans {
  transition: background-color 0.5s ease-in-out;
}
/* Media query for smaller screens */
@media (max-width: 600px) {
    .chapter-nav {
        flex-wrap: wrap; /* Allows buttons to wrap to a new line */
        justify-content: center; /* Distributes items with space around them */
    }
}

@media (min-width: 280px) and (max-width: 380px) { 
  span.v_sans {
    font-size: 12px;  
  }

  p.verse_id {
    font-size: 12px;  
  }

  p.dutt_trans {
    font-size: 12px;  
  }
}

.chapter-nav a {
    margin: 0 8px;
    text-decoration: none;
    color: #333;
    
}

.chapter-nav a:hover {
    text-decoration: underline;
}

.chapter-nav .disabled {
    color: #999;
    pointer-events: none;
    text-decoration: none;
}

footer {
  text-align: center;
  padding: 10px;
  border-top: 1px solid #ccc;
  background: #fafafa;
}

.v_sans {
  font-family: "Tiro Devanagari Sanskrit", serif;
  font-weight: 400;
  font-style: normal;
}

.tiro-devanagari-sanskrit-regular-italic {
  font-family: "Tiro Devanagari Sanskrit", serif;
  font-weight: 400;
  font-style: italic;
}

/* Scroll buttons container */
#scroll-buttons {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  z-index: 999;
}

/* Scroll buttons styling */
#scroll-buttons button {
  background-color: bisque;
  color: black;
  border: none;
  width: 40px;
  height: 40px;
  font-size: 20px;
  cursor: pointer;

  opacity: 0;               /* start hidden */
  pointer-events: none;     /* not clickable when hidden */
  transition: opacity 0.3s ease, transform 0.2s ease;
}

/* Fade in when visible */
#scroll-buttons button.visible {
  opacity: 0.9;             /* almost full */
  pointer-events: auto;     /* clickable */
}

#scroll-buttons button.mp_visible {
  background-color: #A0F0A0;
}
  
/* New class for the button's 'off' state */
#scroll-buttons button.btn-toggle-off {
  background-color: bisque;
}

.hide-color {
  background-color: transparent !important;
}

/* #scroll-buttons button:hover { */
  /* opacity: 1; */
  /* transform: scale(1.1); */
/* } */