/*
INDEX
  - MULTILINGUAL NEWS FORM 
      - RESET & OVERRIDES (Sobrescrita do sistema global)
      - FORM STRUCTURE (Configurações do container e formulário)
      - MODAL CONTEXT (Ajustes para quando o form está no modal)
      - FIELDSET & LEGEND (Estilização dos blocos de conteúdo)
      - EVENT COMPONENT (Cards de eventos dinâmicos)
      - MULTILINGUAL TABS (Sistema de abas de tradução)
      - FORM ELEMENTS (Inputs, Textareas e Editores)
      - ACTION BUTTONS (Posicionamento e estilos de botões)
      - RESPONSIVIDADE (Media Queries)

  - MULTILINGUAL NEWS LIST
*/

/* --------------------------- MULTILINGUAL NEWS FORM ----------------- */
/* ==========================================================================
   - RESET & OVERRIDES
   ========================================================================== */
form.default .event_fieldset .form-group label {
  display: inline-block !important;
  float: none !important;
  clear: none !important;
  width: auto !important;
  margin: 0 0 5px 0 !important;
  padding: 0 !important;
  text-align: left !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #666 !important;
  text-transform: uppercase !important;
  white-space: normal !important;
}



/* ==========================================================================
   - FORM STRUCTURE
   ========================================================================== */
form.multilingualNews {
  padding: 10px 0px;
  overflow: visible;
  position: relative;
}

form.multilingualNews .flex {
  display: flex;
}

/* Margens gerais para inputs dentro do form específico */
form.multilingualNews input,
form.multilingualNews select,
form.multilingualNews textarea {
  margin: 5px 0 5px 10px;
  padding: 5px;
  border: 1px solid #ccc;
}

/* ==========================================================================
   - MODAL CONTEXT
   ========================================================================== */
#modal-edit-content #ml_news {
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

#modal-edit-content .multilingualNews {
  box-shadow: none !important;
  border: none !important;
}

#modal-edit-content .flexContainer {
  display: block;
}

#modalContainer .modal.rawType {
  height: 100% !important;
}

#modalContainer .modal .tab.tab-content.active {
  max-width: unset !important;
}

div#modal-edit-content {
  width: 100%;
}

#modalContainer form.multilingualNews a#backButton {
  display: none;
}

/* ==========================================================================
   - FIELDSET & LEGEND
   ========================================================================== */
form.multilingualNews fieldset {
  padding: 20px 20px 15px !important;
  box-shadow: var(--gray4) 1px 1px 3px;
  margin-top: 55px;
  border: 1px solid #e0e0e0;
  background: #fff;
}

form.multilingualNews .multilingualNews_fieldset {
  margin-bottom: 28px;
}

form.multilingualNews fieldset legend {
  background-color: var(--gray2);
  color: var(--gray5);
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  border: none;
  box-shadow: var(--gray4) 1px 0px 3px;
  width: 100%;
  box-sizing: border-box;
}

form.multilingualNews fieldset legend p {
  display: flex;
  gap: 10px;
  cursor: pointer;
  margin: 0;
}

form.multilingualNews fieldset legend p i:hover {
  color: #005b96;
}

/* ==========================================================================
   - EVENT COMPONENT (DENTRO DOS FIELDSETS)
   ========================================================================== */
.event_fieldset {
  border-radius: 8px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.event_fieldset.collapsed {
  padding-bottom: 10px;
}

.event_fieldset .event-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
}

.event_fieldset .event-number {
  font-weight: bold;
  color: #555;
  font-size: 14px;
}

.event_fieldset .toggle-icon {
  color: #999;
  transition: transform 0.3s ease;
}

.event_fieldset .btn-remove-event {
  color: #dc3545;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 5px;
}

/* Grid Interna do Evento */
.event_fieldset .form-row {
  display: flex !important;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 15px;
}

.event_fieldset .form-group {
  display: flex !important;
  flex-direction: column !important;
  flex: 1;
  min-width: 200px;
}

