.frfp-wrapper * { box-sizing: border-box; }
.frfp-wrapper{width:100%;max-width:100%;overflow:hidden}
.frfp-cols{display:grid;grid-template-columns:1fr;gap:28px}
.frfp-field{margin-bottom:28px}
.frfp-label{display:block;margin-bottom:10px;font-weight:700;font-size:20px;line-height:1.3}
.frfp-help{margin:8px 0 0;color:#666;font-size:14px;line-height:1.5}
.frfp-help a{text-decoration:underline;text-underline-offset:3px}
.frfp-input,
.frfp-wrapper .chosen-container-single .chosen-single,
.frfp-wrapper .chosen-container .chosen-search input[type=text],
.frfp-editor{border:1px solid #E6E6E6;border-radius:10px}
.frfp-input{width:100%;padding:11px 12px;outline:0;transition:border-color .15s, box-shadow .15s;font-size:16px;background:#fff;color:#111}
.frfp-input::placeholder{color:#A9A9A9}
.frfp-input:focus{border-color:#3F7CDF;box-shadow:0 0 0 3px rgba(63,124,223,.12)}
.frfp-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.frfp-wrapper select.fr-chosen{
  appearance:none; -webkit-appearance:none; -moz-appearance:none;
  background:#fff; border:1px solid #E6E6E6; border-radius:10px;
  padding:11px 12px; font-size:16px; line-height:1.3; width:100%; color:#111;
}
.frfp-wrapper select.fr-chosen:focus{border-color:#3F7CDF; outline:0; box-shadow:0 0 0 3px rgba(63,124,223,.12)}
.frfp-wrapper .chosen-container{font-size:16px}
.frfp-wrapper .chosen-container-single .chosen-single{
  height:44px; line-height:42px; padding:0 12px; background:#fff; color:#111;
  box-shadow:none !important; border:1px solid #E6E6E6; border-radius:10px;
}
.frfp-wrapper .chosen-container-active .chosen-single{
  border-color:#3F7CDF !important; box-shadow:0 0 0 3px rgba(63,124,223,.12) !important;
}
.frfp-wrapper .chosen-container .chosen-drop{
  border:1px solid #E6E6E6; border-radius:10px; box-shadow:0 6px 20px rgba(0,0,0,.06);
}
.frfp-wrapper .chosen-results li{padding:8px 10px}
.frfp-wrapper .chosen-results li.highlighted{background:#eef4ff;color:#1b3f8f}
.frfp-wrapper .chosen-search input[type=text]{border:1px solid #E6E6E6;border-radius:8px;padding:8px 10px;font-family:inherit}
.frfp-wrapper .chosen-search input[type=text]::placeholder{color:#A9A9A9}

/* Стили для мульти-селектов (категории новостей и интервью) */
.frfp-wrapper .chosen-container-multi .chosen-choices {
  border: 1px solid #E6E6E6 !important;
  border-radius: 10px !important;
  background: #fff !important;
  padding: 4px 8px !important;
  min-height: 44px !important;
  box-shadow: none !important;
  font-size: 16px !important;
  background-image: none !important;
}

.frfp-wrapper .chosen-container-multi.chosen-container-active .chosen-choices {
  border-color: #3F7CDF !important;
  box-shadow: 0 0 0 3px rgba(63,124,223,.12) !important;
}

.frfp-wrapper .chosen-container-multi .chosen-choices li.search-field input[type=text] {
  font-family: inherit !important;
  font-size: 16px !important;
  color: #111 !important;
  height: 32px !important;
  padding: 4px 8px !important;
  margin: 0 !important;
}

.frfp-wrapper .chosen-container-multi .chosen-choices li.search-choice {
  background: #EEF4FF !important;
  border: 1px solid #D6E6FF !important;
  border-radius: 8px !important;
  padding: 6px 24px 6px 10px !important;
  margin: 4px 4px 4px 0 !important;
  font-size: 14px !important;
  line-height: 1.3 !important;
  color: #1b3f8f !important;
  box-shadow: none !important;
  background-image: none !important;
}

.frfp-wrapper .chosen-container-multi .chosen-choices li.search-choice .search-choice-close {
  top: 8px !important;
  right: 6px !important;
  background: none !important;
  font-size: 16px !important;
  color: #1b3f8f !important;
  opacity: 0.7;
}

.frfp-wrapper .chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover {
  opacity: 1;
}

.frfp-wrapper .chosen-container-multi .chosen-choices li.search-choice .search-choice-close::before {
  content: "×";
  display: block;
  width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
}

/* Стили для выпадающего списка мульти-селекта */
.frfp-wrapper .chosen-container .chosen-drop {
  border: 1px solid #E6E6E6 !important;
  border-radius: 10px !important;
  box-shadow: 0 6px 20px rgba(0,0,0,.06) !important;
  margin-top: 4px !important;
}

.frfp-wrapper .chosen-container .chosen-results {
  padding: 8px !important;
}

.frfp-wrapper .chosen-container .chosen-results li {
  padding: 8px 12px !important;
  border-radius: 6px !important;
  font-size: 14px !important;
  line-height: 1.4 !important;
}

.frfp-wrapper .chosen-container .chosen-results li.highlighted {
  background: #eef4ff !important;
  color: #1b3f8f !important;
}

.frfp-wrapper .chosen-container .chosen-results li.result-selected {
  background: #f0f0f0 !important;
  color: #666 !important;
}


.frfp-file{display:block;border:1px dashed #E6E6E6;border-radius:10px;padding:18px;text-align:center;cursor:pointer;color:#3b3b3b;margin-bottom:10px;background:#fff;position:relative}
.frfp-file span{color:#A9A9A9}
.frfp-file input{display:none}
.frfp-file.drag-over{border-color:#3F7CDF;background:#f8fbff}
.frfp-hint{margin-top:8px;color:#A9A9A9}
.frfp-file-chip{
  display:none; align-items:center; gap:8px;
  border:1px solid #D6E6FF; background:#EEF4FF; border-radius:10px;
  padding:8px 12px; margin:8px 0; width:max-content;
  overflow-wrap:anywhere; word-break:break-word;
}
.frfp-file-chip-name{font-size:14px; line-height:1.2; color:#1b3f8f; white-space:nowrap; max-width:60vw; overflow:hidden; text-overflow:ellipsis}
.frfp-file-chip-x{
  display:inline-flex; align-items:center; justify-content:center;
  width:16px; height:16px; margin-left:4px; font-size:16px; line-height:1; color:#1b3f8f; cursor:pointer; user-select:none;
}
.frfp-editor{overflow:hidden;background:#fff}
.frfp-toolbar{display:flex;gap:8px;padding:8px;border-bottom:1px solid #E6E6E6;flex-wrap:wrap;background:#f7f7f7;position:sticky;top:0;z-index:12}
.frfp-toolbar .frfp-btn,
.frfp-toolbar .frfp-btn:hover,
.frfp-toolbar .frfp-btn:focus,
.frfp-toolbar .frfp-btn:active{
  all:unset;
  display:inline-flex; align-items:center; justify-content:center;
  min-width:36px; height:36px; padding:4px 8px;
  background:#fff; border:1px solid #E6E6E6; border-radius:8px;
  color:#1c1c1c; font-size:16px; font-weight:500; line-height:1; text-decoration:none; box-shadow:none; cursor:pointer;
}
.frfp-toolbar .frfp-btn b{font-weight:700}
.frfp-toolbar .frfp-btn i{font-style:italic}
.frfp-toolbar .frfp-btn u{text-decoration:underline}
.frfp-toolbar .frfp-format-select{
  -webkit-appearance:none; -moz-appearance:none; appearance:none;
  display:inline-block; flex:0 0 auto; width:auto !important; max-width:220px; min-width:170px;
  height:36px; min-height:36px; box-sizing:border-box;
  padding:0 34px 0 10px;
  background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%231C1C1C' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center;
  border:1px solid #E6E6E6; border-radius:8px;
  color:#1c1c1c; font-size:14px; line-height:1.2; outline:none;
  vertical-align:middle;
}
.frfp-toolbar .frfp-format-select:focus{border-color:#3F7CDF;box-shadow:0 0 0 3px rgba(63,124,223,.12)}
.frfp-editor-area{min-height:220px;padding:12px;background:#fff;font-size:16px;color:#111;overflow-wrap:anywhere;word-break:break-word}
.frfp-editor-area b, .frfp-editor-area strong {font-weight:600}
.frfp-editor-area i, .frfp-editor-area em {font-style:italic}
.frfp-editor-area u {text-decoration: underline}
.frfp-editor-area.drag-over{outline:2px dashed #3F7CDF}
.frfp-counter{padding:8px;border-top:1px solid #E6E6E6;font-size:14px;color:#666;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.frfp-autosave-status{font-size:13px;color:#666}
.frfp-autosave-status.is-saving{color:#1b3f8f}
.frfp-autosave-status.is-error{color:#E84C22}
.frfp-editor-hint{margin-top:10px;color:#666;font-size:14px;line-height:1.5}
.frfp-ai-inline-btn{all:unset;display:inline-flex;align-items:center;justify-content:center;padding:6px 10px;background:rgba(255,255,255,.12);border-radius:8px;cursor:pointer;font-size:13px;line-height:1.2;white-space:nowrap}
.frfp-ai-inline-btn:hover,.frfp-ai-inline-btn:focus{background:rgba(255,255,255,.2)}
.frfp-chips{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px;overflow-wrap:anywhere;word-break:break-word}
.frfp-chip{display:inline-flex;align-items:center;gap:8px;border:1px solid #D6E6FF;background:#EEF4FF;border-radius:10px;padding:8px 12px}
.frfp-chip-text{font-size:14px;line-height:1.2;color:#1b3f8f}
.frfp-chip-x{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;margin-left:6px;font-size:16px;line-height:1;color:#1b3f8f;cursor:pointer;user-select:none}
.frfp-chip-x:focus{outline:2px solid rgba(63,124,223,.25); outline-offset:2px}
.frfp-notice{background:#fff8e6;border:1px solid #ffe2a8;border-radius:10px;padding:12px}
.upload-placeholder{border:1px dashed #E6E6E6;border-radius:10px;padding:10px;margin:10px 0;background:#fff}
.progress-container{background:#f0f0f0;height:6px;border-radius:6px;overflow:hidden}
.progress-container .progress-bar{height:6px;width:0;background:#3F7CDF}
.frfp-publish-date{margin-bottom:10px}
.frfp-actions{display:flex;gap:16px;flex-wrap:wrap;margin:16px 0}

.frfp-actions-buttons{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:center;
  margin-top:16px;
}
.frfp-actions-buttons .frfp-submit[disabled],
.frfp-actions-buttons .frfp-save-draft[disabled]{opacity:.65;cursor:not-allowed}
.frfp-editor--mobile .frfp-toolbar{gap:6px;overflow-x:auto;overflow-y:hidden;flex-wrap:nowrap;-webkit-overflow-scrolling:touch;padding-bottom:10px}
.frfp-editor--mobile .frfp-toolbar .frfp-btn,
.frfp-editor--mobile .frfp-toolbar .frfp-format-select{min-height:44px;height:44px}
.frfp-editor--mobile .frfp-toolbar .frfp-btn{min-width:44px;font-size:18px}
.frfp-editor--mobile .frfp-editor-area{min-height:260px;font-size:16px}
.frfp-editor--mobile .frfp-file{padding:14px}
.frfp-editor--mobile .frfp-file span{display:block}
.frfp-ai-areas-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-top:12px;margin-bottom:14px}
.frfp-ai-areas-btn{display:inline-flex;align-items:center;justify-content:center;padding:10px 14px;border:1px solid #D6E6FF;background:#EEF4FF;color:#1b3f8f;border-radius:10px;cursor:pointer;font-size:14px;line-height:1.3;font-weight:600;text-decoration:none}
.frfp-ai-areas-btn[disabled]{opacity:.6;cursor:not-allowed}
.frfp-ai-title-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-top:12px}
.frfp-ai-text-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-top:12px}
.frfp-ai-title-btn{display:inline-flex;align-items:center;justify-content:center;padding:10px 14px;border:1px solid #D6E6FF;background:#EEF4FF;color:#1b3f8f;border-radius:10px;cursor:pointer;font-size:14px;line-height:1.3;font-weight:600;text-decoration:none}
.frfp-ai-title-btn[disabled]{opacity:.6;cursor:not-allowed}
.frfp-ai-text-btn{display:inline-flex;align-items:center;justify-content:center;padding:10px 14px;border:1px solid #D6E6FF;background:#EEF4FF;color:#1b3f8f;border-radius:10px;cursor:pointer;font-size:14px;line-height:1.3;font-weight:600;text-decoration:none}
.frfp-ai-text-btn[disabled]{opacity:.6;cursor:not-allowed}
@media (max-width:640px){
  .frfp-row{grid-template-columns:1fr}
  .frfp-actions-buttons{flex-direction:column;align-items:stretch}
  .frfp-actions-buttons > *{width:100%}
  .frfp-toolbar{padding:8px 8px 10px}
  .frfp-toolbar .frfp-format-select{min-width:150px}
}
@media (hover:none) and (pointer:coarse){
  .frfp-file.drag-over{border-color:#E6E6E6;background:#fff}
}


.frfp-events-field{margin-top:8px;}
.frfp-events-block{
  margin-top:4px;
  padding:12px 14px;
  border:1px solid #E6E6E6;
  border-radius:10px;
  background:#FCFCFC;
}
.frfp-events-title{
  margin:0 0 8px;
  color:#333;
}
.frfp-event-item{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:6px;
  margin-bottom:6px;
  font-size:14px;
  line-height:1.4;
}
.frfp-event-item:last-child{margin-bottom:0;}
.frfp-event-item input[type=checkbox]{margin:0;}
.frfp-event-link{
  text-decoration:underline;
  text-decoration-style:dotted;
  text-underline-offset:3px;
}
.frfp-event-dates{
  margin-left:2px;
  color:#777;
  font-size:13px;
}
/* подсветка для админа, когда выбранная дата публикации вне окна конкурса */
.frfp-event-item--warn{ opacity:.75; }
.frfp-event-item--warn .frfp-event-dates{ color:#E84C22; }

.frfp-input-error{ border-color:#E84C22 !important; box-shadow:0 0 0 3px rgba(232,76,34,.12) !important; }

.frfp-related-wrapper{ margin:24px 0; }

.frfp-related{
  display:flex;
  align-items:stretch;
  gap:20px;
  border:1px solid #E0E0E0;
  border-radius:15px;
  padding:32px;
  text-decoration:none;
  background:#fff;
  color:inherit;
}
.frfp-related-body{ flex:1 1 auto; min-width:0; }
.frfp-related-thumb{
  flex:0 0 40%;
  max-width:40%;
  margin:0;
  border-radius:12px;
  overflow:hidden;
}
.frfp-related-thumb img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
}
.frfp-related > p:first-child:empty{ display:none; margin:0; padding:0; }
.frfp-related-more{
  margin:0 0 10px !important;
  margin-block-end:20px !important;
  font-size:14px;
  line-height:1.4;
  color:#6B6B6B;
}
.frfp-related-title{
  margin:0 0 12px !important;
  margin-block-end:20px !important;
  font-weight:700;
  font-size:18px;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  text-overflow:ellipsis;
}
.frfp-related-excerpt{
  margin:0 0 14px !important;
  margin-block-end:20px !important;
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
  text-overflow:ellipsis;
}
.frfp-related-link{
  margin:0 !important;
  margin-block-end:0 !important;
  margin-bottom:0 !important;
  padding-bottom:3px;
  text-decoration: underline !important;
  text-decoration-style: dotted !important;
  text-underline-offset: 8px !important;
  display:inline-flex;
  align-items:center;
}
.frfp-related-link-icon{
  margin-left:8px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:8px;
  height:8px;
}
.frfp-related-link-icon::before{
  content:"";
  width:8px;
  height:8px;
  display:block;
  background-repeat:no-repeat;
  background-size:contain;
  background-image:url("data:image/svg+xml,%3Csvg width='8' height='8' viewBox='0 0 8 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 8H1.67232V7.09605H6.45424L0 0.632769L0.632769 0L7.09605 6.45424V1.67232H8V8Z' fill='%231A1A1A'/%3E%3C/svg%3E");
}
.frfp-related-thumb-wrap{ display:none; }
.frfp-related:empty,
.frfp-related-wrapper:empty{ display:none; }

/* Стили для модального окна шаблонов */
.frfp-templates-backdrop{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.4);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:9999;
}
.frfp-templates-backdrop.is-open{ display:flex; }
.frfp-templates-modal{
  background:#fff;
  border-radius:16px;
  max-width:640px;
  width:100%;
  max-height:80vh;
  box-shadow:0 18px 40px rgba(0,0,0,.18);
  display:flex;
  flex-direction:column;
}
.frfp-templates-modal-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:16px 20px;
  border-bottom:1px solid #E6E6E6;
}
.frfp-templates-modal-title{ margin:0; font-size:18px; font-weight:600; }
.frfp-templates-close{
  all:unset;
  cursor:pointer;
  font-size:20px;
  line-height:1;
  padding:4px;
}
.frfp-templates-modal-body{
  padding:16px 20px 20px;
  display:flex;
  flex-direction:column;
  overflow-y:auto;
}

.frfp-templates-list{
  display:flex;
  flex-direction:column;
  gap:16px;
}

.frfp-template-item{
  padding:12px;
  border:1px solid #E0E0E0;
  border-radius:8px;
  cursor:pointer;
  transition:border-color 0.2s, background-color 0.2s;
}
.frfp-template-item:hover{
  border-color:#3F7CDF;
  background:#f5f7ff;
}
.frfp-template-item-title{
  margin:0 0 8px;
  font-weight:600;
  font-size:16px;
}
.frfp-template-item-content{
  margin:0;
  font-size:14px;
  color:#666;
  line-height:1.4;
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
  text-overflow:ellipsis;
}

.frfp-templates-empty{
  font-size:13px;
  color:#777;
  text-align:center;
  padding:20px 0;
}

.frfp-template-item-content *{
  margin:0;
  padding:0;
  font-size:14px;
  line-height:1.4;
}

/* Стили для выпадающих списков категорий новостей и интервью */
.frfp-news-categories-field,
.frfp-interview-categories-field {
  margin-top: 8px;
}

.frfp-news-categories-field select,
.frfp-interview-categories-field select {
  width: 100%;
}

.frfp-news-categories-field .fr-chosen,
.frfp-interview-categories-field .fr-chosen {
  width: 100% !important;
}

@media (max-width:640px){
  .frfp-related{ padding:20px; flex-direction:column; }
  .frfp-related-thumb{
    order:0;
    max-width:100%;
    width:100%;
    margin-bottom:12px;
  }
  .frfp-related-body{ order:1; }
  .frfp-related-more{ font-size:13px; margin-bottom:6px !important; margin-block-end:6px !important; }
  .frfp-related-title{ font-size:18px; }
  .frfp-related-excerpt{ -webkit-line-clamp:3; margin-bottom:8px !important; margin-block-end:8px !important; }
}

.frfp-related-backdrop{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.4);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:9999;
}
.frfp-related-backdrop.is-open{ display:flex; }
.frfp-related-modal{
  background:#fff;
  border-radius:16px;
  max-width:640px;
  width:100%;
  max-height:80vh;
  box-shadow:0 18px 40px rgba(0,0,0,.18);
  display:flex;
  flex-direction:column;
}
.frfp-related-modal-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:16px 20px;
  border-bottom:1px solid #E6E6E6;
}
.frfp-related-modal-title{ margin:0; font-size:18px; font-weight:600; }
.frfp-related-close{
  all:unset;
  cursor:pointer;
  font-size:20px;
  line-height:1;
  padding:4px;
}
.frfp-related-modal-body{
  padding:16px 20px 20px;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.frfp-related-search{ width:100%; margin-bottom:8px; }
.frfp-related-search input{
  width:100%;
  padding:8px 10px;
  border-radius:8px;
  border:1px solid #E0E0E0;
  font-size:14px;
}
.frfp-related-results{
  margin:0;
  padding:0;
  list-style:none;
  max-height:55vh;
  overflow:auto;
}
.frfp-related-empty{ font-size:13px; color:#777; }
.frfp-related-item{
  padding:10px 8px;
  border-radius:8px;
  border:1px solid transparent;
  cursor:pointer;
}
.frfp-related-item-title{
  margin:0 0 4px;
  font-weight:600;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.frfp-related-item-excerpt{
  margin:0;
  font-size:13px;
  color:#666;
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
  text-overflow:ellipsis;
}
.frfp-related-item-meta{
  margin-top:4px;
  font-size:12px;
  color:#999;
}
.frfp-related-item:hover{
  border-color:#3F7CDF;
  background:#f5f7ff;
}
