/* MatrixInn GDPR & UK Compliance — consent banner. Colours come from CSS variables printed from the plugin settings. */

#mgdpr-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99998;
    display: block;
}

#mgdpr-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    border-radius: 8px;
    box-shadow: rgba(0, 0, 0, 0.3) 0px 32px 68px 0px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    z-index: 99999;
    font-family: sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 24px;
    color: var(--mgdpr-text);
    overflow: hidden;
}

/* Header */
#mgdpr-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22.5px;
    flex-shrink: 0;
}
#mgdpr-logo { height: 32px; width: auto; }
#mgdpr-logo-text { font-size: 16px; font-weight: 700; color: var(--mgdpr-text); }

/* Nav tabs */
#mgdpr-nav {
    display: flex;
    border-bottom: 1px solid var(--mgdpr-track);
    flex-shrink: 0;
    margin: 0;
    padding: 0;
}
.mgdpr-nav-btn {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    padding: 15px;
    font-size: 15px;
    font-family: sans-serif;
    font-weight: 400;
    color: var(--mgdpr-text);
    cursor: pointer;
    height: 57px;
    box-sizing: border-box;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
    line-height: 24px;
}
.mgdpr-nav-btn:hover { color: var(--mgdpr-primary); }
.mgdpr-nav-btn.mgdpr-active {
    border-bottom-color: var(--mgdpr-primary);
    color: var(--mgdpr-primary);
    font-weight: 600;
}

/* Tab content area */
#mgdpr-tabs { overflow-y: auto; flex: 1; min-height: 0; }
.mgdpr-tab { display: none; }
.mgdpr-tab.mgdpr-active { display: block; }

#mgdpr-tab-consent { padding: 0; }

#mgdpr-body-content { padding: 16.875px; padding-bottom: 0; }

#mgdpr-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 24px;
    color: var(--mgdpr-text);
    margin: 0 0 7.5px 0;
    padding: 0;
}
#mgdpr-body-text {
    font-size: 15px;
    font-weight: 400;
    line-height: 24px;
    color: var(--mgdpr-text);
    margin: 0;
    padding: 0;
}

/* Category toggles */
#mgdpr-categories {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    border-top: 1px solid var(--mgdpr-track);
    margin-top: 16.875px;
}
.mgdpr-category {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 22.5px 15px;
    flex: 1;
    border-right: 1px solid var(--mgdpr-track);
    min-width: 0;
}
.mgdpr-category:last-child { border-right: none; }

.mgdpr-toggle {
    position: relative;
    width: 57px;
    height: 32px;
    flex-shrink: 0;
    display: block;
    cursor: pointer;
}
.mgdpr-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.mgdpr-toggle-track {
    position: absolute;
    inset: 0;
    background: var(--mgdpr-track);
    border-radius: 32px;
    transition: background 0.2s;
}
.mgdpr-toggle-track::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 24px;
    height: 24px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}
.mgdpr-toggle input:checked + .mgdpr-toggle-track { background: var(--mgdpr-primary); }
.mgdpr-toggle input:checked + .mgdpr-toggle-track::after { transform: translateX(25px); }
.mgdpr-toggle input:disabled + .mgdpr-toggle-track { cursor: not-allowed; }

.mgdpr-category-label {
    font-size: 15px;
    font-weight: 700;
    color: var(--mgdpr-text);
    text-align: center;
    margin: 0;
    line-height: 24px;
}

/* Buttons */
#mgdpr-buttons {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 16.875px;
    gap: 0;
    flex-shrink: 0;
    border-top: 1px solid var(--mgdpr-track);
    background: #fff;
}
.mgdpr-btn {
    flex: 1;
    height: 49px;
    padding: 15px;
    font-size: 15px;
    font-family: sans-serif;
    font-weight: 600;
    border-radius: 3.75px;
    cursor: pointer;
    white-space: nowrap;
    text-align: center;
    box-sizing: border-box;
    line-height: 15px;
    box-shadow: rgba(0, 0, 0, 0.05) 0px 1px 2px 0px;
    transition: opacity 0.15s;
}
.mgdpr-btn:hover { opacity: 0.88; }
.mgdpr-btn-outline {
    background: #ffffff;
    color: var(--mgdpr-text);
    border: 2px solid var(--mgdpr-primary);
    margin-right: 7.5px;
}
.mgdpr-btn-primary {
    background: var(--mgdpr-primary);
    color: #ffffff;
    border: 2px solid #ffffff;
    margin-right: 0;
}