.event_fieldset .fx_2 {
  flex: 2;
}
.event_fieldset .fx_1 {
  flex: 1;
}

.event_fieldset .divider {
  clear: both;
  border-top: 1px dashed #ddd;
  margin: 20px 0;
}

/* Componente de Repetição (Dias da semana) */
.event_fieldset .weekdays-container {
  display: flex;
  gap: 8px;
  margin-top: 5px;
}

.event_fieldset .day-item {
  position: relative;
  width: 32px;
  height: 32px;
}

.event_fieldset .day-item input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  z-index: 2;
  margin: 0;
}

.event_fieldset .day-item label {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100% !important;
  height: 100% !important;
  background: #f9f9f9 !important;
  border: 1px solid #ccc !important;
  border-radius: 50% !important;
  font-size: 11px !important;
  font-weight: bold !important;
  margin: 0 !important;
}

.event_fieldset .day-item input:checked + label {
  background-color: #007bff !important;
  color: white !important;
  border-color: #007bff !important;
}

/* ==========================================================================
   - MULTILINGUAL TABS & TITLE AREA
   ========================================================================== */
.multilingualTabs .langTitle {
  align-items: center;
  justify-content: space-between;
  padding-right: 4px;
}

.multilingualTabs .title-area {
  width: 100%;
  display: flex;
  align-items: center;
}

.multilingualTabs .title-area label {
  width: 6%;
  font-size: 17px;
  margin: 5px 10px 5px 0;
}

.multilingualTabs .title-area input {
  width: 90%;
  margin: 0px 17px 0 10px;
}

.multilingualTabs .title-area i {
  cursor: pointer;
  transition: 0.2s;
}

.multilingualTabs .hidden_title input {
  color: var(--gray2);
}

.multilingualTabs .lang {
  display: flex;
  width: 32%;
  gap: 1px;
}

/* Configurações de Publicação (Settings) */
.multilingualNews .settings {
  width: 100%;
  gap: 13px;
}

.multilingualNews .settings div {
  width: 100%;
  display: flex;
  align-items: center;
}

.multilingualNews .settings label {
  width: 20% !important;
  margin: 0 !important;
}

.multilingualNews .settings input {
  width: 74% !important;
  margin: 0px 0 0 10px !important;
}

/* ==========================================================================
   - FORM ELEMENTS (TEXTAREAS & EDITORS)
   ========================================================================== */
form.multilingualNews textarea {
  height: 117px;
  width: 100%;
  box-sizing: border-box;
}

form.multilingualNews textarea[id^="HTMLEditor_"] {
  height: 443px;
  margin: 0 0 20px 0;
}

form.multilingualNews .summary {
  padding: 10px 0px;
}

form.multilingualNews .summary i {
  color: var(--blue2);
  cursor: pointer;
  font-size: 13px;
}

form.multilingualNews .summary textarea[id^="HTMLEditor_"] {
  height: 120px !important;
  margin-bottom: 30px;
}

form.multilingualNews .ql-editor {
  min-height: 400px;
}

/* ==========================================================================
   - ACTION BUTTONS
   ========================================================================= */
form.multilingualNews .form_buttons {
  display: flex;
  flex-direction: row-reverse;
  height: 50px !important;
  align-items: center;
  margin-top: 20px;
  gap: 10px;
}

form.multilingualNews .form_buttons button.btn-red {
  background: var(--cred);
  color: #fff !important;
  border: none;
  padding: 8px 20px;
  cursor: pointer;
  position: absolute;
  left: 0;
}

form.multilingualNews a#backButton {
  position: absolute;
  right: 0px;
  top: 0;
  border: none;
}

.eventButtonContainer {
  display: flex;
  justify-content: flex-end;
  padding-top: 10px;
}

/* ==========================================================================
   - RESPONSIVIDADE
   ========================================================================== */

