/* =============================================================
 * press-release.css — overrides on top of multistep-form.css
 * ============================================================= */

/* ---- TinyMCE wrapper -------------------------------------- */

/* Raw textarea — hide border when TinyMCE wraps it */
#pr-wrap #pr-content {
    min-height: 400px;
    font-size: 15px;
    line-height: 1.7;
}
#pr-wrap .wp-editor-wrap #pr-content {
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Tabs — standalone above the editor, not glued to it */
#pr-wrap .wp-editor-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    margin-bottom: 8px;
    background: transparent;
    border: none;
    border-radius: 0;
    min-height: unset;
}
#pr-wrap .wp-switch-editor {
    font-family: "Space Grotesk", sans-serif;
    font-size: 12px;
    font-weight: 500;
    padding: 0 12px;
    height: 30px;
    line-height: 30px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    color: #6b7280;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
#pr-wrap .wp-switch-editor:hover  { border-color: #9ca3af; color: #111827; }
#pr-wrap .wp-switch-editor.active { background: #111827; border-color: #111827; color: #fff; }

/* TinyMCE editor — rounded border, strip the mce-top-part shadow */
#pr-wrap .wp-editor-container {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
}
#pr-wrap .mce-top-part::before { box-shadow: none !important; }
#pr-wrap .mce-tinymce          { box-shadow: none !important; border: none !important; }
#pr-wrap .mce-edit-area iframe { min-height: 400px; }

/* Quicktags toolbar */
#pr-wrap #qt_pr-content_toolbar {
    background: #f9fafb;
    padding: 6px 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
#pr-wrap #qt_pr-content_toolbar input[type="button"] {
    font-family: "Space Grotesk", sans-serif;
    font-size: 11.5px;
    font-weight: 500;
    padding: 4px 8px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    background: #fff;
    color: #374151;
    cursor: pointer;
}
#pr-wrap #qt_pr-content_toolbar input[type="button"]:hover {
    border-color: #9ca3af;
    color: #111827;
}

/* ---- Error reuse from II ---------------------------------- */
/* ii-form-error is already defined in impact-interview.css.
 * If that sheet isn't loaded, define it here as fallback. */
.ii-form-error {
    display: none;
    margin-top: 16px;
    padding: 10px 14px;
    border-radius: 8px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    font-size: 13px;
    line-height: 1.5;
}
.ii-form-error.is-visible { display: block; }

/* ---- TinyMCE button state overrides (neutralise WP admin bleed) --- */
#pr-wrap .mce-widget.mce-btn,
#pr-wrap .mce-widget.mce-btn button,
#pr-wrap .mce-widget.mce-btn button:hover,
#pr-wrap .mce-widget.mce-btn button:focus,
#pr-wrap .mce-widget.mce-btn button:active,
#pr-wrap .mce-widget.mce-btn.mce-active,
#pr-wrap .mce-widget.mce-btn.mce-active button,
#pr-wrap .mce-widget.mce-btn.mce-active button:hover,
#pr-wrap .mce-widget.mce-btn.mce-active button:focus,
#pr-wrap .mce-widget.mce-btn.mce-active button:active,
#pr-wrap .mce-widget.mce-btn:focus,
#pr-wrap .mce-widget.mce-btn:focus button {
    background: transparent !important;
    color: #374151 !important;
    border-color: transparent !important;
    box-shadow: none !important;
    text-shadow: none !important;
    outline: none !important;
}

#pr-wrap .mce-widget.mce-btn:hover,
#pr-wrap .mce-widget.mce-btn:hover button {
    background: #f3f4f6 !important;
    color: #111827 !important;
}

#pr-wrap .mce-widget.mce-btn.mce-active {
    background: #e5e7eb !important;
}

/* ---- Hide quicktags toolbar in Visual mode ----------------
 * wp-tmce class is added to the wrap when Visual is active    */
#pr-wrap #wp-pr-content-wrap.tmce-active #qt_pr-content_toolbar {
    display: none !important;
}

/* ---- Override WP TinyMCE skin active/hover colour rules ----------- */
#pr-wrap .mce-btn.mce-active button,
#pr-wrap .mce-btn.mce-active:hover button,
#pr-wrap .mce-btn.mce-active i,
#pr-wrap .mce-btn.mce-active:hover i {
    color: #374151 !important;
}

