@font-face {
  font-family: 'sf-arabic';
  src: url(../assests/sf-arabic-regular.ttf);
  font-weight: normal;
  font-style: normal;
}

body {
  font-family: 'sf-arabic';
  max-width: 900px;
  margin: 0 auto;
  padding: 30px;
  background: linear-gradient(135deg, #f0f4f8 0%, #e6ecef 100%);
  direction: rtl;
  text-align: right;
  line-height: 1.6;
  color: #2c3e50;
}

h1, h5 {
  font-size: 2.5rem;
  color: #2c3e50;
  margin-bottom: 1rem;
  text-align: center;
  font-weight: normal;
}

h2 {
  font-size: 1.8rem;
  color: #34495e;
  margin-top: 2rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid #3498db;
  padding-bottom: 0.5rem;
  font-weight: normal;
}

p {
  font-size: 1.1rem;
  color: #7f8c8d;
  margin-top: 0px;
  /* margin-bottom: 2rem; */
  /* text-align: center; */
}

.form-group {
  margin-bottom: 0.5rem;
}

label {
  display: block;
  font-size: 1.1rem;
  color: #34495e;
  margin-bottom: 0.5rem;
}

input[type="file"],
select {
  width: 100%;
  padding: 12px;
  border: 1px solid #dcdcdc;
  border-radius: 8px;
  background-color: #fff;
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="file"]:focus,
select:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 8px rgba(52, 152, 219, 0.3);
}

button {
  background-color: #3498db;
  color: #fff;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
  font-family: 'sf-arabic', sans-serif;
  transition: background-color 0.3s ease, transform 0.2s ease;
  font-weight: normal;
}

button:hover {
  background-color: #2980b9;
  transform: translateY(-2px);
}

button:active {
  transform: translateY(0);
}

#recordButton {
  background-color: #27ae60;
}

#recordButton:hover {
  background-color: #108641;
}
#recordButton.recording {
  background-color: #e74c3c; /* Red color when recording */
}
#recordButton.recording:hover {
  background-color: #972215; /* Red color when recording */
}

#recordStatus {
  font-size: 1rem;
  color: #7f8c8d;
  margin-right: 10px;
}

#result {
  margin-top: 2rem;
  padding: 20px;
  border: 1px solid #dcdcdc;
  border-radius: 8px;
  background-color: #fff;
  min-height: 200px;
  font-size: 1.2rem;
  color: #2c3e50;
  direction: rtl;
  line-height: 1.8;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.error {
  color: #e74c3c !important;
  font-size: 1rem !important;
  margin-top: 0.5rem !important;
}

#model_id {
  direction: ltr;
  text-align: left;
}

/* a {
  display: block;
  color: #3498db;
  text-decoration: none;
  font-size: 1.1rem;
  transition: color 0.3s ease;
  direction: ltr;
  text-align: left;
}

a:hover {
  color: #2980b9;
  text-decoration: underline;
} */



/* Container for the form */
#transcribeForm {
  background-color: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}


audio {
  width: 100%;
  margin: 10px 0;
  border-radius: 8px;
}


button.disabled, button:disabled {
  background-color: #cccccc; /* Gray when disabled */
  cursor: not-allowed;
  opacity: 0.6;
}

.custom-file-upload {
  display: inline-block;
  padding: 6px 12px;
  background: #27ae60;
  /* border: 1px solid #ccc; */
  border-radius: 6px;
  cursor: pointer;
  color: white;
}

.custom-file-upload:hover {
  background: #108641;
}

.file-name {
  display: inline-block;
  margin-left: 10px;
  margin-right: 10px;
  font-size: 14px;
}


/* Static gradient confidence bar */
#confidence-bar {
    width: 100%;
    height: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-bottom: 10px;
    position: relative;
    /* Gradient from low to high confidence */
    background: linear-gradient(to right, 
        #8B0000 0%,    /* Dark Red: <0.50 */
        #FF4040 25%,   /* Light Red: 0.50–0.70 */
        #FFA500 50%,   /* Orange: 0.70–0.80 */
        #00FF00 75%,   /* Light Green: 0.90–0.95 */
        #006400 100%   /* Dark Green: ≥0.95 */
    );
}

/* Label for low accuracy (left side) */
#confidence-bar::before {
    content: "جەزىملەش تۆۋەن"; /* Low accuracy */
    position: absolute;
    left: 0px;
    top: 200%;
    transform: translateY(-50%);
    color: #8B0000;
    font-size: 12px;
    z-index: 2; /* Ensure it stays above the gradient */
    padding: 0 5px; /* Padding to separate text from edge */
}

/* Label for high accuracy (right side) */
#confidence-bar::after {
    content: "جەزىملەش يۇقىرى"; /* High accuracy */
    position: absolute;
    right: 0px;
    top: 200%;
    transform: translateY(-50%);
    color: #006400;
    font-size: 12px;
    z-index: 2; /* Ensure it stays above the gradient */
    padding: 0 5px; /* Padding to separate text from edge */
}


.selected_title {
    display: flex;
    justify-content: center; /* Align titles side by side and centered if needed */
    align-items: center;
    gap: 20px; /* Space between the titles */
    line-height: normal;
    direction: ltr;
}

.selected_title h5 {
    margin: 0;
    font-size: 24px; /* Adjust size as needed */
    text-align: right;
}

.selected_title h5 a {
    text-decoration: none; /* Remove underline from links */
    color: inherit; /* Keep original text color */
    display: block;
    padding: 5px 10px;
    border-radius: 5px;
}

.selected_title #seleted_a {
    background-color: #007bff; /* Highlight the first title/link */
    color: white;
}

.selected_title #seleted_a:hover {
    background-color: #0056b3; /* Optional: Change highlight on hover */
}

.selected_title #unselected_a:hover {
    background-color: #0056b3; /* Change background on hover for the second link */
    color: white; /* Optional: Improve contrast on dark hover background */
}

/* Responsive Design */
@media (max-width: 600px) {
  body {
    padding: 15px;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  button {
    width: 100%;
    padding: 12px;
  }

  input[type="file"],
  select {
    font-size: 0.9rem;
  }
  .selected_title{
    gap: 5px;
  }
  .selected_title h5 {
    font-size: 16px; /* Adjust size as needed */
  }
}

