/* Bootstrap colors */
/* Yellow = ffc107 */
/* Blue = 0d6efd */
/* Red = dc3545 */
/* Green = 198754 */


/* img{ */
    /* transform: translateZ(0) */
    /* Bluring image problem on Chrome */
    /* image-rendering: -webkit-optimize-contrast; */
/* } */
/*  */
/* .scratchblocks{
    width: 100%;
    height: 100%;
} */
/* .scratchblocks > svg { */
    
    /* transform: scale(0.5); */
    /* transform-origin: 0 0; */
    /* width: 0.5*width;
    height: 0.5*height; */
    
    /* max-width: 250px;
    max-height: 400px; */
    /* width: 100%;
    height: 100%; */
    /* width: 100%; */
/* } */
.btn-close{
    background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23FFFFFF'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
}
.bg-ended-level-tab{
    /* color: white; */
    color: #ffc107;
    background-color: #212529;
    /* background-color: #ffc107; */
    /* background-color: #198754; */
    /* background-color: #ffc107; */
    /* opacity: 0.75; */
    /* border-top-left-radius: 8px ;
    border-top-right-radius: 8px ; */
    border-style: solid;
    border-color:white;
    border-width:1px 1px 1px 0px;
}

.bg-current-level-tab{
    /* color: white; */
    color: #ffc107;
    background-color: #212529;
    /* background-color: #ffc107; */
    /* background-color: #333333; */
    /* background-color: #6c757d; */
    /* border-top-left-radius: 8px ;
    border-top-right-radius: 8px ; */
    border-style: solid;
    border-color:white;
    border-width:1px 1px 0px 1px;
}
.bg-level-tab-disabled {
    /* color: black; */
    color: white;
    /* color: #ffc107; */
    /* background-color: #a68314; */
    /* background-color: #6c757d; */
    background-color: #212529;
    opacity: 0.5;

    /* background-color: #ffc107; */
    /* border-top-left-radius: 8px ;
    border-top-right-radius: 8px ; */
    border-style: solid;
    border-color:white;
    border-width:1px 1px 1px 0px;
}
.bg-level-tab-content{
    /* background-color: #333333; */
    /* background-color: #6c757d; */
    background-color: #212529;
    /* border-style: solid;
    border-color:white;
    border-width: 0px 1px; */
    
    
    /* background-color: #6c757d; */
}
.offcanvas-start {
    width: 520px;
}
.modal-body {
    padding-bottom: 0px;
}
.modal-footer {
    border-top: 0px;
    padding-top: 0px;
}
.modal-content{
    border: none;
}
.clipboard-btn{
    position:absolute;
    top: .2rem;
    right: .2rem;
    padding: .1rem .3rem;
    font-size: .6rem;
    opacity: 0.5;
}

.clipboard-help-btn {
    position: absolute;
    top: .2rem;
    right: .2rem;
    padding: .1rem .3rem;
    margin: .1rem .3rem;
    font-size: .6rem;
    opacity: 0.5;
}

.clipboard-btn:hover{
    opacity: 1;
}

.clipboard-btn:focus {
    outline: none;
    box-shadow: none;
}

.clipboard-btn-guide{
    position:absolute;
    top: .5rem;
    right: .5rem;
    /* padding: .1rem .3rem;
    font-size: .6rem;
    opacity: 0.5; */
}
.clipboard-btn-guide:hover{
    opacity: 1;
}

.clipboard-btn-guide:focus {
    outline: none;
    box-shadow: none;
}


.btn:focus {
    outline: none;
    box-shadow: none;
}

.circled-image {
    border: 3px solid white;
    border-radius: 100%;
    width: 100px;
}
.circled-image-clicked {
    border: 3px solid #ffc107;
    border-radius: 100%;
    width: 100px;
}

.circled-image:hover {
    border: 3px solid #ffc107;
    border-radius: 100%;
    width: 100px;
}

/* .bi-fullscreen:hover {
    opacity: 0.75;
} */

.bi-arrows-fullscreen {
    opacity: 0.75;
}
.bi-arrows-fullscreen:hover {
    opacity: 1;
}
.bi-fullscreen-exit {
    opacity: 0.75;
}
.bi-fullscreen-exit:hover {
    opacity: 1;
}

/* .circled-image:active {
    border: 2px solid #dc3545;
    border-radius: 100%;
} */

/* .tooltip-max-width:                 200px;
$tooltip-color:                     $white;
$tooltip-bg:  */

