/* General textarea styles */
textarea.copytext {
    border: none; /* Combine border-style and border-color */
    outline: none;
    resize: none;
    width: 100%;
    font-size: 18px;
    padding: 10px;
    background: transparent; /* Use transparent background */
    overflow: auto; /* Ensure scrollbars appear when needed */
}

/* Specific styling for the .code textarea */
textarea.copytext.code {
    max-height: 600px; /* Limit height to 600px */
    font-size: 16px; /* Override font size to 16px for .code class */
    font-family: Arial, sans-serif; /* Use Arial font, fallback to sans-serif */
}

/* Preformatted text block styling */
pre {
    clear: both; /* Ensure content doesn't overlap with floats */
}

/* Styling for code within preformatted text */
pre code {
    white-space: pre-wrap; /* Allow text to wrap inside <code> */
}


.remove-favourite::after {
    content: '❌';
    display: inline-block;
    font-size: 12px;
    float: right;
}

.favourites-container {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 100%;
  max-width: 100vw;
  transition: transform 0.3s ease;
  box-shadow: 0 -4px 8px rgba(0,0,0,0.1);
  z-index: 1050; /* above normal content */
}

/* Collapsed: only 50px of header visible (slide container mostly off screen) */
.favourites-container.collapsed {
  transform: translateY(calc(100% - 60px));
  cursor: pointer;
}

/* Expanded: container fully visible */
.favourites-container.expanded {
  transform: translateY(0);
  cursor: default;
}

/* Make header stand out as clickable */
.favourites-header {
  user-select: none;
  padding: 10px 15px;
  background-color: #007bff;
  font-weight: 600;
  border-top-left-radius: 0.25rem;
  border-top-right-radius: 0.25rem;
}

#favourites-header .handle-icon{
  line-height: 1rem;
}

/* Default: full width, no float */
.save-favourite,
#save-to-favourites {
  display: block;
  width: 100%;
  float: none;
  margin-bottom: 1rem; /* optional spacing */
}

/* At md and above: float right, shrink to fit */
@media (min-width: 768px) {
  .save-favourite,
  #save-to-favourites {
    float: right;
    width: auto;
    display: inline-block;
  }
}

/* On large screens: always expanded, no transform */
@media (min-width: 769px) {
  .favourites-container {
    position: static;
    transform: none !important;
    width: 100%;
    max-width: none;
    box-shadow: none;
    cursor: default;
  }
}




  #favourites-list-ul {
    max-height: 30vh;
    overflow-y: auto;
    padding-right: 10px; /* optional: space for scrollbar */
    -webkit-overflow-scrolling: touch; /* smooth scrolling on iOS */
    touch-action: pan-y; /* allow vertical panning */
  }
  #favourites-list-ul::-webkit-scrollbar {
    width: 6px;
  }
  
  #favourites-list-ul::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.2);
    border-radius: 3px;
  }



.favourites-scroll-hint::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30px;
  background: linear-gradient(to top, white, transparent);
  pointer-events: none;
}



/* Visually look enabled, even when disabled */
.visually-enabled:disabled {
  opacity: 1 !important;
  pointer-events: auto; /* allow pointer events if you want tooltips */
  cursor: not-allowed;  /* optional: change to pointer if you prefer */
}




@keyframes animate-bounce {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}

.animate-bounce {
  animation: animate-bounce 0.4s ease-out;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}

.animate-pulse {
  animation: pulse 0.4s ease-out;
}




/* Slide-up effect when modal opens */
@keyframes slideUp {
    0% {
        transform: translateY(100%); /* Start below the screen */
        opacity: 0;
    }
    100% {
        transform: translateY(0); /* End at normal position */
        opacity: 1;
    }
}

.modal.slide-up {
    animation: slideUp 0.5s ease-in-out;
}

/* Optionally, you can customize the speed, delay, or other properties of the animation */


@keyframes throb-once {
  0% {
    transform: scale(1);
  }
  30% {
    transform: scale(1.4);
  }
  60% {
    transform: scale(1);
  }
  100% {
    transform: scale(1);
  }
}

.throb-once {
  display: inline-block;
  animation: throb-once 0.6s ease-out 1;
}




#spinner-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex; /* important! */
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.6);
    z-index: 9999;
  }


.spinner-border {
    display: inline-block;
    width: 4rem !important;
    height: 4rem !important;
}




.custom-radio-group {
    display: flex;
    gap: 1rem; /* adds spacing between the two buttons */
  }
  
  .custom-radio-label {
    flex: 1 1 50%;
    text-align: center;
    border: 2px solid #ccc;
    padding: 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
  }
  
  .custom-radio-input {
    display: none;
  }
  
  .custom-radio-input:checked + .custom-radio-label,
  .custom-radio-label:hover {
    border-color: #2d6ec1;
    background-color: #2d6ec11f;
    color: #2d6ec1;
    box-shadow: 0 0 0 0.2rem rgb(45 110 193 / 25%)
  }
  