/* ==================================================
   ОБЩИНСКИ СЪВЕТ – БУРГАС
   УНИВЕРСАЛЕН ДИЗАЙН НА ПРИКАЧЕНИ ФАЙЛОВЕ
   Drupal 10 / Bartik
   ================================================== */

/* 1. Контейнери за файлове */
body .region-content
.node__content .field--type-file {
  box-sizing: border-box !important;
  margin: 12px 0 !important;
}

/* 2. Заглавия на полетата */
body .region-content
.node__content .field--type-file > .field__label {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;

  margin: 0 0 9px !important;
  padding: 0 !important;

  color: #073b70 !important;
  font: 700 12px/1.45 Arial, sans-serif !important;
}

/* 3. Премахване на отстоянията */
body .region-content
.node__content .field--type-file .field__items,
body .region-content
.node__content .field--type-file .field__item {
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* 4. Един файл на ред */
body .region-content
.node__content .field--type-file .file {
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;

  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

/* 5. Универсални бутони */
body .region-content
.node__content .field--type-file .file > a {
  display: flex !important;
  align-items: center !important;
  gap: 11px !important;

  box-sizing: border-box !important;
  width: 100% !important;
  min-height: 48px !important;

  margin: 0 0 8px !important;
  padding: 11px 13px !important;

  background: #f7f9fc !important;
  border: 1px solid #e3eaf2 !important;
  border-radius: 7px !important;

  color: #334155 !important;
  font: 600 15px/1.5 Arial, sans-serif !important;
  text-decoration: none !important;
  overflow-wrap: anywhere !important;

  box-shadow: none !important;
  transition: background-color .2s ease,
              border-color .2s ease !important;
}

/* 6. Обозначения за файловите формати */
body .region-content
.node__content .field--type-file .file > a::before {
  content: "FILE" !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  flex: 0 0 40px !important;
  width: 40px !important;
  height: 27px !important;

  box-sizing: border-box !important;
  background: #fff !important;
  border: 1px solid #d4e4f4 !important;
  border-radius: 4px !important;

  color: #2066a3 !important;
  font: 800 10px/1 Arial, sans-serif !important;
}

/* 7. PDF */
body .region-content
.node__content .field--type-file
.file--application-pdf > a::before {
  content: "PDF" !important;
  color: #c04b47 !important;
  border-color: #eadada !important;
}

/* 8. DOCX */
body .region-content
.node__content .field--type-file
.file--x-office-document > a::before {
  content: "DOCX" !important;
}

/* 9. DOC */
body .region-content
.node__content .field--type-file
.file--mime-application-msword > a::before {
  content: "DOC" !important;
}

/* 10. XLSX */
body .region-content
.node__content .field--type-file
.file--x-office-spreadsheet > a::before {
  content: "XLSX" !important;
  color: #237a50 !important;
  border-color: #cfe7db !important;
}

/* 11. XLS */
body .region-content
.node__content .field--type-file
.file--mime-application-vnd-ms-excel > a::before {
  content: "XLS" !important;
  color: #237a50 !important;
  border-color: #cfe7db !important;
}

/* 12. Hover */
body .region-content
.node__content .field--type-file .file > a:hover {
  background: #edf5fc !important;
  border-color: #bfd9ee !important;
  color: #075ba1 !important;
}

/* 13. Клавиатурен фокус */
body .region-content
.node__content .field--type-file .file > a:focus-visible {
  outline: 2px solid #ff8800 !important;
  outline-offset: 2px !important;
}

/* 14. Специален стил за "Указания" */
body .region-content
.node__content
.field--name-field-ukazaniya.field--type-file
.file > a {
  color: #b21f2d !important;
  background: #fffafa !important;
  border-color: #eedddd !important;
}

body .region-content
.node__content
.field--name-field-ukazaniya.field--type-file
.file > a:hover {
  color: #8f1723 !important;
  background: #fff1f1 !important;
  border-color: #dca9ad !important;
}

/* 15. Мобилно оформление */
@media (max-width: 767px) {
  body .region-content
  .node__content .field--type-file .file > a {
    min-height: 44px !important;
    padding: 10px 11px !important;
    gap: 9px !important;
    font-size: 14px !important;
  }
}

/* ================================================
   ОБЩИНСКИ СЪВЕТ – БУРГАС
   ЕДИНЕН ДИЗАЙН НА ФАЙЛОВЕТЕ В DRUPAL VIEWS
   ================================================ */

/* Контейнери с файлове във Views */

body .region-content .view
.views-field .file {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  box-sizing: border-box !important;
}

/* Общ дизайн на линковете към файлове */

body .region-content .view
.views-field .file > a,

body .region-content .view
.views-field .field-content > a[href*="/sites/default/files/"] {
  display: flex !important;
  align-items: center !important;
  gap: 11px !important;

  width: 100% !important;
  min-height: 48px !important;
  box-sizing: border-box !important;

  margin: 0 0 8px !important;
  padding: 11px 13px !important;

  background: #f7f9fc !important;
  border: 1px solid #e3eaf2 !important;
  border-radius: 7px !important;

  color: #334155 !important;
  font: 600 15px/1.5 Arial, sans-serif !important;
  text-decoration: none !important;
  overflow-wrap: anywhere !important;
}

/* Общ етикет */

body .region-content .view
.views-field .file > a::before,

body .region-content .view
.views-field .field-content > a[href*="/sites/default/files/"]::before {
  content: "FILE" !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  width: 40px !important;
  height: 27px !important;
  flex: 0 0 40px !important;

  background: #ffffff !important;
  border: 1px solid #d4e4f4 !important;
  border-radius: 4px !important;
  box-sizing: border-box !important;

  color: #2066a3 !important;
  font: 800 10px/1 Arial, sans-serif !important;
}

/* PDF */

body .region-content .view
.views-field .file--application-pdf > a::before,

body .region-content .view
.views-field a[href$=".pdf" i]::before {
  content: "PDF" !important;
  color: #c04b47 !important;
  border-color: #eadada !important;
}

/* DOCX */

body .region-content .view
.views-field .file--x-office-document > a::before,

body .region-content .view
.views-field a[href$=".docx" i]::before {
  content: "DOCX" !important;
}

/* DOC */

body .region-content .view
.views-field .file--mime-application-msword > a::before,

body .region-content .view
.views-field a[href$=".doc" i]::before {
  content: "DOC" !important;
}

/* XLSX */

body .region-content .view
.views-field .file--x-office-spreadsheet > a::before,

body .region-content .view
.views-field a[href$=".xlsx" i]::before {
  content: "XLSX" !important;
  color: #237a50 !important;
  border-color: #cfe7db !important;
}

/* XLS */

body .region-content .view
.views-field a[href$=".xls" i]::before {
  content: "XLS" !important;
  color: #237a50 !important;
  border-color: #cfe7db !important;
}

/* Hover */

body .region-content .view
.views-field .file > a:hover,

body .region-content .view
.views-field .field-content > a[href*="/sites/default/files/"]:hover {
  background: #edf5fc !important;
  border-color: #bfd9ee !important;
  color: #075ba1 !important;
}

/* Мобилна версия */

@media (max-width: 767px) {
  body .region-content .view
  .views-field .file > a,

  body .region-content .view
  .views-field .field-content > a[href*="/sites/default/files/"] {
    min-height: 44px !important;
    padding: 10px 11px !important;
    font-size: 14px !important;
  }
}

/* ================================================
   ИКОНИ ПРЕД ЗАГЛАВИЯТА НА ГРУПИТЕ С ФАЙЛОВЕ
   Drupal 10 / Bartik
   ================================================ */

/* Общ стил на двете заглавия */

body .region-content
.node__content
:is(
  .field--name-field-faylove-i-resursi,
  .field--name-field-faylove-i-resursi-za-regis
) > .field__label {
  display: flex !important;
  align-items: center !important;
  gap: 9px !important;

  margin: 0 0 10px !important;
  padding: 0 !important;

  background: transparent !important;
  color: #073b70 !important;

  font: 700 13px/1.45 Arial, sans-serif !important;
  text-transform: uppercase !important;
}

/* 1. ФАЙЛОВЕ И РЕСУРСИ – документи */

body .region-content
.node__content
.field--name-field-faylove-i-resursi
> .field__label::before {
  content: "" !important;
  display: inline-block !important;

  width: 20px !important;
  height: 20px !important;
  flex: 0 0 20px !important;

  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23075ba1' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-3'/%3E%3Cpath d='M9 3h7l5 5v7H9z'/%3E%3Cpath d='M16 3v5h5M6 12h8M6 16h8'/%3E%3C/svg%3E")
    center / contain no-repeat !important;
}

/* 2. ФАЙЛОВЕ И РЕСУРСИ ЗА РЕГИСТРИРАНИ
   ПОТРЕБИТЕЛИ – катинар */

body .region-content
.node__content
.field--name-field-faylove-i-resursi-za-regis
> .field__label::before {
  content: "" !important;
  display: inline-block !important;

  width: 20px !important;
  height: 20px !important;
  flex: 0 0 20px !important;

  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23075ba1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='10' width='16' height='11' rx='2'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3'/%3E%3Ccircle cx='12' cy='15' r='1'/%3E%3Cpath d='M12 16v2'/%3E%3C/svg%3E")
    center / contain no-repeat !important;
}