.tooltip-inner {
    background-color: white !important; /* Set box color to white */
    color: black !important; /* Set text color to black */
    max-width: 300px;
    opacity: 0.9;


}
  
.tooltip.bs-tooltip-top .tooltip-arrow::before {
    border-top-color: white;
    opacity: 0.8;
}
  
.tooltip.bs-tooltip-bottom .tooltip-arrow::before {
    border-bottom-color: white;
    opacity: 0.8;
}
  
.tooltip.bs-tooltip-start .tooltip-arrow::before {  
    border-left-color: white;
    opacity: 0.8;
}
  
.tooltip.bs-tooltip-end .tooltip-arrow::before {
    border-right-color: white;
    opacity: 0.8;
}

.parrot {
    transition: transform 0.3s ease;
}

.parrot:hover {
    transform: scale(1.1);
}

.mem-citation-font {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !important;
}

.loading-dots span {
    animation: blinkScale 1.4s infinite;
    opacity: 0;
    font-weight: bold;
    font-size: 1.5rem;
    display: inline-block;
    transform: scale(0.8);
}

.loading-dots span:nth-child(1) {
    animation-delay: 0s;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes blinkScale {

    0%,
    80%,
    100% {
        opacity: 0;
        transform: scale(0.8);
    }

    40% {
        opacity: 1;
        transform: scale(1.3);
    }
}

.parrot-container {
    position: relative;
    display: inline-block;
}

.help-bubble {
    position: absolute;
    top: -45px;
    left: 35%;
    transform: translateX(-50%);
    background-color: #f8f9fa;
    color: #333;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}

.close-bubble {
    margin-left: 8px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
}

.new-badge {
    background-color: #ff4757;
    color: #fff;
    padding: 2px 6px;
    font-size: 0.6rem;
    font-weight: bold;
    border-radius: 8px;
    text-transform: uppercase;
    transform: rotate(30deg);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    position: absolute;
    top: -10px;
    right: -20px;
}


/* Shine effect on btn-success */
.shine {
  position: relative;
  overflow: hidden;          /* keep the shine inside the button */
  cursor: not-allowed;       /* visually disabled */
}

/* Pseudo-element for the moving shine */
.shine::after {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;                /* start off the left edge */
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,                    /* horizontal gradient */
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.2) 50%,
    rgba(255,255,255,0) 100%
  );
  animation: shineMove 2s linear infinite;
}

/* Animation moving the shine from left to right */
@keyframes shineMove {
  0% { left: -50%; }
  100% { left: 100%; }
}

/* Glow animation */
@keyframes glow {
  0% { box-shadow: 0 0 0px rgba(0, 200, 255, 0); }
  50% { box-shadow: 0 0 15px rgba(0, 200, 255, 0.8); }
  100% { box-shadow: 0 0 0px rgba(0, 200, 255, 0); }
}
.glow {
  animation: glow 1.5s ease-in-out;
}