/* Tablets e Telas Médias */
@media screen and (max-width: 1179px) {
  form.multilingualNews .settings select {
    width: 75% !important;
  }
  form.multilingualNews .lang label {
    width: 40%;
    display: flex;
  }
}

/* Celulares e Telas Pequenas */
@media screen and (max-width: 879px) {
  form.multilingualNews .settings {
    flex-wrap: wrap !important;
  }

  form.multilingualNews .flex.langTitle {
    flex-direction: column;
  }

  form.multilingualNews .lang {
    width: 100%;
  }

  form.multilingualNews .title-area {
    margin: 14px 20px 20px auto;
  }

  form.multilingualNews .title-area input {
    width: calc(100% + 187px) !important;
    margin: 0;
  }

  form.multilingualNews .half {
    margin-left: 10px !important;
  }
}



/* --------------------------- MULTILINGUAL NEWS LIST ----------------- */

/* =========================================
   CONTAINERS PRINCIPAIS
========================================= */
section.ml_news {
  width: 100%;
  max-width: 1350px;
  margin: 0 auto;
}

#ml_news {
  max-width: 1300px;
  margin: 0 auto;
}

/* =========================================
   SECTION 25 
========================================= */
#ml_news .section_25 article {
  width: 100%;
  max-width: 1300px;
  box-sizing: border-box;
  border: 1px solid var(--gray2);
  padding: 15px 50px; 
  margin-bottom: 60px; 
  position: relative;
}

#ml_news .section_25 article dl:not(.dl_cards) {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  gap: 50px; 
  margin: 0;
  padding: 0;
}

#ml_news .section_25 dt.img-dt_news,
#ml_news .section_25 dt {
  width: 410px; 
  height: 550px;
  margin: 0;
  display: block;
}

#ml_news .section_25 img {
  height: 100%;
}

#ml_news .section_25 article dd:not(.date):not(#attachments dd) {
  width: 740px;
  height: 550px;
  padding: 0 !important; 
  margin: 0;
  overflow-y: auto;
}

#ml_news .section_25 a.shareArticle {
  position: absolute;
  top: 6px !important;
  left: 428px !important;
  color: white;
  width: 40px;
  height: 40px;
  padding: 7px 0;
  text-align: center;
  z-index: 2;
  background: var(--blue);
  border-radius: 100px;
}

/* =========================================
   SECTION 50
========================================= */


#ml_news .section_50:not(:has(form)) {
  display: grid;
  grid-template-columns: 1fr 1fr; 
  gap: 30px; 
  max-width: 1300px;
  margin: 0;

}

section.ml_news #ml_news .section_50:not(:has(form)) article {
  width: 635px;
  max-width: none;
  height: 430px;
  box-sizing: border-box;
  border: 1px solid var(--gray2);
  padding: 25px 15px !important;
  margin: 0 0 30px 0;
  position: relative;
}

#ml_news .section_50:not(:has(form)) dl {
  display: grid;
  grid-template-columns: 260px 320px; 
  gap: 25px; 
  align-items: start;
  height: 100%;
  margin: 0;
  padding: 0;
}

#ml_news .section_50:not(:has(form)) .img-dt_news,
#ml_news .section_50:not(:has(form)) dt {
  position: relative; 
  width: 100%; 
  height: 380px; 
  margin: 0;
}

#ml_news .section_50:not(:has(form)) img {
  height: 100%;
  max-width: 260px !important;
}

#ml_news .section_50:not(:has(form)) dd:not(.date):not(.img-dt_news) {
  width: 100%; 
  height: 380px;
  padding: 0;
  margin: 0;
  background-color: transparent;
  overflow-y: auto;
  position: relative;
}

#ml_news .section_50 a.shareArticle {
  position: absolute;
  top: 6px !important;
  left: 251px !important;
  color: white;
  width: 40px;
  height: 40px;
  padding: 7px 0;
  text-align: center;
  z-index: 2;
  background: var(--blue);
  border-radius: 100px;
}