/* page specific css for turkish english dictionary */
/** turkish keyboard characters and audio animations /
/*.for mobile devices make text smaller */
/* for search instructions */
.small-text-header{
    display:flex;
    width:33%;
    height:22px;
    font-size 16px;
    text-align:center;
    background-color:#EBE3E1;
    color:#1420BA;
    font-family: sans-serif, Verdana, serif "Times New Roman";
    font-style: italic;
}

/*play the audio for turkish character voice*/
.character-voices-play{
    width: fit-content;
    background-color:#FAD9D2;
    height:28px;
    margin:0 auto;
    display: flex;
    align-items:center;
    justify-content: center; 
    border: 1px solid #274DF5;
    border-radius: 8px;
    
}
   /* turkish characters keyboard*/
    
    .turk-characters-keyboard-container {
    width: fit-content;      /* The border will now hug the keys */
    height: 42px;  /* dont overwhelm size of inputs below on the actaul form */ 
    margin: 0 auto;          /* Centers the entire 'widget' in its parent space */
    padding: 2px 4px;        /* Adds a little 'breathing room' inside the blue box */
    display: flex;
    flex-wrap: wrap; 
    gap: 1px;        
    align-items: center;
    justify-content: center; 
    border: 2px solid #274DF5;
    border-radius: 12px;
}

.turkkey {
    display: inline-block; /* for padding/margin  */
    font-family: sans-serif;
    font-size: 20px;
    font-weight: bold;
    padding: 8px 14px;
    margin: 5px;
    cursor: pointer;
    background: #fdfdfd;
    color: #333;
    
    /* The Raised Look */
    border: 1px solid #ccc;
    border-bottom: 4px solid #b3b3b3; /* Darker bottom  */
    border-radius: 6px;
    
    /* Soft shadow for the page surface */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    
    /* Smooth transition for the 'press' effect */
    transition: all 0.05s ease;
    user-select: none; /* Prevents highlighting the letter on fast clicks */
    
    user-select: none;
}

/* Hover state */
.turkkey:hover {
    background: #f0f0f0;
    border-bottom-color: #D92509; /* accent colour */
}

/* The "Pressed" Look */
.turkkey:active {
    border-bottom-width: 1px; /* Key flattens */
    margin-top: 8px;          /* Moves down to simulate being pushed */
    margin-bottom: 0px;       
    background: #e6e6e6;
    box-shadow: none;
}


/* RADIO BUTTONS ON OF FOR AUDIO*/

.audio-control-group {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 10px;
}

.radio-toggle {
  position: relative;
  display: flex;
  background-color: #eee;
  border: 2px solid blue;
  border-radius: 20px; /* Fat and round */
  overflow: hidden;
  width: 100px;
  height: 34px;
}

.radio-toggle input {
  display: none; /* Hide the actual radio circles */
}

.radio-toggle label {
  flex: 1;
  z-index: 2;
  text-align: center;
  line-height: 30px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  transition: color 0.3s;
}

/* The blue sliding background */
.selection-slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  background-color: blue;
  transition: transform 0.3s ease;
  z-index: 1;
}

/* Move slider to 'Off' position */
#audioOff:checked ~ .selection-slider {
  transform: translateX(100%);
}

/* Text color change based on selection */
#audioOn:checked ~ label[for="audioOn"],
#audioOff:checked ~ label[for="audioOff"] {
  color: white;
}

#audioOn:not(:checked) ~ label[for="audioOn"],
#audioOff:not(:checked) ~ label[for="audioOff"] {
  color: #555;
}


/*for mobiles*/

@media (max-width: 600px) {

    .turk-characters-keyboard-container {
        display: grid;
        grid-template-columns: repeat(7, 1fr); /* 7 per row */
        width: 100%;
        height: auto;
    }

    .turkkey {
        font-size: 16px;
        padding: 6px 0;
        margin: 2px;
        text-align: center;
    }

}

