@font-face {
    font-family: 'Jomolhari';
    src: url('/static/fonts/Jomolhari-Regular.ttf') format('truetype');
}

textarea, input, select, button {
    font-family: 'Jomolhari', sans-serif !important;
    white-space: pre-wrap;
    line-height: 2.2;
}

.dz-text {
    font-family: 'Jomolhari', sans-serif;

}

.dz-label {
    font-family: 'Jomolhari', sans-serif;
}

h1 {
    font-family: "Inter", sans-serif, "Segoe UI";
    text-align: center;
    font-size: 1.7em;         
    margin-top: 20px;       
    margin-bottom: 20px;   
    color: #333;           
}

textarea {
    width: 100%;
    height: 200px;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    resize: vertical;
}


body {
    font-family: "Inter", sans-serif;
    margin: 0;
    padding: 0;
    background-color: #fff;
}

.navbar nav {
    display: flex;
    align-items: center;
}

.navbar nav a {
    margin: 0 15px;
    text-decoration: none;
    color: white;
}

.navbar {
    background-color: #1315BD;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: 50px;
}

.navbar .logo {
    height: 40px;
    width: auto;
    margin-right: 20px;
}

.toggle {
  width: 24px;
  height: 24px;
  cursor: pointer;
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle img {
  width: 40px;
  height: 40px;
}

.translator-box {
    font-family: 'Inter', sans-serif;
    margin: 17px auto;
    width: 80%;
    max-width: 900px;
    padding-left: 2px;
    padding-right: 8px;
    border-radius: 10px;

}

.language-bar {
    display: flex;
    color: #808080;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding-bottom: 10px;
    padding-top: 25px;
}

.lang-label {
    width: 100px;
    text-align: center;
    display: inline-block;
    font-family: 'Jomolhari', 'sarif';
    font-size: 20px;
}

.input-section {
    display: flex;
    gap: 0; /* Removes spacing glitch */
}

.text-container {
    position: relative;
    width: 50%; /* Proper 50/50 layout */
}

.text-container textarea {
    width: 100%;
    height: 350px;
    padding: 15px;
    padding-bottom: 80px; /* enough room for the icons */
    white-space: pre-wrap;
    border: 2px solid #BDBDBD;
    background-color: #DEDEDE;
    resize: none;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    border-radius: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Add clear outline only when focused */
.text-container textarea:focus {
    outline: none;
    border: 2px solid #999;
    z-index: 1;
}

/* Input box (left side) */
.text-container:first-child textarea {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    box-shadow: 0 8px 8px -4px rgba(0, 0, 0, 0.4); /* bottom shadow */
}

/* Output box (right side) */
.text-container:last-child textarea {
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    box-shadow: 0 8px 8px -4px rgba(0, 0, 0, 0.4); /* bottom shadow */
}

/* Shared icon style */
.icon-bar img {
    width: 22px;
    height: 22px;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.icon-bar img:hover {
    opacity: 1;
    transform: scale(1.1);
}

.recording-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    background-color: #8d8d8d;
    border-radius: 25px;
    padding: 8px 30px;
    margin-top: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-size: 14px;
    transition: all 0.3s ease;
    position: absolute;
    bottom: 1%;
    color: white;
}

.recording-bar.hidden {
    display: none;
}

.copy-toast {
    position: absolute;
    background-color: #4a4a4a; /* Neutral gray */
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 10px;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1000;
    pointer-events: none;
}

.copy-toast.show {
    opacity: 1;
    transform: translateY(-7px);
}

.recording-dot {
    height: 10px;
    width: 10px;
    background-color: red;
    border-radius: 50%;
    animation: blink 1s infinite;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

.record-cancel, .record-confirm {
    background: none;
    border: none;
    font-size: 14px;
    cursor: pointer;
    color: white;
}

/* Input icons layout */
.input-icons {
    width: 100%;
    position: absolute;
    bottom: 15px;
    margin-left: 9px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
}

.left-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.right-group button {
    padding: 7px 16px;
    background-color: #8d8d8d;
    margin-right: 33px;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.right-group button:hover {
    background-color: #787878;
}

/* Output icons layout */
.output-icons {
    position: absolute;
    bottom: 15px;
    right: 19px;
    display: flex;
    gap: 10px;
}

footer {
    text-align: center;
    font-size: 14px;
}

/* Highlight only the word "Disclaimer" in yellow for dark mode */
body.dark-mode footer strong {
    color: yellow;
}

/* Swap button */
#swapBtn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;  /* fixed size ensures no jump */
    height: 30px;
    position: relative;
}

#swapIcon {
    transition: transform 0.3s ease;
    transform-origin: center center;  /* rotate from center */
    display: block;
    width: 24px;
    height: 24px;
    pointer-events: none;
}

.icon-bar img {
    cursor: pointer;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    opacity: 0.85;
    transition: transform 0.2s ease;
}

.icon-bar img:hover {
    transform: scale(1.2);
    opacity: 1;
}




/* Dark Mode Styles */
html.dark-mode body {
  background-color: #000;
  color: #fff;
}


body.dark-mode .translator-box{
    background-color: #212529;
    box-shadow: none !important; /* removed shadow */
    color: #fff;
}

body.dark-mode .navbar {
    background-color: #1315BD;
}

body.dark-mode .navbar nav a {
    color: #fff;
}

body.dark-mode .right-group button {
    background-color: #898989;
}

body.dark-mode .right-group button:hover {
    background-color: #666666;
}

body.dark-mode h1 {
    color: #cecece;
}

/* Textarea dark mode styling */
body.dark-mode textarea {
    background-color: #333D46 !important;
    color: #ffffff !important;
    border: 1.5px solid #D2D2D2 !important; /* Your desired border color */
    outline: none !important;
    box-shadow: none !important; /* removed shadow */
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    padding-bottom: 80px !important;

}

body.dark-mode .language-bar {
    color: #eaeaea;
}