/* ---- Kill red hover on mce-primary and any stray WP button styles - */
#pr-wrap .mce-widget.mce-btn.mce-primary,
#pr-wrap .mce-widget.mce-btn.mce-primary button,
#pr-wrap .mce-widget.mce-btn.mce-primary:hover,
#pr-wrap .mce-widget.mce-btn.mce-primary:hover button,
#pr-wrap .mce-widget.mce-btn.mce-primary i,
#pr-wrap .mce-widget.mce-btn.mce-primary:hover i,
#pr-wrap .mce-widget.mce-btn:hover i,
#pr-wrap .mce-widget.mce-btn:focus i {
    background: transparent !important;
    color: #111827 !important;
    box-shadow: none !important;
}

/* ---- Press-release media additions ----------------------- */
#pr-wrap .wp-editor-tools {
    display: flex;
    flex-direction: row !important;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    margin-bottom: 8px;
    padding: 0 !important;
    width: 100%;
    box-sizing: border-box;
}
#pr-wrap .ft-editor-tools {
    order: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 !important;
    padding: 0 !important;
}
#pr-wrap .wp-editor-tabs {
    order: 2;
    margin: 0 12.5px 0 auto;
    float: none;
}
#pr-wrap .wp-switch-editor {
    float: none !important;
    position: static !important;
    top: auto !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}
