/* ==========================================================================
   DLE 21 Tizim Elementlari Uslublari (engine.css)
   Zamonaviy Clean UI, Minimalizm va Tez Yuklanish Standartlari
   ========================================================================== */

/* 1. AJAX Yuklanish Ko'rsatkichi (Loading Layer) */
#loading-layer {
  display: none;
  position: fixed;
  left: 50%;
  top: 40px;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.88);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
  z-index: 99999;
}

#loading-layer.withouttext {
  width: 44px;
  height: 44px;
  padding: 10px;
  border-radius: 50%;
}

/* 2. Iqtiboslar (Quotes & Blockquotes) */
.quote, blockquote, .title_quote {
  margin: 1.5rem 0;
  padding: 1.1rem 1.4rem;
  background: #f8fafc;
  border-left: 4px solid #2563eb;
  border-radius: 0 12px 12px 0;
  color: #334155;
  font-size: 15px;
  line-height: 1.65;
  font-style: italic;
  position: relative;
}

.title_quote {
  font-weight: 700;
  font-style: normal;
  color: #0f172a;
  border-bottom: 1px solid #e2e8f0;
  border-radius: 0 12px 0 0;
  margin-bottom: 0;
  padding-bottom: 0.5rem;
}

.title_quote + .quote {
  margin-top: 0;
  border-top: none;
  border-radius: 0 0 12px 0;
}

/* 3. DLE Kod Bloklari (.scriptcode) */
.scriptcode {
  background: #0f172a !important;
  color: #f8fafc !important;
  font-family: ui-monospace, "JetBrains Mono", "Fira Code", Consolas, monospace !important;
  padding: 1.25rem !important;
  border-radius: 12px !important;
  border: 1px solid #334155 !important;
  font-size: 13.5px !important;
  line-height: 1.65 !important;
  overflow-x: auto;
  margin: 1.5rem 0 !important;
}

/* 4. Spoilerlar (Spoilers) */
.title_spoiler {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.75rem 1.15rem;
  font-weight: 600;
  font-size: 14px;
  color: #0f172a;
  cursor: pointer;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color 0.2s ease;
}

.title_spoiler:hover {
  background: #e2e8f0;
}

.text_spoiler {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-top: none;
  border-radius: 0 0 10px 10px;
  padding: 1rem 1.15rem;
  font-size: 14px;
  line-height: 1.6;
  color: #334155;
  margin-bottom: 1rem;
}

/* 5. Maxfiy Matn (Hide) */
.hide {
  background: #fffbeb;
  border: 1px dashed #f59e0b;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  color: #b45309;
  font-size: 13.5px;
  margin: 1.25rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hide a {
  color: #b45309;
  font-weight: 700;
  text-decoration: underline;
}

/* 6. DLE Reyting & Ovoz Berish (Rating) */
.rating, .unit-rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ratingtypeplus, .ratingtypeplusminus {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 13px;
}

.ratingtypeplus a, .ratingtypeplusminus a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #475569;
  transition: all 0.2s ease;
}

.ratingtypeplus a:hover, .ratingtypeplusminus a:hover {
  background: #2563eb;
  color: #ffffff;
}

/* 7. DLE So'rovnomalar (Polls) */
.pollprogress, .voteprogress {
  height: 8px;
  background: #e2e8f0;
  border-radius: 9999px;
  overflow: hidden;
  margin: 0.5rem 0 0.85rem;
}

.pollprogress span, .voteprogress span {
  display: block;
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, #2563eb 0%, #06b6d4 100%);
  text-indent: -9999px;
  transition: width 0.4s ease;
}

/* 8. Xatolar va Tizim Xabarlari (Errors & Info) */
.berrors {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-left: 4px solid #ef4444;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  color: #991b1b;
  font-size: 14px;
  margin: 1.5rem 0;
}

.berrors b {
  color: #7f1d1d;
  display: block;
  margin-bottom: 0.25rem;
}

/* 9. DLE Modal Dialoqlari (UI Dialog) */
.ui-dialog {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  box-shadow: 0 20px 35px -5px rgba(15, 23, 42, 0.2) !important;
  padding: 0 !important;
  overflow: hidden;
  font-family: inherit !important;
}

.ui-dialog .ui-dialog-titlebar {
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
  padding: 0.85rem 1.25rem !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
}

.ui-dialog .ui-dialog-content {
  padding: 1.25rem !important;
  font-size: 14px !important;
  color: #334155 !important;
}

.ui-dialog .ui-dialog-buttonpane {
  background: #f8fafc !important;
  border-top: 1px solid #e2e8f0 !important;
  padding: 0.75rem 1.25rem !important;
  margin: 0 !important;
}

.ui-dialog button {
  border-radius: 8px !important;
  padding: 0.45rem 1rem !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  transition: all 0.2s ease !important;
}

/* 10. DLE BB-kodlar va Asboblar Paneli (BBCODES) */
.bb-pane {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px 10px 0 0;
  padding: 0.4rem 0.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.bb-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
}

.bb-btn:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

.bb-editor textarea {
  border-radius: 0 0 10px 10px !important;
  border-top: none !important;
}

/* 11. Mobil Moslashuvchanlik Qoidalari */
@media (max-width: 640px) {
  .scriptcode {
    font-size: 12px !important;
    padding: 1rem !important;
  }
  .quote, blockquote {
    padding: 0.85rem 1rem;
    font-size: 14px;
  }
}