/*new styles for playing audios */
 /* A simple pulsing animation for the active speaker */
  .speaking {
    font-weight: bold;
    color: #2c3e50;
    animation: pulse 1.5s infinite;
  }

  @keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
  }
    
   /* quick animations translation direct flash red - blue turk-> eng  flags*/ 
    #translation-direction {
    width: 200px;
    height: 32px;
    line-height: 40px; /* Vertically centers text */
    text-align: center;
    font-family: sans-serif;
    font-weight: bold;
    border: 1px solid #ddd;
    
    /* Animation: 6 seconds long, runs once, stays on last frame */
    animation: flags-change 6s ease-in-out forwards;
  }

  @keyframes flags-change {
    /* 0-20%: Start with white background */
    0%, 20% { 
      background-color: white; 
      color: #333; 
    }
    /* 25-55%: Englısh UK Flag Blue */
    25%, 55% { 
      background-color: #00247D; 
      color: white; E30A17
    }
    /* 60-100%: Turkısh Flag Red */
    60%, 100% { 
      background-color: #E30A17; 
      color: white; 
    }
  }

  /* Using content swapping for the text/emoji */
  #translation-direction::after {
    content: " 🇹🇷";
    animation: text-change 6s ease-in-out forwards;
  }

  @keyframes text-change {
    0%, 20% { content: " Ready..Hazır"; }
    25%, 55% { content: " Çeviri 🇬🇧"; }
    60%, 100% { content: " Translation 🇹🇷"; }
  }
    
    /* tooltip and actions */
    
            .tooltip-container {
            position: relative;
            display: inline-block;
            margin-left: 10px;
        }
        
        .info-icon {
            display: inline-block;
            width: 20px;
            height: 20px;
            background-color: #3498db;
            color: white;
            text-align: center;
            border-radius: 50%;
            cursor: pointer;
            font-style: normal;
            font-weight: bold;
        }
        
        .tooltip-text {
            visibility: hidden;
            width: 400px;
            background-color: #2c3e50;
            color: #fff;
            text-align: center;
            border-radius: 6px;
            padding: 10px;
            position: absolute;
            z-index: 1;
            bottom: 125%;
            left: 50%;
            transform: translateX(-50%);
            opacity: 0;
            transition: opacity 0.3s;
            font-size: 0.85rem;
            line-height: 1.4;
        }
        
        .tooltip-container:hover .tooltip-text {
            visibility: visible;
            opacity: 1;
        }
        
        
        /* menu tooltip icon hover with link*/
        
        /* Menu container */
.nav-item-special {
    display: inline-flex;
    align-items: center;
    position: relative; /* Required tooltip positioning */
    margin: 5px 10px;    /*  small margin  4 sides */
    padding: 5px;
}

/* The Icon  Dark Navy Background */
.info-icon-nav {
    display: inline-block;
    width: 22px;
    height: 22px;
    background-color: #f1c40f; /* Brighter gold to pop against navy */
    color: #000;               /* Dark text for contrast */
    text-align: center;
    border-radius: 50%;
    cursor: pointer;
    font-style: normal;
    font-weight: bold;
    line-height: 22px;         /* Centers the 'i' vertically */
    border: 2px solid #fff;    /*  stand-out border */
}

/* Tooltip -  below the menu */
.tooltip-text-nav {
    
    position: absolute;
    z-index: 100;
    top: 110%;      /* closer to  menu item */
    
    /* Anchor left  move right */
    left: 0;        
    right: auto;    /* Reset previous right alignment */
    transform: none; 
    
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
    
    width: 280px;              /* Adjusted  menu layout */
    background-color: #ffffff; /* White background for readability */
    color: #2c3e50;            /* Dark text */
    text-align: left;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 12px;
    position: absolute;
    right: 0;  /* Aligns to right edge of  icon */
    opacity: 0;
    font-size: 0.9rem;
    box-shadow: 0px 4px 10px rgba(0,0,0,0.2);
}

/* Show on Hover */
.nav-item-special:hover .tooltip-text-nav {
    visibility: visible;
    opacity: 1;
}

/* Link inside tooltip  */
.tooltip-text-nav a {
    color: #3498db;
    text-decoration: underline;
    font-weight: bold;
    display: block;
    margin-bottom: 8px;
}
    
 /* the popup icon texts */   
 
 
         /* menu tooltip icon hover with link*/
        
        /* Menu container */
.nav-item-special {
    display: inline-flex;
    align-items: center;
    position: relative; /* Required tooltip positioning */
    margin: 5px 10px;    /*  small margin  4 sides */
    padding: 5px;
}

/* The Icon  Dark Navy Background */
.info-icon-nav {
    display: inline-block;
    width: 22px;
    height: 22px;
    background-color: #f1c40f; /* Brighter gold to pop against navy */
    color: #000;               /* Dark text for contrast */
    text-align: center;
    border-radius: 50%;
    cursor: pointer;
    font-style: normal;
    font-weight: bold;
    line-height: 22px;         /* Centers the 'i' vertically */
    border: 2px solid #fff;    /*  stand-out border */
}

/* Tooltip -  below the menu */
.tooltip-text-nav {
    
    position: absolute;
    z-index: 100;
    top: 110%;      /* closer to  menu item */
    
    /* Anchor left  move right */
    left: 0;        
    right: auto;    /* Reset previous right alignment */
    transform: none; 
    
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
    
    width: 280px;              /* Adjusted  menu layout */
    background-color: #ffffff; /* White background for readability */
    color: #2c3e50;            /* Dark text */
    text-align: left;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 12px;
    position: absolute;
    right: 0;  /* Aligns to right edge of  icon */
    opacity: 0;
    font-size: 0.9rem;
    box-shadow: 0px 4px 10px rgba(0,0,0,0.2);
}

/* Show on Hover */
.nav-item-special:hover .tooltip-text-nav {
    visibility: visible;
    opacity: 1;
}

/* Link inside tooltip  */
.tooltip-text-nav a {
    color: #3498db;
    text-decoration: underline;
    font-weight: bold;
    display: block;
    margin-bottom: 8px;
}