/* Details tab */
#mgdpr-tab-details { padding: 16.875px; }
#mgdpr-details-intro { font-size: 15px; color: var(--mgdpr-text); margin: 0 0 16px; line-height: 24px; }
.mgdpr-details-section { border: 1px solid var(--mgdpr-track); border-radius: 4px; margin-bottom: 8px; overflow: hidden; }
.mgdpr-details-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    cursor: pointer;
    background: rgb(248, 248, 248);
    user-select: none;
    gap: 12px;
}
.mgdpr-details-header:hover { background: rgb(240, 240, 240); }
.mgdpr-details-header-left { display: flex; align-items: center; gap: 10px; flex: 1; }
.mgdpr-details-title { font-size: 15px; font-weight: 600; color: var(--mgdpr-text); }
.mgdpr-details-count { font-size: 13px; color: #888; }
.mgdpr-details-arrow { font-size: 11px; color: #888; transition: transform 0.2s; display: inline-block; }
.mgdpr-details-section.open .mgdpr-details-arrow { transform: rotate(180deg); }
.mgdpr-details-body { display: none; padding: 14px 16px; border-top: 1px solid var(--mgdpr-track); background: #fff; }
.mgdpr-details-section.open .mgdpr-details-body { display: block; }
.mgdpr-details-desc { font-size: 14px; color: #555; line-height: 1.55; margin: 0 0 12px; }
.mgdpr-cookie-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mgdpr-cookie-table th {
    text-align: left;
    padding: 7px 10px;
    background: rgb(248, 248, 248);
    color: var(--mgdpr-text);
    font-weight: 600;
    border-bottom: 1px solid var(--mgdpr-track);
}
.mgdpr-cookie-table td { padding: 7px 10px; border-bottom: 1px solid rgb(235, 235, 235); color: #444; vertical-align: top; font-size: 13px; }
.mgdpr-cookie-table tr:last-child td { border-bottom: none; }

.mgdpr-details-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    display: block;
    cursor: pointer;
}
.mgdpr-details-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.mgdpr-details-toggle-track {
    position: absolute;
    inset: 0;
    background: var(--mgdpr-track);
    border-radius: 24px;
    transition: background 0.2s;
}
.mgdpr-details-toggle-track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.mgdpr-details-toggle input:checked + .mgdpr-details-toggle-track { background: var(--mgdpr-primary); }
.mgdpr-details-toggle input:checked + .mgdpr-details-toggle-track::after { transform: translateX(20px); }
.mgdpr-details-toggle input:disabled + .mgdpr-details-toggle-track { cursor: not-allowed; }

/* About tab */
#mgdpr-tab-about { padding: 16.875px; }
#mgdpr-about { font-size: 15px; line-height: 24px; color: var(--mgdpr-text); }
#mgdpr-about p { margin: 0 0 16px; }
#mgdpr-about a { color: var(--mgdpr-primary); text-decoration: none; }
#mgdpr-about a:hover { text-decoration: underline; }

/* Floating widget */
#mgdpr-widget {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 99990;
    background: var(--mgdpr-text);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 46px;
    height: 46px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: rgba(0, 0, 0, 0.3) 0px 4px 12px 0px;
    transition: background 0.15s;
    padding: 0;
}
#mgdpr-widget:hover { background: var(--mgdpr-primary); }
#mgdpr-widget svg { width: 22px; height: 22px; }

@media (max-width: 600px) {
    #mgdpr-dialog { width: 96%; max-height: 96vh; border-radius: 6px; }
    #mgdpr-header { padding: 16px; }
    #mgdpr-categories { flex-wrap: wrap; }
    .mgdpr-category { min-width: 45%; border-right: none; border-bottom: 1px solid var(--mgdpr-track); }
    .mgdpr-category:nth-child(odd) { border-right: 1px solid var(--mgdpr-track); }
    .mgdpr-category:last-child, .mgdpr-category:nth-last-child(2):nth-child(odd) { border-bottom: none; }
    #mgdpr-buttons { flex-direction: column; gap: 8px; }
    .mgdpr-btn { width: 100%; margin-right: 0 !important; }
    #mgdpr-body-content, #mgdpr-tab-details, #mgdpr-tab-about { padding: 14px; }
}

/* Visibility: the hidden attribute always wins over layout rules. */
#mgdpr-dialog[hidden], #mgdpr-overlay[hidden], #mgdpr-widget[hidden] { display: none !important; }

/* Theme resets — many themes style every <button>/<table> globally. */
#mgdpr-dialog, #mgdpr-dialog * { box-sizing: border-box; }
#mgdpr-dialog button, #mgdpr-widget { font-family: inherit; text-transform: none; letter-spacing: normal; min-height: 0; min-width: 0; line-height: normal; text-shadow: none; }
#mgdpr-dialog table { margin: 0; border: 0; }
#mgdpr-dialog :focus-visible, #mgdpr-widget:focus-visible { outline: 2px solid var(--mgdpr-primary); outline-offset: 2px; }
.mgdpr-toggle input:focus-visible + .mgdpr-toggle-track, .mgdpr-details-toggle input:focus-visible + .mgdpr-details-toggle-track { outline: 2px solid var(--mgdpr-primary); outline-offset: 2px; }

.mgdpr-always { font-size: 13px; font-weight: 600; color: var(--mgdpr-primary); white-space: nowrap; }
.mgdpr-none { color: #888; font-size: 13px; font-style: italic; margin: 0; }
#mgdpr-branding { margin: 0; padding: 0 16.875px 10px; font-size: 11px; text-align: right; opacity: .65; }
#mgdpr-branding a { color: inherit; }

/* Layout: bottom bar — full width, page stays usable. */
#mgdpr-dialog.mgdpr-layout-bar { top: auto; bottom: 0; left: 0; transform: none; width: 100%; max-width: none; max-height: 70vh; border-radius: 0; box-shadow: rgba(0,0,0,.25) 0 -8px 32px 0; }
/* Layout: corner box — compact, bottom-left. */
#mgdpr-dialog.mgdpr-layout-corner { top: auto; bottom: 20px; left: 20px; transform: none; width: 420px; max-width: calc(100% - 40px); max-height: 80vh; }
.mgdpr-layout-corner #mgdpr-categories { flex-wrap: wrap; }
.mgdpr-layout-corner .mgdpr-category { min-width: 50%; border-bottom: 1px solid var(--mgdpr-track); }
.mgdpr-layout-corner #mgdpr-buttons { flex-direction: column; gap: 8px; }
.mgdpr-layout-corner .mgdpr-btn { width: 100%; margin-right: 0; }
.mgdpr-layout-bar ~ #mgdpr-widget, .mgdpr-layout-corner ~ #mgdpr-widget { left: 20px; }

@media (max-width: 600px) {
    #mgdpr-dialog.mgdpr-layout-corner { left: 2%; bottom: 2%; width: 96%; max-width: none; }
}

/* [matrixinn_gdpr_export] / [matrixinn_gdpr_erasure] */
.minn-gdpr-request-form input[type="email"] { width: 100%; max-width: 420px; }
.minn-gdpr-request-notice { padding: 10px 14px; border-left: 4px solid #2563eb; background: #eff6ff; }
.minn-gdpr-request-invalid, .minn-gdpr-request-expired, .minn-gdpr-request-limited, .minn-gdpr-request-error { border-left-color: #dc2626; background: #fef2f2; }

/* ── Theme-proofing ─────────────────────────────────────────────────────────
   Many themes (Hello Elementor, Astra, GeneratePress…) style every <button>,
   button:hover and button:focus globally. Everything the banner relies on is
   re-declared here with ID specificity and !important so no theme can bleed in. */
#mgdpr-dialog #mgdpr-buttons { display: flex !important; flex-direction: row !important; gap: 7.5px !important; padding: 16.875px !important; margin: 0 !important; }

#mgdpr-dialog .mgdpr-btn,
#mgdpr-dialog .mgdpr-btn:hover,
#mgdpr-dialog .mgdpr-btn:focus,
#mgdpr-dialog .mgdpr-btn:active {
    display: block !important; flex: 1 1 0 !important; width: auto !important; height: 49px !important; min-height: 49px !important;
    margin: 0 !important; padding: 0 15px !important; border-radius: 4px !important;
    font-family: inherit !important; font-size: 15px !important; font-weight: 600 !important; line-height: 1 !important;
    letter-spacing: normal !important; text-transform: none !important; text-decoration: none !important; text-shadow: none !important;
    text-align: center !important; white-space: nowrap !important; cursor: pointer !important;
    box-shadow: rgba(0, 0, 0, 0.05) 0 1px 2px 0 !important; transition: opacity 0.15s !important;
}
#mgdpr-dialog .mgdpr-btn-outline,
#mgdpr-dialog .mgdpr-btn-outline:hover,
#mgdpr-dialog .mgdpr-btn-outline:focus,
#mgdpr-dialog .mgdpr-btn-outline:active {
    background: #ffffff !important; color: var(--mgdpr-text) !important; border: 2px solid var(--mgdpr-primary) !important;
}
#mgdpr-dialog .mgdpr-btn-primary,
#mgdpr-dialog .mgdpr-btn-primary:hover,
#mgdpr-dialog .mgdpr-btn-primary:focus,
#mgdpr-dialog .mgdpr-btn-primary:active {
    background: var(--mgdpr-primary) !important; color: #ffffff !important; border: 2px solid var(--mgdpr-primary) !important;
}
#mgdpr-dialog .mgdpr-btn:hover { opacity: 0.88 !important; }

#mgdpr-dialog .mgdpr-nav-btn,
#mgdpr-dialog .mgdpr-nav-btn:hover,
#mgdpr-dialog .mgdpr-nav-btn:focus,
#mgdpr-dialog .mgdpr-nav-btn:active {
    display: inline-block !important; width: auto !important; height: 57px !important; min-height: 0 !important;
    margin: 0 0 -1px !important; padding: 15px !important;
    background: none !important; border: 0 !important; border-bottom: 3px solid transparent !important; border-radius: 0 !important; box-shadow: none !important;
    color: var(--mgdpr-text) !important; font-family: inherit !important; font-size: 15px !important; font-weight: 400 !important; line-height: 24px !important;
    letter-spacing: normal !important; text-transform: none !important; text-decoration: none !important; white-space: nowrap !important;
}
#mgdpr-dialog .mgdpr-nav-btn:hover { color: var(--mgdpr-primary) !important; }
#mgdpr-dialog .mgdpr-nav-btn.mgdpr-active,
#mgdpr-dialog .mgdpr-nav-btn.mgdpr-active:hover,
#mgdpr-dialog .mgdpr-nav-btn.mgdpr-active:focus {
    color: var(--mgdpr-primary) !important; border-bottom-color: var(--mgdpr-primary) !important; font-weight: 600 !important;
}

#mgdpr-dialog .mgdpr-cookie-table th,
#mgdpr-dialog .mgdpr-cookie-table td { border: 0 !important; border-bottom: 1px solid rgb(235, 235, 235) !important; padding: 7px 10px !important; }
#mgdpr-dialog .mgdpr-cookie-table td { background: transparent !important; }
#mgdpr-dialog .mgdpr-cookie-table th { background: rgb(248, 248, 248) !important; }

#mgdpr-widget,
#mgdpr-widget:hover,
#mgdpr-widget:focus,
#mgdpr-widget:active {
    width: 46px !important; height: 46px !important; min-width: 0 !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important;
    border: 0 !important; border-radius: 50% !important; background: var(--mgdpr-text) !important; color: #ffffff !important;
    box-shadow: rgba(0, 0, 0, 0.3) 0 4px 12px 0 !important; line-height: 1 !important;
}
#mgdpr-widget:hover { background: var(--mgdpr-primary) !important; }
#mgdpr-widget svg { width: 22px !important; height: 22px !important; }

/* Stacked buttons (phones and the corner layout). States are listed so the
   :hover/:focus rules above (higher specificity) cannot shrink a focused button. */
@media (max-width: 600px) {
    #mgdpr-dialog #mgdpr-buttons { flex-direction: column !important; gap: 8px !important; }
    #mgdpr-dialog .mgdpr-btn, #mgdpr-dialog .mgdpr-btn:hover, #mgdpr-dialog .mgdpr-btn:focus, #mgdpr-dialog .mgdpr-btn:active { width: 100% !important; flex: none !important; }
}
#mgdpr-dialog.mgdpr-layout-corner #mgdpr-buttons { flex-direction: column !important; gap: 8px !important; }
#mgdpr-dialog.mgdpr-layout-corner .mgdpr-btn, #mgdpr-dialog.mgdpr-layout-corner .mgdpr-btn:hover, #mgdpr-dialog.mgdpr-layout-corner .mgdpr-btn:focus, #mgdpr-dialog.mgdpr-layout-corner .mgdpr-btn:active { width: 100% !important; flex: none !important; }