/* ------------------------------------------------------------------ */
/* Visual feedback (help modality 3) - pirate theme: treasure gold,    */
/* rope-dashed outline and parchment speech bubble.                    */
/* ------------------------------------------------------------------ */
@keyframes pirate-blink {
  0%, 100% {
    background-color: rgba(255, 193, 7, 0.12);
    outline-color: #b8860b;
    box-shadow: 0 0 0 2px #b8860b, 0 0 4px 1px rgba(255, 193, 7, 0.3);
  }
  50% {
    background-color: rgba(255, 193, 7, 0.75);
    outline-color: #fff3c4;
    box-shadow: 0 0 0 4px #ffc107, 0 0 22px 8px rgba(255, 193, 7, 0.9);
  }
}
@keyframes pirate-mark-blink {
  0%, 100% { background-color: #ffc107; color: #212529; box-shadow: 0 0 4px 1px rgba(255, 193, 7, 0.4); }
  50%      { background-color: #fff3c4; color: #7a5410; box-shadow: 0 0 18px 6px rgba(255, 193, 7, 0.95); }
}
/* Blinking gold box used on the memo buttons, memo sub-sections and exercise parts:
   a clear on/off flash so the learner's eye is drawn to the highlighted element. */
.pirate-highlight {
  position: relative;
  outline: 3px dashed #ffe082;
  outline-offset: 2px;
  border-radius: 6px;
  background-color: rgba(255, 193, 7, 0.18) !important;
  animation: pirate-blink 0.8s ease-in-out infinite;
  z-index: 5;
}
.pirate-highlight-inline {
  outline: 2px dashed #ffe082;
  outline-offset: 1px;
  border-radius: 4px;
  background-color: rgba(255, 193, 7, 0.18);
  animation: pirate-blink 0.8s ease-in-out infinite;
}
mark.pirate-mark {
  background-color: #ffc107;
  color: #212529;
  padding: 0 4px;
  border-radius: 3px;
  animation: pirate-mark-blink 0.8s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .pirate-highlight, .pirate-highlight-inline, mark.pirate-mark { animation: none; box-shadow: 0 0 0 3px #ffc107; }
}

/* Parrot speech bubble (parchment) */
.feedback-bubble {
  position: absolute;
  right: 0;
  bottom: 112px;
  width: 440px;
  max-width: 60vw;
  max-height: 55vh;
  overflow-y: auto;
  background: #f6e7c1;
  background-image: linear-gradient(rgba(255,255,255,0.35), rgba(0,0,0,0)), repeating-linear-gradient(0deg, rgba(139, 94, 30, 0.05) 0 2px, transparent 2px 6px);
  color: #3b2a12;
  border: 2px solid #b8860b;
  border-radius: 12px 12px 4px 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  padding: 12px 14px 10px 14px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  font-size: 0.95rem;
  line-height: 1.45;
  text-align: left;
  white-space: normal;
  z-index: 30;
}
.feedback-bubble::after {
  content: "";
  position: absolute;
  right: 28px;
  bottom: -14px;
  border-width: 14px 12px 0 0;
  border-style: solid;
  border-color: #b8860b transparent transparent transparent;
}
.feedback-bubble .bubble-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  color: #7a5410;
  font-size: 0.95rem;
  margin-bottom: 6px;
}
.feedback-bubble .bubble-header .bubble-name { display: inline-flex; align-items: center; gap: 6px; }
.feedback-bubble .bubble-header .bubble-name img { height: 22px; border-radius: 50%; }
.feedback-bubble .thinking-joke { font-style: italic; color: #5a4614; margin-top: 2px; }
.feedback-bubble .bubble-close {
  cursor: pointer;
  border: none;
  background: transparent;
  color: #7a5410;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 4px;
}
.feedback-bubble .bubble-close:hover { color: #212529; }
.feedback-bubble p { margin: 0 0 6px 0; }
.feedback-bubble pre {
  background: #212529;
  color: #f8f8f2;
  border-radius: 6px;
  padding: 6px 8px;
  margin: 6px 0;
  font-size: 0.85rem;
  overflow-x: auto;
}
.feedback-bubble code { font-size: 0.88em; }
.feedback-bubble :not(pre) > code {
  background: #212529;
  color: #ffe082;
  padding: 1px 5px;
  border-radius: 4px;
}
/* Memo reference in the bubble: same look as the "Mémo programmation" buttons (Bootstrap primary),
   clickable: opens the corresponding memo section. */
.feedback-bubble .memo-link {
  display: inline-block;
  background-color: #0d6efd;
  color: #fff;
  font-weight: 600;
  padding: 0 8px;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.5;
}
.feedback-bubble .memo-link:hover { background-color: #0b5ed7; box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.35); }
.feedback-bubble .bubble-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed #b8860b;
}
.rating-btn {
  border: 1px solid #b8860b;
  background: rgba(255, 255, 255, 0.5);
  color: #3b2a12;
  border-radius: 14px;
  padding: 1px 10px;
  font-size: 0.8rem;
  cursor: pointer;
}
.rating-btn:hover { background: #ffe082; }
.rating-btn.active { background: #ffc107; color: #212529; font-weight: bold; }
.rating-btn:disabled { cursor: default; opacity: 0.8; }
.rating-thanks { font-size: 0.78rem; color: #7a5410; margin-left: auto; }
/* Rating buttons under text dialog messages (modalities B / C) */
.message-rating { display: flex; gap: 6px; align-items: center; margin: -8px 0 12px 48px; }
.message-rating .rating-btn { background: #fff; }

/* Parrot bobs gently while a modality-3 feedback plan is in flight (can take 20-40s) */
@keyframes parrot-thinking-bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-6px) rotate(-4deg); }
}
.parrot-thinking { animation: parrot-thinking-bob 0.9s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .parrot-thinking { animation: none; }
}
