/* Stile base ispirato a colori islamici eleganti */
body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #fefdf6;
  margin: 0;
  padding: 0;
  color: #1e2d24;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #074b3b;
  color: #f1f1e9;
  padding: 12px 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo {
  font-size: 22px;
  font-weight: bold;
}

.menu button {
  background: transparent;
  border: none;
  font-size: 26px;
  color: #fff;
  cursor: pointer;
}

.menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  background-color: #0e6655;
  border-radius: 6px;
  overflow: hidden;
  position: absolute;
  right: 20px;
  top: 60px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.menu ul li a {
  display: block;
  padding: 12px 20px;
  color: #fff;
  text-decoration: none;
  font-weight: bold;
}

.menu ul li a:hover {
  background-color: #148f77;
}

.hidden {
  display: none;
}

.main-content {
  padding: 20px;
  max-width: 700px;
  margin: auto;
}

button {
  background-color: #0e6655;
  color: #fff;
  border: none;
  padding: 10px 16px;
  font-size: 16px;
  border-radius: 6px;
  margin-top: 10px;
  cursor: pointer;
  transition: background-color 0.2s;
}

button:hover {
  background-color: #148f77;
}

.recording-indicator {
  color: #e74c3c;
  font-weight: bold;
  margin: 10px 0;
  animation: blink 1s step-start 0s infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.text-box {
  margin-top: 20px;
  padding: 15px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  max-height: 400px;
  overflow-y: auto;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.entry {
  margin-bottom: 15px;
}

.entry-original {
  font-weight: normal;
  color: #2c3e50;
}

.entry-translation {
  font-weight: bold;
  color: #0c4d8c;
}

.entry-date {
  font-size: 12px;
  color: #888;
}

.save-banner,
.floating-banner {
  background-color: #fef0c2;
  border: 1px solid #e5c600;
  border-radius: 6px;
  padding: 15px;
  margin-top: 20px;
  position: relative;
}

.floating-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  z-index: 1000;
}

.kh-hero {
  font-size: 18px;
  color: #00695c;
  font-weight: bold;
  margin-bottom: 12px;
}

@media screen and (max-width: 600px) {
  .logo {
    font-size: 18px;
  }
  .menu ul {
    top: 50px;
  }
  .main-content {
    padding: 10px;
  }
}
.accordion-header {
  background-color: #f5f5f5;
  padding: 10px;
  border: 1px solid #ccc;
  font-weight: bold;
  margin-top: 10px;
  border-radius: 5px;
}

.accordion-content {
  background: #fff;
  padding: 10px;
  border-left: 1px solid #ccc;
  border-right: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  border-radius: 0 0 5px 5px;
}

.khutbah-entry input[type="checkbox"] {
  margin: 10px 10px 0 0;
  transform: scale(1.2);
  vertical-align: middle;
}

/* BANNER DI AVVISO POPUP FLOTTANTE */
#welcomeBanner {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(3px);
}

#welcomeBanner .banner-content {
  background-color: #fff;
  padding: 30px 25px;
  border-radius: 12px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
  max-width: 600px;
  width: 90%;
  text-align: center;
  color: #333;
}

#welcomeBanner .banner-content p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

#welcomeBanner .banner-content button {
  background-color: #198754;
  color: #fff;
  border: none;
  padding: 10px 25px;
  font-size: 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
}

#welcomeBanner .banner-content button:hover {
  background-color: #157347;
}

/* 🌙 Modalità Dark */
body.dark {
  background-color: #1e1e1e;
  color: #f1f1f1;
}

body.dark .header,
body.dark .main-content,
body.dark .text-box,
body.dark .entry {
  background-color: #2c2c2c;
  color: #f1f1f1;
}

body.dark .entry-original,
body.dark .entry-translation {
  border-color: #444;
}

/* 🌗 Switch Tema */
.theme-switch {
  margin-left: auto;
  margin-right: 10px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #2196F3;
}

input:checked + .slider:before {
  transform: translateX(22px);
}

.theme-switch {
  display: flex;
  align-items: center;
  margin-right: 1rem;
}

.theme-switch button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: inherit;
}

.theme-switch svg {
  vertical-align: middle;
}

/* 🌍 Supporto RTL migliorato */
html[dir="rtl"] {
  text-align: right;
}

html[dir="rtl"] .header {
  flex-direction: row-reverse;
}

html[dir="rtl"] .menu ul {
  left: 20px;
  right: auto;
}

html[dir="rtl"] .control-header {
  flex-direction: row-reverse;
}

html[dir="rtl"] .language-display {
  flex-direction: row-reverse;
}

html[dir="rtl"] .quick-action {
  flex-direction: row-reverse;
  text-align: right;
}

html[dir="rtl"] .save-content {
  flex-direction: row-reverse;
}