#pr-wrap .wp-editor-container {
    order: 3;
    flex: 0 0 100%;
    width: 100%;
    clear: both;
}
.ft-insert-media {
    height: 30px;
    min-height: 30px;
    padding: 0 12px;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    background: #fff !important;
    color: #374151 !important;
    font-family: "Space Grotesk", sans-serif;
    font-size: 12px;
    font-weight: 500;
    line-height: 28px;
    box-shadow: none !important;
    text-shadow: none !important;
    cursor: pointer;
}
.ft-insert-media:hover,
.ft-insert-media:focus,
.ft-insert-media:active {
    border-color: #9ca3af !important;
    background: #f9fafb !important;
    color: #111827 !important;
    outline: none !important;
}
.ft-publication-image {
    position: relative;
    border: 0.5px dashed #d1d5db;
    border-radius: 8px;
    background: #fff;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.ft-publication-image:hover { border-color: #9ca3af; }
.ft-publication-image.is-dragover {
    border-color: #111827;
    background: #f9fafb;
}
.ft-publication-image__input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
}
.ft-publication-image__ui {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 24px 16px;
    color: #9ca3af;
    text-align: center;
    pointer-events: none;
}
.ft-publication-image__text {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}
.ft-publication-image__hint {
    font-size: 11.5px;
    color: #9ca3af;
}
.ft-publication-image__preview {
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    position: relative;
    z-index: 2;
    pointer-events: auto;
}
.ft-publication-image__preview img {
    width: 96px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 6px;
    border: 0.5px solid #e5e7eb;
    background: #f9fafb;
    display: block;
    flex: 0 0 auto;
}
.ft-publication-image__meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ft-publication-image__filename {
    color: #374151;
    font-size: 12.5px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ft-publication-image__remove {
    align-self: flex-start;
    font-size: 11.5px;
    color: #dc2626;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    padding: 0;
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    z-index: 3;
}
.ft-publication-image__remove:hover,
.ft-publication-image__remove:focus,
.ft-publication-image__remove:active {
    background: none !important;
    color: #b91c1c !important;
    border: none !important;
    text-decoration: underline;
    outline: none;
}
.ft-modal-lock { overflow: hidden !important; }
.ft-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(17,24,39,0);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}
.ft-modal-overlay.is-visible { display: flex; }
.ft-modal-overlay.is-open { background: rgba(17,24,39,0.24); }
.ft-modal {
    background: #fff;
    border-radius: 16px;
    width: calc(100% - 32px);
    max-width: 480px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.ft-modal-overlay.is-open .ft-modal { opacity: 1; transform: translateY(0); }
.ft-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}
.ft-modal__title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}
.ft-modal__close {
    background: transparent !important;
    border: none !important;
    cursor: pointer;
    padding: 4px;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    box-shadow: none !important;
    -webkit-appearance: none;
    appearance: none;
}
.ft-modal__close:hover,
.ft-modal__close:focus,
.ft-modal__close:active {
    color: #374151 !important;
    background: #f3f4f6 !important;
    outline: none !important;
}
.ft-form__label {
    font-size: 12px;
    font-weight: 500;
    color: #374151;
}
.ft-form__file-wrap {
    position: relative;
    border: 0.5px dashed #d1d5db;
    border-radius: 8px;
    background: #fff;
    transition: border-color 0.15s ease;
}
.ft-form__file-wrap:hover { border-color: #9ca3af; }
.ft-form__file-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
}
.ft-form__file-ui {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 16px;
    color: #9ca3af;
    text-align: center;
    pointer-events: none;
}
.ft-form__file-text {
    font-size: 12.5px;
    color: #6b7280;
    font-weight: 500;
}
.ft-form__file-hint {
    font-size: 11px;
    color: #9ca3af;
}
.ft-form__footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 0.5px solid #f3f4f6;
}
.ft-form__btn {
    font-size: 13px;
    font-weight: 500;
    padding: 7px 16px;
    border-radius: 8px;
    cursor: pointer;
    border: 0.5px solid #e5e7eb;
    background: transparent;
    color: #6b7280;
    transition: border-color 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
}
.ft-form__btn:hover,
.ft-form__btn:focus,
.ft-form__btn:active {
    border-color: #9ca3af;
    color: #6b7280;
    background: transparent;
    outline: none;
}
.ft-form__btn--primary {
    background: #111827;
    color: #fff;
    border-color: #111827;
}
.ft-form__btn--primary:hover,
.ft-form__btn--primary:focus,
.ft-form__btn--primary:active {
    background: #1f2937;
    border-color: #1f2937;
    color: #fff;
}
.ft-form__btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}
.ft-media-modal {
    max-width: 760px;
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
}
.ft-media-modal__upload { margin-bottom: 12px; }
.ft-media-modal__error {
    margin: 0 0 12px;
    padding: 8px 12px;
    border-radius: 8px;
    background: #fef2f2;
    border: 0.5px solid #fca5a5;
    color: #b91c1c;
    font-size: 12.5px;
    line-height: 1.5;
}
.ft-media-search { margin-bottom: 12px; }
.ft-media-modal .ft-media-search input.ft-media-search__input[type="search"] {
    font-family: "Source Sans 3", sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    color: #111827;
    background: #fff;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    outline: 0;
    transition: border-color 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
    -webkit-font-smoothing: antialiased;
    box-shadow: none;
    margin: 0;
    display: block;
}
.ft-media-modal .ft-media-search input.ft-media-search__input[type="search"]:focus { border-color: #9ca3af; }
.ft-media-modal__grid {
    min-height: 190px;
    max-height: 420px;
    overflow: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
    gap: 10px;
    padding: 2px;
}
.ft-media-item {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px;
    background: #fff !important;
    padding: 6px;
    cursor: pointer;
    text-align: left;
    box-shadow: none !important;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ft-media-item:hover,
.ft-media-item:focus {
    border-color: #9ca3af !important;
    outline: none;
}
.ft-media-item.is-selected {
    border-color: #16a34a !important;
    box-shadow: 0 0 0 1px #16a34a !important;
}
.ft-media-item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    border-radius: 5px;
    background: #f9fafb;
}
.ft-media-item span {
    min-height: 20px;
    color: #374151;
    font-size: 11.5px;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.ft-media-empty {
    grid-column: 1 / -1;
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 13px;
    border: 0.5px dashed #e5e7eb;
    border-radius: 8px;
    gap: 8px;
}
.ft-media-loader {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    color: #9ca3af;
    font-size: 12.5px;
}
.ft-media-loader__hint { color: #9ca3af; }
.ft-media-spinner {
    width: 15px;
    height: 15px;
    border: 2px solid #e5e7eb;
    border-top-color: #111827;
    border-radius: 50%;
    animation: ft-media-spin 0.7s linear infinite;
    flex: 0 0 auto;
}
@keyframes ft-media-spin {
    to { transform: rotate(360deg); }
}
.ft-media-tooltip {
    position: fixed;
    z-index: 1000000;
    max-width: 260px;
    padding: 6px 8px;
    border-radius: 6px;
    background: #111827;
    color: #fff;
    font-size: 11.5px;
    line-height: 1.35;
    pointer-events: none;
    opacity: 0;
    transform: translateY(2px);
    transition: opacity 0.08s ease, transform 0.08s ease;
}
.ft-media-tooltip.is-visible {
    opacity: 1;
    transform: translateY(0);
}
