/*

Webplus Frontend Editor – Komplett & Temasäkrad Stilmall (assets/wpfe-portal.css)

INNEHÅLL:

Designvariabler & Basisolering (Temat styr bredd, typsnitt & yttre ram)

Topprubrik (följer temats h3 & profilfärg på ikon), Flikar & Meddelanderutor

Statusfilter, Verktygsrad, Sökfält & Kontrastsäkrade Knappar

Formulärfält, Rutnät, Kryssrutor & Snabbvalskort (Inställningar)

Dropdown-menyer (Enkelval & Flerval – skyddade mot temats -stilar)

Svensk Kalender- & Tidsväljare

Snabb Rich-Text-Editor & Blocklåsskydd

Responsiva Tabeller, Sortering & Status-badges

Mediabibliotek: Uppladdningszon, 2-kolumns Arbetsyta & Mappträd

Mediarutnät, Bildkort & Färgkodade Filtypskort (PDF, Dokument, Video m.fl.)

Interaktiv Beskärningsscen (16:9, 4:3 m.fl.) & Filförhandsgranskning

Modaler & Helskärms App-läge för WordPress Blockredigerare (Gutenberg)
*/

/* ==========================================================================

DESIGNVARIABLER & BASISOLERING (TEMAT STYR BREDD, TYPSNITT & YTTRE RAM)
========================================================================== */
.wpfe-portal-wrap,
.wpfe-modal-backdrop,
.wpfe-app-modal-backdrop {
--wpfe-bg-card: #ffffff;
--wpfe-surface-muted: #f8fafc;
--wpfe-surface-hover: #f1f5f9;
--wpfe-border: #e2e8f0;
--wpfe-border-strong: #cbd5e1;
--wpfe-text: #0f172a;
--wpfe-text-muted: #475569;
--wpfe-text-light: #64748b;
--wpfe-brand: var(--wpfe-theme-brand, var(--wp--preset--color--primary, var(--wpfe-accent-ink, #1d4ed8)));
--wpfe-accent: var(--wpfe-accent-ink, #1d4ed8);
--wpfe-accent-fg: var(--wpfe-accent-on-ink, #ffffff);
--wpfe-accent-soft: var(--wpfe-theme-accent-soft, #eff6ff);
--wpfe-accent-border: var(--wpfe-theme-accent-border, #bfdbfe);
--wpfe-danger: #dc2626;
--wpfe-danger-soft: #fef2f2;
--wpfe-danger-border: #fecaca;
--wpfe-success: #166534;
--wpfe-success-soft: #f0fdf4;
--wpfe-success-border: #bbf7d0;
--wpfe-radius-lg: 14px;
--wpfe-radius-md: 10px;
--wpfe-radius-sm: 8px;
--wpfe-shadow-pop: 0 12px 32px rgba(15, 23, 42, 0.15);

font-family: inherit;
color: var(--wpfe-text);
box-sizing: border-box;
line-height: 1.5;
text-align: left;


}

.wpfe-modal-backdrop,
.wpfe-app-modal-backdrop {
font-family: var(--wp--preset--font-family--body, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif);
}

.wpfe-portal-wrap *,
.wpfe-portal-wrap *::before,
.wpfe-portal-wrap *::after,
.wpfe-modal-backdrop *,
.wpfe-modal-backdrop *::before,
.wpfe-modal-backdrop *::after,
.wpfe-app-modal-backdrop *,
.wpfe-app-modal-backdrop *::before,
.wpfe-app-modal-backdrop *::after {
box-sizing: border-box;
}

/* Låt WordPress-temat / gruppblocket styra bredd, marginaler och eventuell inramning */
.wpfe-portal-wrap {
width: 100%;
max-width: 100%;
margin: 0;
padding: 0;
}

.wpfe-fa-icon {
display: inline-block;
line-height: 1 !important;
vertical-align: -0.08em;
flex-shrink: 0;
}

/* ==========================================================================
2. YTTRE BEHÅLLARE (UTAN RAM), TOPPRUBRIK, FLIKAR & MEDDELANDERUTOR
========================================================================== */
.wpfe-portal-card {
background: transparent !important;
border: none !important;
border-radius: 0 !important;
padding: 0 !important;
box-shadow: none !important;
}

.wpfe-header-bar {
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: 16px;
flex-wrap: wrap;
margin-bottom: 18px !important;
}

/* Huvudrubriken följer temats h3-typsnitt, storlek, vikt och färg + temats profilfärg på ikonen */
h3.wpfe-section-heading,
.wpfe-section-heading {
margin: 0 !important;
padding: 0 !important;
font-family: var(--wpfe-theme-h3-font, inherit);
font-size: var(--wpfe-theme-h3-size, 1.5rem);
font-weight: var(--wpfe-theme-h3-weight, 700);
line-height: var(--wpfe-theme-h3-lh, 1.25);
letter-spacing: var(--wpfe-theme-h3-ls, normal);
text-transform: var(--wpfe-theme-h3-tt, none);
color: var(--wpfe-theme-h3-color, inherit) !important;
display: flex !important;
align-items: center !important;
gap: 10px !important;
}

.wpfe-section-heading > span {
font: inherit;
color: inherit;
letter-spacing: inherit;
text-transform: inherit;
}

.wpfe-section-heading .wpfe-fa-icon,
.wpfe-editor-box-heading .wpfe-fa-icon {
color: var(--wpfe-brand) !important;
}

.wpfe-section-heading .wpfe-fa-icon {
font-size: 0.88em !important;
}

.wpfe-section-subtitle {
margin: 6px 0 0 0 !important;
padding: 0 !important;
font-size: 14.5px !important;
font-weight: 400 !important;
color: var(--wpfe-text-muted) !important;
line-height: 1.5 !important;
}

.wpfe-icon-circle {
width: 52px;
height: 52px;
border-radius: 50%;
background: var(--wpfe-accent-soft);
color: var(--wpfe-brand);
display: inline-flex;
align-items: center;
justify-content: center;
margin: 0 auto 14px auto;
}

/* Huvudflikar (Sidor | Artiklar | Bildbank | Inställningar) */
.wpfe-subtabs {
display: flex !important;
align-items: center !important;
gap: 6px !important;
flex-wrap: wrap !important;
background: #f1f5f9 !important;
border: 1px solid var(--wpfe-border) !important;
border-radius: 11px !important;
padding: 5px !important;
margin: 0 0 20px 0 !important;
}

.wpfe-subtab {
appearance: none !important;
-webkit-appearance: none !important;
background: transparent !important;
border: 1px solid transparent !important;
margin: 0;
padding: 9px 16px !important;
font-family: inherit !important;
font-size: 14px !important;
font-weight: 700 !important;
line-height: 1.3 !important;
text-transform: none !important;
letter-spacing: normal !important;
color: var(--wpfe-text-muted) !important;
cursor: pointer !important;
display: inline-flex !important;
align-items: center !important;
gap: 8px !important;
border-radius: 8px !important;
transition: color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
text-decoration: none !important;
box-shadow: none !important;
}

.wpfe-subtab[data-wpfe-tab="settings"] {
margin-left: auto;
}

@media (max-width: 720px) {
.wpfe-subtab[data-wpfe-tab="settings"] {
margin-left: 0;
}
}

.wpfe-subtab:hover {
color: var(--wpfe-text) !important;
background: rgba(255, 255, 255, 0.65) !important;
}

.wpfe-subtab.active {
background: #ffffff !important;
color: var(--wpfe-accent) !important;
border-color: var(--wpfe-border) !important;
box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06) !important;
}

.wpfe-subtab.active .wpfe-fa-icon {
color: var(--wpfe-brand) !important;
}

.wpfe-tab-panel {
margin: 0 !important;
padding: 0 !important;
}

/* Meddelanderutor & Notiser */
.wpfe-placeholder-notice,
.wpfe-notice {
display: flex;
align-items: center;
justify-content: space-between;
gap: 10px;
flex-wrap: wrap;
padding: 12px 15px !important;
border-radius: var(--wpfe-radius-md) !important;
font-size: 13.5px !important;
font-weight: 600 !important;
margin: 0 0 16px 0 !important;
border: 1px solid var(--wpfe-border-strong) !important;
background: var(--wpfe-surface-muted) !important;
color: var(--wpfe-text) !important;
}

.wpfe-notice.is-info {
background: var(--wpfe-accent-soft) !important;
border-color: var(--wpfe-accent-border) !important;
color: var(--wpfe-accent) !important;
}

.wpfe-notice.is-success {
background: var(--wpfe-success-soft) !important;
border-color: var(--wpfe-success-border) !important;
color: var(--wpfe-success) !important;
}

.wpfe-notice.is-error {
background: var(--wpfe-danger-soft) !important;
border-color: var(--wpfe-danger-border) !important;
color: #991b1b !important;
}

/* ==========================================================================
3. STATUSFILTER, VERKTYGSRAD, SÖKFÄLT & KONTRASTSÄKRADE KNAPPAR
========================================================================== */
.wpfe-status-filters {
display: flex !important;
align-items: center !important;
flex-wrap: wrap !important;
gap: 6px !important;
padding: 10px 14px !important;
background: var(--wpfe-surface-muted) !important;
border: 1px solid var(--wpfe-border) !important;
border-radius: var(--wpfe-radius-md) !important;
margin: 0 0 14px 0 !important;
}

.wpfe-filter-link {
appearance: none !important;
-webkit-appearance: none !important;
background: transparent !important;
border: 1px solid transparent !important;
padding: 5px 10px !important;
margin: 0 !important;
border-radius: 7px !important;
font-family: inherit !important;
font-size: 13px !important;
font-weight: 600 !important;
line-height: 1.3 !important;
text-transform: none !important;
letter-spacing: normal !important;
color: var(--wpfe-text-muted) !important;
cursor: pointer !important;
display: inline-flex !important;
align-items: center !important;
gap: 5px !important;
transition: all 0.14s ease;
box-shadow: none !important;
text-decoration: none !important;
}

.wpfe-filter-link:hover {
color: var(--wpfe-text) !important;
background: #ffffff !important;
border-color: var(--wpfe-border) !important;
}

.wpfe-filter-link.is-active {
background: #ffffff !important;
color: var(--wpfe-accent) !important;
border-color: var(--wpfe-accent-border) !important;
font-weight: 700 !important;
box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05) !important;
}

.wpfe-filter-link.is-active .wpfe-filter-cnt {
color: var(--wpfe-accent) !important;
opacity: 0.85;
}

.wpfe-filter-cnt {
font-size: 12px !important;
color: var(--wpfe-text-light) !important;
font-weight: 600 !important;
}

.wpfe-filter-sep {
color: var(--wpfe-border-strong) !important;
font-size: 12px !important;
user-select: none;
}

.wpfe-toolbar-row {
display: flex !important;
align-items: center !important;
justify-content: space-between !important;
gap: 10px !important;
flex-wrap: wrap !important;
margin: 0 0 16px 0 !important;
}

.wpfe-search-wrap {
position: relative !important;
flex: 1 1 260px !important;
min-width: 220px !important;
}

.wpfe-search-icon {
position: absolute !important;
left: 12px !important;
top: 50% !important;
transform: translateY(-50%) !important;
color: var(--wpfe-text-light) !important;
pointer-events: none !important;
display: inline-flex !important;
align-items: center !important;
z-index: 2;
}

.wpfe-portal-wrap input.wpfe-search-input,
.wpfe-modal-backdrop input.wpfe-search-input,
.wpfe-search-input {
appearance: none !important;
-webkit-appearance: none !important;
width: 100% !important;
height: auto !important;
min-height: 38px !important;
padding: 8px 12px 8px 36px !important;
margin: 0 !important;
font-family: inherit !important;
font-size: 13.5px !important;
font-weight: 500 !important;
line-height: 1.4 !important;
color: var(--wpfe-text) !important;
background-color: var(--wpfe-surface-muted) !important;
border: 1px solid var(--wpfe-border-strong) !important;
border-radius: var(--wpfe-radius-sm) !important;
outline: none !important;
box-shadow: none !important;
transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.wpfe-portal-wrap input.wpfe-search-input:focus,
.wpfe-modal-backdrop input.wpfe-search-input:focus,
.wpfe-search-input:focus {
background-color: #ffffff !important;
border-color: var(--wpfe-accent) !important;
box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12) !important;
}

/* Blockknappar & Mini-knappar (WCAG-kontrastsäkras automatiskt av WebplusFE.prepareButtons) */
.wpfe-portal-wrap .wp-block-buttons,
.wpfe-modal-backdrop .wp-block-buttons {
display: inline-flex !important;
align-items: center !important;
flex-wrap: wrap !important;
gap: 8px !important;
}

.wpfe-portal-wrap .wp-block-button,
.wpfe-modal-backdrop .wp-block-button {
margin: 0 !important;
}

.wpfe-portal-wrap .wp-block-button__link,
.wpfe-modal-backdrop .wp-block-button__link {
display: inline-flex !important;
align-items: center !important;
justify-content: center !important;
gap: 7px !important;
font-family: inherit !important;
font-size: 14px !important;
font-weight: 700 !important;
line-height: 1.3 !important;
text-transform: none !important;
letter-spacing: normal !important;
padding: 10px 18px !important;
margin: 0 !important;
border-radius: var(--wpfe-radius-sm) !important;
cursor: pointer !important;
text-decoration: none !important;
transition: background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease !important;
}

.wpfe-portal-wrap .wp-block-button__link *,
.wpfe-modal-backdrop .wp-block-button__link * {
color: inherit !important;
}

.wpfe-portal-wrap .wp-block-button__link.wpfe-btn-sm,
.wpfe-modal-backdrop .wp-block-button__link.wpfe-btn-sm {
padding: 8px 14px !important;
font-size: 13px !important;
}

.wpfe-mini-btn,
a.wpfe-mini-btn,
button.wpfe-mini-btn,
label.wpfe-mini-btn {
appearance: none !important;
-webkit-appearance: none !important;
display: inline-flex !important;
align-items: center !important;
justify-content: center !important;
gap: 6px !important;
padding: 6px 11px !important;
margin: 0 !important;
font-family: inherit !important;
font-size: 12.5px !important;
font-weight: 700 !important;
line-height: 1.3 !important;
text-transform: none !important;
letter-spacing: normal !important;
color: #334155 !important;
background-color: #ffffff !important;
border: 1px solid var(--wpfe-border-strong) !important;
border-radius: 7px !important;
cursor: pointer !important;
text-decoration: none !important;
white-space: nowrap !important;
box-shadow: none !important;
transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.wpfe-mini-btn:hover,
a.wpfe-mini-btn:hover,
button.wpfe-mini-btn:hover,
label.wpfe-mini-btn:hover {
background-color: var(--wpfe-surface-hover) !important;
border-color: #94a3b8 !important;
color: var(--wpfe-text) !important;
text-decoration: none !important;
}

.wpfe-mini-btn.is-primary-soft {
background-color: var(--wpfe-accent-soft) !important;
border-color: var(--wpfe-accent-border) !important;
color: var(--wpfe-accent) !important;
}

.wpfe-mini-btn.is-primary-soft:hover {
background-color: var(--wpfe-accent) !important;
border-color: var(--wpfe-accent) !important;
color: var(--wpfe-accent-fg) !important;
}

.wpfe-mini-btn.is-danger {
background-color: var(--wpfe-danger-soft) !important;
border-color: var(--wpfe-danger-border) !important;
color: var(--wpfe-danger) !important;
}

.wpfe-mini-btn.is-danger:hover {
background-color: #fee2e2 !important;
border-color: #fca5a5 !important;
color: #991b1b !important;
}

.wpfe-mini-btn:disabled,
.wpfe-portal-wrap .wp-block-button__link:disabled,
.wpfe-modal-backdrop .wp-block-button__link:disabled {
opacity: 0.6 !important;
cursor: not-allowed !important;
}

/* ==========================================================================
4. FORMULÄRFÄLT, RUTNÄT, KRYSSRUTOR & SNABBVALSKORT
========================================================================== */
.wpfe-editor-box {
background: var(--wpfe-surface-muted) !important;
border: 1px solid var(--wpfe-border-strong) !important;
border-radius: var(--wpfe-radius-md) !important;
padding: 20px !important;
margin: 0 0 20px 0 !important;
}

.wpfe-editor-box-header {
display: flex !important;
justify-content: space-between !important;
align-items: center !important;
gap: 12px !important;
flex-wrap: wrap !important;
padding-bottom: 12px !important;
margin-bottom: 16px !important;
border-bottom: 1px solid var(--wpfe-border) !important;
}

.wpfe-editor-box-heading {
margin: 0 !important;
padding: 0 !important;
font-family: var(--wpfe-theme-h3-font, inherit);
font-size: 17px !important;
font-weight: 700 !important;
line-height: 1.3 !important;
color: var(--wpfe-theme-h3-color, var(--wpfe-text)) !important;
display: flex !important;
align-items: center !important;
gap: 8px !important;
}

.wpfe-grid {
display: grid !important;
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
gap: 14px !important;
margin-bottom: 14px !important;
}

.wpfe-grid-span-2 {
grid-column: span 2;
}

@media (max-width: 720px) {
.wpfe-grid-span-2 {
grid-column: span 1;
}
}

.wpfe-field {
display: flex !important;
flex-direction: column !important;
gap: 5px !important;
margin: 0 0 12px 0 !important;
}

.wpfe-grid > .wpfe-field {
margin-bottom: 0 !important;
}

.wpfe-field > label {
font-size: 12.5px !important;
font-weight: 700 !important;
line-height: 1.35 !important;
color: #334155 !important;
display: inline-flex !important;
align-items: center !important;
gap: 5px !important;
margin: 0 !important;
padding: 0 !important;
}

/* Enhetlig fältstyling i både portalen och modaler i document.body */
.wpfe-portal-wrap input[type="text"]:not(.wpfe-search-input),
.wpfe-portal-wrap input[type="number"],
.wpfe-portal-wrap input[type="url"],
.wpfe-portal-wrap input[type="email"],
.wpfe-portal-wrap textarea,
.wpfe-modal-backdrop input[type="text"]:not(.wpfe-search-input),
.wpfe-modal-backdrop input[type="number"],
.wpfe-modal-backdrop input[type="url"],
.wpfe-modal-backdrop input[type="email"],
.wpfe-modal-backdrop textarea,
.wpfe-clean-input {
appearance: none !important;
-webkit-appearance: none !important;
width: 100% !important;
min-height: 38px !important;
padding: 9px 12px !important;
font-family: inherit !important;
font-size: 14px !important;
font-weight: 400 !important;
line-height: 1.45 !important;
color: var(--wpfe-text) !important;
background-color: #f8fafc !important;
border: 1px solid #cbd5e1 !important;
border-radius: 8px !important;
outline: none !important;
box-shadow: none !important;
margin: 0 !important;
transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.wpfe-editor-box input[type="text"]:not(.wpfe-search-input),
.wpfe-editor-box input[type="number"],
.wpfe-editor-box textarea {
background-color: #ffffff !important;
}

.wpfe-portal-wrap input[type="text"]:not(.wpfe-search-input):focus,
.wpfe-portal-wrap input[type="number"]:focus,
.wpfe-portal-wrap input[type="url"]:focus,
.wpfe-portal-wrap input[type="email"]:focus,
.wpfe-portal-wrap textarea:focus,
.wpfe-modal-backdrop input[type="text"]:not(.wpfe-search-input):focus,
.wpfe-modal-backdrop input[type="number"]:focus,
.wpfe-modal-backdrop input[type="url"]:focus,
.wpfe-modal-backdrop input[type="email"]:focus,
.wpfe-modal-backdrop textarea:focus,
.wpfe-clean-input:focus {
background-color: #ffffff !important;
border-color: var(--wpfe-accent) !important;
box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12) !important;
}

.wpfe-portal-wrap textarea,
.wpfe-modal-backdrop textarea {
resize: vertical !important;
min-height: 68px !important;
}

.wpfe-checkbox-label {
display: inline-flex !important;
align-items: center !important;
gap: 8px !important;
font-size: 13.5px !important;
font-weight: 500 !important;
color: var(--wpfe-text) !important;
cursor: pointer !important;
user-select: none;
margin: 0 !important;
}

.wpfe-portal-wrap input[type="checkbox"],
.wpfe-modal-backdrop input[type="checkbox"] {
appearance: auto !important;
-webkit-appearance: checkbox !important;
width: 16px !important;
height: 16px !important;
min-height: 16px !important;
padding: 0 !important;
margin: 0 !important;
accent-color: var(--wpfe-accent);
cursor: pointer !important;
flex-shrink: 0;
}

/* Utvald bild i snabbredigerare */
.wpfe-thumb-preview-row {
display: flex !important;
align-items: center !important;
gap: 10px !important;
flex-wrap: wrap !important;
}

.wpfe-thumb-preview-box {
position: relative;
display: inline-flex;
align-items: center;
gap: 6px;
padding: 4px;
background: #ffffff;
border: 1px solid var(--wpfe-border-strong);
border-radius: 8px;
}

.wpfe-thumb-preview-box img {
width: 58px !important;
height: 42px !important;
object-fit: cover !important;
border-radius: 5px !important;
display: block !important;
margin: 0 !important;
}

/* Snabbvalskort under Inställningar */
.wpfe-preset-cards-row {
display: grid !important;
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
gap: 10px !important;
}

.wpfe-preset-card {
appearance: none !important;
-webkit-appearance: none !important;
text-align: left !important;
padding: 12px 14px !important;
margin: 0 !important;
background: #ffffff !important;
border: 1px solid var(--wpfe-border-strong) !important;
border-radius: 10px !important;
cursor: pointer !important;
display: flex !important;
flex-direction: column !important;
gap: 4px !important;
font-family: inherit !important;
text-transform: none !important;
letter-spacing: normal !important;
transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
box-shadow: none !important;
}

.wpfe-preset-card:hover {
border-color: var(--wpfe-accent-border) !important;
background: #f8fafc !important;
}

.wpfe-preset-card.is-selected {
border-color: var(--wpfe-accent) !important;
background: var(--wpfe-accent-soft) !important;
box-shadow: 0 0 0 2px rgba(29, 78, 216, 0.12) !important;
}

.wpfe-preset-card-title {
font-size: 13.5px !important;
font-weight: 800 !important;
color: var(--wpfe-text) !important;
display: inline-flex !important;
align-items: center !important;
gap: 6px !important;
}

.wpfe-preset-card-title .wpfe-fa-icon {
color: var(--wpfe-brand) !important;
}

.wpfe-preset-card-desc {
font-size: 12px !important;
font-weight: 500 !important;
color: var(--wpfe-text-muted) !important;
}

/* ==========================================================================
5. DROPDOWN-MENYER (SKYDDADE MOT WORDPRESS -BLOCKSTILAR)
========================================================================== */
details.wpfe-dropdown {
position: relative !important;
width: 100% !important;
margin: 0 !important;
padding: 0 !important;
border: none !important;
background: transparent !important;
}

details.wpfe-dropdown > summary {
list-style: none !important;
display: flex !important;
align-items: center !important;
justify-content: space-between !important;
gap: 8px !important;
width: 100% !important;
min-height: 38px !important;
padding: 8px 12px !important;
margin: 0 !important;
font-family: inherit !important;
font-size: 13.5px !important;
font-weight: 600 !important;
line-height: 1.4 !important;
color: var(--wpfe-text) !important;
background-color: #ffffff !important;
border: 1px solid var(--wpfe-border-strong) !important;
border-radius: var(--wpfe-radius-sm) !important;
cursor: pointer !important;
user-select: none;
outline: none !important;
transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

details.wpfe-dropdown > summary::-webkit-details-marker,
details.wpfe-dropdown > summary::marker,
details.wpfe-dropdown > summary::before,
details.wpfe-dropdown > summary::after {
display: none !important;
content: none !important;
}

details.wpfe-dropdown[open] > summary {
border-color: var(--wpfe-accent) !important;
box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12) !important;
}

.wpfe-dropdown-label {
display: inline-flex !important;
align-items: center !important;
gap: 6px !important;
overflow: hidden !important;
text-overflow: ellipsis !important;
white-space: nowrap !important;
color: var(--wpfe-text) !important;
}

.wpfe-dropdown-label.is-placeholder {
color: var(--wpfe-text-light) !important;
font-weight: 500 !important;
}

.wpfe-dropdown-arrow {
color: var(--wpfe-text-light) !important;
display: inline-flex !important;
align-items: center !important;
flex-shrink: 0 !important;
transition: transform 0.15s ease;
}

details.wpfe-dropdown[open] .wpfe-dropdown-arrow {
transform: rotate(180deg);
}

.wpfe-dropdown-menu {
position: absolute !important;
left: 0 !important;
right: 0 !important;
top: calc(100% + 5px) !important;
z-index: 120 !important;
background: #ffffff !important;
border: 1px solid var(--wpfe-border-strong) !important;
border-radius: var(--wpfe-radius-sm) !important;
box-shadow: var(--wpfe-shadow-pop) !important;
padding: 5px !important;
margin: 0 !important;
max-height: 270px !important;
overflow-y: auto !important;
}

.wpfe-singleselect-item {
appearance: none !important;
-webkit-appearance: none !important;
width: 100% !important;
text-align: left !important;
background: transparent !important;
border: none !important;
border-radius: 6px !important;
padding: 8px 10px !important;
margin: 0 !important;
font-family: inherit !important;
font-size: 13px !important;
font-weight: 600 !important;
line-height: 1.35 !important;
text-transform: none !important;
letter-spacing: normal !important;
color: var(--wpfe-text) !important;
cursor: pointer !important;
display: flex !important;
align-items: center !important;
justify-content: space-between !important;
gap: 8px !important;
box-shadow: none !important;
}

.wpfe-singleselect-item:hover {
background: var(--wpfe-surface-hover) !important;
}

.wpfe-singleselect-item.is-selected {
background: var(--wpfe-accent-soft) !important;
color: var(--wpfe-accent) !important;
font-weight: 700 !important;
}

.wpfe-multiselect-option {
display: flex !important;
align-items: center !important;
gap: 8px !important;
padding: 7px 9px !important;
margin: 0 !important;
border-radius: 6px !important;
font-size: 13px !important;
font-weight: 600 !important;
color: var(--wpfe-text) !important;
cursor: pointer !important;
}

.wpfe-multiselect-option:hover {
background: var(--wpfe-surface-hover) !important;
}

/* ==========================================================================
6. SVENSK KALENDER- & TIDSVÄLJARE
========================================================================== */
.wpfe-custom-dt-menu {
position: absolute !important;
left: 0 !important;
top: calc(100% + 5px) !important;
z-index: 125 !important;
width: 280px !important;
background: #ffffff !important;
border: 1px solid var(--wpfe-border-strong) !important;
border-radius: 10px !important;
box-shadow: var(--wpfe-shadow-pop) !important;
padding: 12px !important;
}

.wpfe-dt-header {
display: flex !important;
align-items: center !important;
justify-content: space-between !important;
margin-bottom: 8px !important;
}

.wpfe-dt-month-label {
font-size: 13.5px !important;
font-weight: 800 !important;
color: var(--wpfe-text) !important;
}

.wpfe-dt-nav-btn {
appearance: none !important;
-webkit-appearance: none !important;
background: var(--wpfe-surface-muted) !important;
border: 1px solid var(--wpfe-border) !important;
border-radius: 6px !important;
width: 28px !important;
height: 28px !important;
display: inline-flex !important;
align-items: center !important;
justify-content: center !important;
cursor: pointer !important;
color: var(--wpfe-text) !important;
padding: 0 !important;
margin: 0 !important;
box-shadow: none !important;
}

.wpfe-dt-nav-btn:hover {
background: var(--wpfe-surface-hover) !important;
}

.wpfe-dt-weekdays,
.wpfe-dt-days-grid {
display: grid !important;
grid-template-columns: repeat(7, 1fr) !important;
gap: 3px !important;
text-align: center !important;
}

.wpfe-dt-weekdays span {
font-size: 11px !important;
font-weight: 700 !important;
color: var(--wpfe-text-light) !important;
padding: 4px 0 !important;
}

.wpfe-dt-day-btn {
appearance: none !important;
-webkit-appearance: none !important;
background: transparent !important;
border: 1px solid transparent !important;
border-radius: 6px !important;
height: 32px !important;
font-family: inherit !important;
font-size: 12.5px !important;
font-weight: 600 !important;
color: var(--wpfe-text) !important;
cursor: pointer !important;
padding: 0 !important;
margin: 0 !important;
box-shadow: none !important;
}

.wpfe-dt-day-btn:hover {
background: var(--wpfe-surface-hover) !important;
}

.wpfe-dt-day-btn.is-today {
border-color: var(--wpfe-accent-border) !important;
color: var(--wpfe-accent) !important;
font-weight: 800 !important;
}

.wpfe-dt-day-btn.is-selected {
background: var(--wpfe-accent) !important;
color: var(--wpfe-accent-fg) !important;
font-weight: 800 !important;
}

.wpfe-dt-time-row {
display: flex !important;
align-items: center !important;
justify-content: space-between !important;
margin-top: 10px !important;
padding-top: 10px !important;
border-top: 1px solid var(--wpfe-border) !important;
}

.wpfe-dt-time-select {
padding: 4px 8px !important;
border: 1px solid var(--wpfe-border-strong) !important;
border-radius: 6px !important;
font-family: inherit !important;
font-size: 13px !important;
font-weight: 700 !important;
background: var(--wpfe-surface-muted) !important;
color: var(--wpfe-text) !important;
}

.wpfe-dt-footer {
display: flex !important;
align-items: center !important;
justify-content: space-between !important;
gap: 6px !important;
margin-top: 10px !important;
padding-top: 10px !important;
border-top: 1px solid var(--wpfe-border) !important;
}

.wpfe-dt-action-btn {
appearance: none !important;
-webkit-appearance: none !important;
background: var(--wpfe-surface-muted) !important;
border: 1px solid var(--wpfe-border-strong) !important;
border-radius: 6px !important;
padding: 5px 9px !important;
margin: 0 !important;
font-family: inherit !important;
font-size: 12px !important;
font-weight: 700 !important;
text-transform: none !important;
color: var(--wpfe-text) !important;
cursor: pointer !important;
display: inline-flex !important;
align-items: center !important;
gap: 4px !important;
box-shadow: none !important;
}

.wpfe-dt-action-btn.is-primary {
background: var(--wpfe-accent) !important;
border-color: var(--wpfe-accent) !important;
color: var(--wpfe-accent-fg) !important;
}

/* ==========================================================================
7. SNABB RICH-TEXT-EDITOR & BLOCKLÅSSKYDD
========================================================================== */
.wpfe-modern-editor-wrap {
background: #ffffff !important;
border: 1px solid var(--wpfe-border-strong) !important;
border-radius: var(--wpfe-radius-sm) !important;
overflow: hidden !important;
}

.wpfe-modern-toolbar {
display: flex !important;
align-items: center !important;
gap: 4px !important;
flex-wrap: wrap !important;
padding: 7px 9px !important;
background: #f1f5f9 !important;
border-bottom: 1px solid var(--wpfe-border) !important;
}

.wpfe-modern-tool-btn {
appearance: none !important;
-webkit-appearance: none !important;
background: #ffffff !important;
border: 1px solid var(--wpfe-border-strong) !important;
border-radius: 6px !important;
padding: 5px 9px !important;
margin: 0 !important;
font-family: inherit !important;
font-size: 12px !important;
font-weight: 700 !important;
text-transform: none !important;
letter-spacing: normal !important;
color: #334155 !important;
cursor: pointer !important;
display: inline-flex !important;
align-items: center !important;
gap: 5px !important;
box-shadow: none !important;
}

.wpfe-modern-tool-btn:hover:not(:disabled),
.wpfe-modern-tool-btn.active {
background: var(--wpfe-accent-soft) !important;
border-color: var(--wpfe-accent-border) !important;
color: var(--wpfe-accent) !important;
}

.wpfe-modern-tool-btn:disabled {
opacity: 0.45 !important;
cursor: not-allowed !important;
}

.wpfe-ed-link-bar {
display: none;
align-items: center;
gap: 6px;
flex-wrap: wrap;
padding: 8px 10px;
background: var(--wpfe-accent-soft);
border-bottom: 1px solid var(--wpfe-accent-border);
}

.wpfe-modern-editor-surface {
min-height: 170px;
max-height: 440px;
overflow-y: auto;
padding: 14px 16px;
font-size: 14.5px;
line-height: 1.65;
color: var(--wpfe-text);
background: #ffffff;
outline: none;
}

.wpfe-modern-editor-surface:empty::before {
content: attr(data-placeholder);
color: #94a3b8;
pointer-events: none;
}

.wpfe-modern-editor-surface p {
margin: 0 0 10px 0;
}

.wpfe-modern-editor-surface h1,
.wpfe-modern-editor-surface h2,
.wpfe-modern-editor-surface h3,
.wpfe-modern-editor-surface h4 {
margin: 14px 0 8px 0;
font-weight: 800;
line-height: 1.3;
color: var(--wpfe-text);
}

.wpfe-modern-editor-surface ul,
.wpfe-modern-editor-surface ol {
margin: 0 0 10px 22px;
padding: 0;
}

.wpfe-modern-editor-surface a {
color: var(--wpfe-accent);
text-decoration: underline;
}

.wpfe-blocks-lock-notice {
background: var(--wpfe-accent-soft) !important;
border: 1px solid var(--wpfe-accent-border) !important;
border-radius: var(--wpfe-radius-sm) !important;
padding: 14px 16px !important;
}

/* ==========================================================================
8. RESPONSIVA TABELLER, SORTERING & STATUS-BADGES
========================================================================== */
.wpfe-table-responsive {
width: 100% !important;
overflow-x: auto !important;
border: 1px solid var(--wpfe-border) !important;
border-radius: var(--wpfe-radius-md) !important;
background: #ffffff !important;
}

.wpfe-portal-wrap table.wpfe-table,
.wpfe-table {
width: 100% !important;
border-collapse: collapse !important;
border: none !important;
margin: 0 !important;
font-size: 13.5px !important;
background: #ffffff !important;
}

.wpfe-portal-wrap table.wpfe-table thead th,
.wpfe-table thead th {
background: var(--wpfe-surface-muted) !important;
border-top: none !important;
border-left: none !important;
border-right: none !important;
border-bottom: 1px solid var(--wpfe-border-strong) !important;
padding: 11px 14px !important;
text-align: left;
font-size: 12px !important;
font-weight: 800 !important;
color: #334155 !important;
white-space: nowrap;
}

.wpfe-portal-wrap table.wpfe-table tbody tr,
.wpfe-table tbody tr {
background: #ffffff !important;
border: none !important;
}

.wpfe-portal-wrap table.wpfe-table tbody tr:hover,
.wpfe-table tbody tr:hover {
background: #f8fbff !important;
}

.wpfe-portal-wrap table.wpfe-table tbody td,
.wpfe-table tbody td {
padding: 12px 14px !important;
border-top: none !important;
border-left: none !important;
border-right: none !important;
border-bottom: 1px solid var(--wpfe-border) !important;
vertical-align: middle !important;
color: var(--wpfe-text);
}

.wpfe-portal-wrap table.wpfe-table tbody tr:last-child td,
.wpfe-table tbody tr:last-child td {
border-bottom: none !important;
}

.wpfe-sort-btn {
appearance: none !important;
-webkit-appearance: none !important;
background: transparent !important;
border: none !important;
padding: 0 !important;
margin: 0 !important;
font-family: inherit !important;
font-size: 12px !important;
font-weight: 800 !important;
text-transform: none !important;
letter-spacing: normal !important;
color: #334155 !important;
cursor: pointer !important;
display: inline-flex !important;
align-items: center !important;
gap: 4px !important;
box-shadow: none !important;
}

.wpfe-sort-btn:hover {
color: var(--wpfe-accent) !important;
}

.wpfe-row-title-cell {
display: flex !important;
align-items: center !important;
gap: 11px !important;
}

.wpfe-row-thumb {
width: 42px !important;
height: 42px !important;
min-width: 42px !important;
border-radius: 8px !important;
background: var(--wpfe-surface-muted) !important;
border: 1px solid var(--wpfe-border) !important;
color: var(--wpfe-text-light) !important;
display: inline-flex !important;
align-items: center !important;
justify-content: center !important;
flex-shrink: 0 !important;
overflow: hidden !important;
}

.wpfe-row-thumb img {
width: 100% !important;
height: 100% !important;
object-fit: cover !important;
display: block !important;
margin: 0 !important;
border: none !important;
}

.wpfe-row-title-link {
font-weight: 700 !important;
font-size: 14px !important;
color: var(--wpfe-text) !important;
text-decoration: none !important;
}

.wpfe-row-title-link:hover {
color: var(--wpfe-accent) !important;
text-decoration: underline !important;
}

.wpfe-child-prefix {
color: #94a3b8;
font-weight: 700;
}

.wpfe-action-btns {
display: inline-flex !important;
align-items: center !important;
justify-content: flex-end !important;
gap: 6px !important;
flex-wrap: wrap !important;
}

/* Status- & Behörighets-badges */
.wpfe-badge {
display: inline-flex !important;
align-items: center !important;
gap: 5px !important;
padding: 3px 9px !important;
border-radius: 999px !important;
font-size: 11.5px !important;
font-weight: 700 !important;
line-height: 1.35 !important;
white-space: nowrap !important;
border: 1px solid transparent !important;
}

.wpfe-badge.is-publish {
background: #dcfce7 !important;
color: #166534 !important;
border-color: #bbf7d0 !important;
}

.wpfe-badge.is-draft {
background: #f1f5f9 !important;
color: #475569 !important;
border-color: #cbd5e1 !important;
}

.wpfe-badge.is-future,
.wpfe-badge.is-pending {
background: #fef3c7 !important;
color: #92400e !important;
border-color: #fde68a !important;
}

.wpfe-badge.is-private {
background: #f3e8ff !important;
color: #6b21a8 !important;
border-color: #e9d5ff !important;
}

.wpfe-badge.is-trash {
background: #fee2e2 !important;
color: #991b1b !important;
border-color: #fecaca !important;
}

.wpfe-badge.is-gutenberg {
background: var(--wpfe-accent-soft) !important;
color: var(--wpfe-accent) !important;
border-color: var(--wpfe-accent-border) !important;
}

.wpfe-badge.is-access-public {
background: #f8fafc !important;
color: #475569 !important;
border-color: #e2e8f0 !important;
}

.wpfe-badge.is-access-members {
background: #e0f2fe !important;
color: #0369a1 !important;
border-color: #bae6fd !important;
}

.wpfe-badge.is-access-board {
background: #fef3c7 !important;
color: #92400e !important;
border-color: #fde68a !important;
}

/* ==========================================================================
9. MEDIABIBLIOTEK: UPPLADDNINGSZON, ARBETSYTA & MAPPTRÄD
========================================================================== */
.wpfe-dropzone {
background: #f8fafc !important;
border: 2px dashed var(--wpfe-accent-border) !important;
border-radius: 12px !important;
padding: 26px 20px !important;
text-align: center !important;
margin: 0 0 18px 0 !important;
transition: background-color 0.15s ease, border-color 0.15s ease;
}

.wpfe-dropzone.is-dragover {
background: var(--wpfe-accent-soft) !important;
border-color: var(--wpfe-accent) !important;
}

.wpfe-media-workspace {
display: grid !important;
grid-template-columns: 248px minmax(0, 1fr) !important;
gap: 18px !important;
align-items: start !important;
}

@media (max-width: 900px) {
.wpfe-media-workspace {
grid-template-columns: 1fr !important;
}
}

.wpfe-folder-sidebar {
background: var(--wpfe-surface-muted) !important;
border: 1px solid var(--wpfe-border) !important;
border-radius: var(--wpfe-radius-md) !important;
padding: 12px !important;
position: sticky;
top: 18px;
}

@media (max-width: 900px) {
.wpfe-folder-sidebar {
position: static;
}
}

.wpfe-folder-sidebar-header {
display: flex !important;
align-items: center !important;
justify-content: space-between !important;
gap: 8px !important;
margin-bottom: 10px !important;
padding-bottom: 8px !important;
border-bottom: 1px solid var(--wpfe-border) !important;
}

.wpfe-folder-sidebar-title {
font-size: 13.5px !important;
font-weight: 800 !important;
color: var(--wpfe-text) !important;
display: inline-flex !important;
align-items: center !important;
gap: 6px !important;
}

.wpfe-folder-sidebar-title .wpfe-fa-icon {
color: var(--wpfe-brand) !important;
}

.wpfe-folder-form-box {
background: #ffffff !important;
border: 1px solid var(--wpfe-border-strong) !important;
border-radius: 8px !important;
padding: 10px !important;
margin-bottom: 10px !important;
}

.wpfe-folder-tree {
display: flex !important;
flex-direction: column !important;
gap: 2px !important;
max-height: 460px;
overflow-y: auto;
}

.wpfe-folder-divider {
height: 1px;
background: var(--wpfe-border);
margin: 5px 0;
}

.wpfe-folder-item {
appearance: none !important;
-webkit-appearance: none !important;
width: 100% !important;
text-align: left !important;
background: transparent !important;
border: 1px solid transparent !important;
border-radius: 7px !important;
padding: 7px 10px !important;
margin: 0 !important;
font-family: inherit !important;
font-size: 13px !important;
font-weight: 600 !important;
line-height: 1.35 !important;
text-transform: none !important;
letter-spacing: normal !important;
color: #334155 !important;
cursor: pointer !important;
display: flex !important;
align-items: center !important;
justify-content: space-between !important;
gap: 8px !important;
transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
box-shadow: none !important;
}

.wpfe-folder-item:hover {
background: #ffffff !important;
border-color: var(--wpfe-border) !important;
color: var(--wpfe-text) !important;
}

.wpfe-folder-item.is-active {
background: var(--wpfe-accent-soft) !important;
border-color: var(--wpfe-accent-border) !important;
color: var(--wpfe-accent) !important;
font-weight: 700 !important;
}

.wpfe-folder-item.is-drop-target {
background: var(--wpfe-accent-soft) !important;
border: 1px dashed var(--wpfe-accent) !important;
color: var(--wpfe-accent) !important;
}

.wpfe-folder-item-main {
display: inline-flex;
align-items: center;
gap: 7px;
min-width: 0;
overflow: hidden;
}

.wpfe-folder-item-name {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

.wpfe-folder-cnt {
font-size: 11.5px;
font-weight: 700;
color: var(--wpfe-text-light);
background: rgba(15, 23, 42, 0.06);
padding: 1px 7px;
border-radius: 999px;
flex-shrink: 0;
}

.wpfe-folder-item.is-active .wpfe-folder-cnt {
background: rgba(15, 23, 42, 0.08);
color: var(--wpfe-accent);
}

.wpfe-active-folder-bar {
display: flex;
align-items: center;
justify-content: space-between;
gap: 10px;
flex-wrap: wrap;
padding: 10px 14px;
background: var(--wpfe-accent-soft);
border: 1px solid var(--wpfe-accent-border);
border-radius: var(--wpfe-radius-sm);
margin-bottom: 12px;
}

/* ==========================================================================
10. MEDIARUTNÄT, BILDKORT & FÄRGKODADE FILTYPSKORT
========================================================================== */
.wpfe-media-grid {
display: grid !important;
grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)) !important;
gap: 14px !important;
}

.wpfe-media-card {
background: #ffffff !important;
border: 1px solid var(--wpfe-border) !important;
border-radius: 10px !important;
overflow: hidden !important;
cursor: pointer !important;
display: flex !important;
flex-direction: column !important;
transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.wpfe-media-card:hover {
transform: translateY(-2px);
border-color: var(--wpfe-accent-border) !important;
box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08) !important;
}

.wpfe-media-card.is-dragging {
opacity: 0.45;
transform: scale(0.97);
}

.wpfe-media-card-thumb {
position: relative !important;
width: 100% !important;
aspect-ratio: 4 / 3 !important;
background: #f1f5f9 !important;
overflow: hidden !important;
}

.wpfe-media-card-thumb img {
width: 100% !important;
height: 100% !important;
max-width: none !important;
object-fit: cover !important;
display: block !important;
margin: 0 !important;
border: none !important;
border-radius: 0 !important;
}

/* Filtypskort för PDF, dokument, kalkylblad, video, ljud & arkiv */
.wpfe-media-file-placeholder {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 8px;
background: #f1f5f9;
color: #475569;
padding: 12px;
}

.wpfe-media-file-placeholder.is-type-pdf {
background: #fef2f2;
color: #dc2626;
}

.wpfe-media-file-placeholder.is-type-document {
background: #eff6ff;
color: #2563eb;
}

.wpfe-media-file-placeholder.is-type-spreadsheet {
background: #f0fdf4;
color: #16a34a;
}

.wpfe-media-file-placeholder.is-type-video {
background: #f5f3ff;
color: #7c3aed;
}

.wpfe-media-file-placeholder.is-type-audio {
background: #fffbeb;
color: #d97706;
}

.wpfe-media-file-placeholder.is-type-archive {
background: #f8fafc;
color: #334155;
}

.wpfe-media-ext-pill {
display: inline-block;
padding: 2px 8px;
border-radius: 999px;
font-size: 10.5px;
font-weight: 800;
letter-spacing: 0.04em;
line-height: 1.3;
background: rgba(15, 23, 42, 0.08);
color: #0f172a;
text-transform: uppercase;
}

/* Märkningar i hörnen på bild- och filkort */
.wpfe-media-size-tag {
position: absolute;
right: 6px;
bottom: 6px;
background: rgba(15, 23, 42, 0.76);
color: #ffffff;
font-size: 10px;
font-weight: 700;
line-height: 1.3;
padding: 2px 6px;
border-radius: 5px;
backdrop-filter: blur(2px);
}

.wpfe-media-oversized-tag {
position: absolute;
left: 6px;
top: 6px;
background: #fef3c7;
color: #92400e;
border: 1px solid #fde68a;
font-size: 10px;
font-weight: 800;
line-height: 1.3;
padding: 2px 6px;
border-radius: 5px;
}

.wpfe-media-ratio-tag {
position: absolute;
right: 6px;
top: 6px;
background: var(--wpfe-accent);
color: var(--wpfe-accent-fg);
font-size: 10px;
font-weight: 800;
line-height: 1.3;
padding: 2px 6px;
border-radius: 5px;
}

.wpfe-media-folder-tag {
position: absolute;
left: 6px;
bottom: 6px;
max-width: 56%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
background: rgba(255, 255, 255, 0.92);
color: #1e293b;
font-size: 10px;
font-weight: 700;
line-height: 1.3;
padding: 2px 6px;
border-radius: 5px;
display: inline-flex;
align-items: center;
gap: 4px;
}

.wpfe-media-card-body {
padding: 9px 10px;
display: flex;
flex-direction: column;
gap: 3px;
}

.wpfe-media-card-title {
font-size: 12.5px;
font-weight: 700;
color: var(--wpfe-text);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

.wpfe-media-card-meta {
display: flex;
align-items: center;
justify-content: space-between;
gap: 6px;
font-size: 11px;
color: var(--wpfe-text-light);
}

/* ==========================================================================
11. INTERAKTIV BESKÄRNINGSSCEN & FILFÖRHANDSGRANSKNING
========================================================================== */
.wpfe-crop-stage-outer,
.wpfe-file-preview-stage {
background: #0f172a !important;
border: 1px solid #1e293b !important;
border-radius: 10px !important;
padding: 12px !important;
text-align: center;
margin: 0 0 12px 0 !important;
display: flex;
align-items: center;
justify-content: center;
min-height: 200px;
}

.wpfe-crop-stage {
position: relative;
display: inline-block;
max-width: 100%;
line-height: 0;
overflow: hidden;
border-radius: 6px;
user-select: none;
}

.wpfe-crop-stage img {
display: block !important;
max-width: 100% !important;
max-height: 360px !important;
width: auto !important;
height: auto !important;
margin: 0 !important;
border: none !important;
}

.wpfe-crop-box {
display: none;
position: absolute;
left: 0;
top: 0;
border: 2px solid #ffffff;
box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.62);
cursor: ns-resize;
touch-action: none;
background-image:
linear-gradient(to right, rgba(255, 255, 255, 0.28) 1px, transparent 1px),
linear-gradient(to bottom, rgba(255, 255, 255, 0.28) 1px, transparent 1px);
background-size: 33.333% 33.333%;
}

.wpfe-crop-box.is-horizontal {
cursor: ew-resize;
}

.wpfe-crop-box.is-locked {
cursor: default;
}

.wpfe-crop-drag-pill {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
background: rgba(15, 23, 42, 0.84);
color: #ffffff;
padding: 5px 11px;
border-radius: 999px;
font-size: 11.5px;
font-weight: 700;
line-height: 1.2;
white-space: nowrap;
display: inline-flex;
align-items: center;
gap: 5px;
pointer-events: none;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.wpfe-crop-panel {
background: #f8fafc !important;
border: 1px solid var(--wpfe-border) !important;
border-radius: 10px !important;
padding: 12px 14px !important;
margin: 0 0 12px 0 !important;
}

.wpfe-ratio-pills {
display: flex !important;
align-items: center !important;
gap: 6px !important;
flex-wrap: wrap !important;
margin-top: 10px !important;
}

.wpfe-ratio-pill {
appearance: none !important;
-webkit-appearance: none !important;
background: #ffffff !important;
border: 1px solid var(--wpfe-border-strong) !important;
border-radius: 7px !important;
padding: 6px 11px !important;
margin: 0 !important;
font-family: inherit !important;
font-size: 12.5px !important;
font-weight: 700 !important;
line-height: 1.3 !important;
text-transform: none !important;
letter-spacing: normal !important;
color: #334155 !important;
cursor: pointer !important;
display: inline-flex !important;
align-items: center !important;
gap: 5px !important;
transition: all 0.14s ease;
box-shadow: none !important;
}

.wpfe-ratio-pill:hover {
background: var(--wpfe-surface-hover) !important;
border-color: #94a3b8 !important;
}

.wpfe-ratio-pill.is-active {
background: var(--wpfe-accent) !important;
border-color: var(--wpfe-accent) !important;
color: var(--wpfe-accent-fg) !important;
}

.wpfe-crop-controls-sub {
margin-top: 12px;
padding-top: 12px;
border-top: 1px solid var(--wpfe-border);
}

.wpfe-crop-slider-row {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 10px;
}

.wpfe-crop-slider-row input[type="range"] {
appearance: auto !important;
-webkit-appearance: slider-horizontal !important;
flex: 1 !important;
accent-color: var(--wpfe-accent);
cursor: pointer !important;
padding: 0 !important;
border: none !important;
background: transparent !important;
min-height: 0 !important;
}

/* ==========================================================================
12. MODALER & HELSKÄRMS APP-LÄGE FÖR WORDPRESS BLOCKREDIGERARE
========================================================================== */
.wpfe-modal-backdrop {
display: none;
position: fixed !important;
inset: 0 !important;
z-index: 99990 !important;
background: rgba(15, 23, 42, 0.6) !important;
backdrop-filter: blur(2px);
padding: 20px !important;
overflow-y: auto !important;
align-items: center;
justify-content: center;
}

.wpfe-modal-backdrop.is-open {
display: flex !important;
}

.wpfe-modal-box {
background: #ffffff !important;
border: 1px solid var(--wpfe-border) !important;
border-radius: 14px !important;
width: 100% !important;
max-width: 880px !important;
max-height: calc(100vh - 40px) !important;
overflow-y: auto !important;
padding: 22px 24px !important;
margin: auto !important;
box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25) !important;
}

/* Helskärmsmodal för Gutenberg i App-läge */
.wpfe-app-modal-backdrop {
display: none;
position: fixed !important;
inset: 0 !important;
z-index: 99995 !important;
background: rgba(15, 23, 42, 0.72) !important;
padding: 12px !important;
}

.wpfe-app-modal-backdrop.is-open {
display: flex !important;
}

.wpfe-app-modal-shell {
position: relative !important;
display: flex !important;
flex-direction: column !important;
width: 100% !important;
height: 100% !important;
background: #ffffff !important;
border-radius: 12px !important;
overflow: hidden !important;
box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35) !important;
}

.wpfe-app-modal-topbar {
display: flex !important;
align-items: center !important;
justify-content: space-between !important;
gap: 12px !important;
flex-wrap: wrap !important;
padding: 10px 16px !important;
background: #0f172a !important;
color: #ffffff !important;
border-bottom: 1px solid #1e293b !important;
flex-shrink: 0 !important;
}

.wpfe-app-modal-title-wrap {
display: flex !important;
align-items: center !important;
gap: 10px !important;
min-width: 0 !important;
flex-wrap: wrap !important;
}

.wpfe-app-type-badge {
display: inline-flex !important;
align-items: center !important;
gap: 6px !important;
padding: 4px 10px !important;
border-radius: 999px !important;
background: rgba(59, 130, 246, 0.22) !important;
color: #93c5fd !important;
font-size: 12px !important;
font-weight: 700 !important;
}

.wpfe-app-doc-title {
font-size: 14.5px !important;
font-weight: 700 !important;
color: #f8fafc !important;
max-width: 420px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

.wpfe-app-save-pill {
display: inline-flex;
align-items: center;
gap: 4px;
padding: 3px 9px;
border-radius: 999px;
background: rgba(34, 197, 94, 0.2);
color: #86efac;
font-size: 11.5px;
font-weight: 700;
}

.wpfe-app-modal-actions {
display: flex !important;
align-items: center !important;
gap: 8px !important;
flex-wrap: wrap !important;
}

.wpfe-top-action-btn {
appearance: none !important;
-webkit-appearance: none !important;
display: inline-flex !important;
align-items: center !important;
gap: 6px !important;
padding: 7px 13px !important;
margin: 0 !important;
border-radius: 7px !important;
font-family: inherit !important;
font-size: 13px !important;
font-weight: 700 !important;
text-transform: none !important;
letter-spacing: normal !important;
cursor: pointer !important;
text-decoration: none !important;
border: 1px solid transparent !important;
box-shadow: none !important;
transition: background-color 0.14s ease, border-color 0.14s ease;
}

.wpfe-top-action-btn.is-primary {
background: #2563eb !important;
color: #ffffff !important;
}

.wpfe-top-action-btn.is-primary:hover {
background: #1d4ed8 !important;
}

.wpfe-top-action-btn.is-secondary {
background: #1e293b !important;
border-color: #334155 !important;
color: #e2e8f0 !important;
}

.wpfe-top-action-btn.is-secondary:hover {
background: #334155 !important;
color: #ffffff !important;
}

.wpfe-top-action-btn.is-ghost {
background: transparent !important;
border-color: #334155 !important;
color: #cbd5e1 !important;
}

.wpfe-top-action-btn.is-ghost:hover {
background: rgba(239, 68, 68, 0.18) !important;
border-color: #f87171 !important;
color: #fecaca !important;
}

.wpfe-app-loader {
position: absolute !important;
inset: 52px 0 0 0 !important;
z-index: 5 !important;
background: #ffffff !important;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 12px;
color: var(--wpfe-text-muted);
font-size: 14px;
font-weight: 600;
}

.wpfe-gutenberg-iframe {
width: 100% !important;
flex: 1 !important;
border: none !important;
background: #ffffff !important;
}

@media (max-width: 640px) {
.wpfe-modal-backdrop {
padding: 10px !important;
}
.wpfe-modal-box {
padding: 16px !important;
}
.wpfe-app-modal-backdrop {
padding: 0 !important;
}
.wpfe-app-modal-shell {
border-radius: 0 !important;
}
}