/* ============================================================
   Tendir Pro for Booknetic SaaS — Theme Lock
   Keeps layout and UI consistent across WordPress themes.
   ============================================================ */

html,
body {
    background: #ffffff !important;
    background-image: none !important;
}

:is(#page, #wrap, #outer-wrap, .site, .site-content, .content, .content-wrapper) {
    background: #ffffff !important;
    background-image: none !important;
}

body.tdr-hero-page,
body:has(.tdr-hero),
body.tdr-directory-page,
body:has(.tdr-directory),
body.tdr-profile-page,
body:has(.tdr-profile) {
    overflow-x: clip !important;
    background: #ffffff !important;
    background-image: none !important;
}

/* ---- Disable common theme sidebars inside main content ---- */
body.tdr-hero-page #main :is(#right-sidebar, #secondary, .sidebar, .sidebar-primary, .sidebar-container, .widget-area),
body:has(.tdr-hero) #main :is(#right-sidebar, #secondary, .sidebar, .sidebar-primary, .sidebar-container, .widget-area),
body.tdr-directory-page #main :is(#right-sidebar, #secondary, .sidebar, .sidebar-primary, .sidebar-container, .widget-area),
body:has(.tdr-directory) #main :is(#right-sidebar, #secondary, .sidebar, .sidebar-primary, .sidebar-container, .widget-area),
body.tdr-profile-page #main :is(#right-sidebar, #secondary, .sidebar, .sidebar-primary, .sidebar-container, .widget-area),
body:has(.tdr-profile) #main :is(#right-sidebar, #secondary, .sidebar, .sidebar-primary, .sidebar-container, .widget-area) {
    display: none !important;
}

/* ---- Break out of theme containers ---- */
body.tdr-hero-page :is(#main, .site-main, #primary, .content-area, #content-wrap, #content, .site-content, .single-page-article, .entry),
body:has(.tdr-hero) :is(#main, .site-main, #primary, .content-area, #content-wrap, #content, .site-content, .single-page-article, .entry),
body.tdr-directory-page :is(#main, .site-main, #primary, .content-area, #content-wrap, #content, .site-content, .single-page-article, .entry),
body:has(.tdr-directory) :is(#main, .site-main, #primary, .content-area, #content-wrap, #content, .site-content, .single-page-article, .entry),
body.tdr-profile-page :is(#main, .site-main, #primary, .content-area, #content-wrap, #content, .site-content, .single-page-article, .entry),
body:has(.tdr-profile) :is(#main, .site-main, #primary, .content-area, #content-wrap, #content, .site-content, .single-page-article, .entry) {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    border: 0 !important;
    background: #ffffff !important;
    background-image: none !important;
}

body.tdr-hero-page .page-header,
body:has(.tdr-hero) .page-header,
body.tdr-directory-page .page-header,
body:has(.tdr-directory) .page-header,
body.tdr-profile-page .page-header,
body:has(.tdr-profile) .page-header {
    display: none !important;
}

/* ---- Full-bleed widget roots ---- */
body.tdr-hero-page .tdr-hero,
body:has(.tdr-hero) .tdr-hero,
body.tdr-directory-page .tdr-directory,
body:has(.tdr-directory) .tdr-directory,
body.tdr-profile-page .tdr-profile,
body:has(.tdr-profile) .tdr-profile,
body.tdr-profile-page .tdr-profile__warning,
body:has(.tdr-profile__warning) .tdr-profile__warning {
    position: relative;
    left: 50%;
    right: 50%;
    width: 100vw;
    max-width: 100vw;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
}

/* ---- Global style bleed shield ---- */
body.tdr-hero-page :is(.tdr-hero),
body:has(.tdr-hero) :is(.tdr-hero),
body.tdr-directory-page :is(.tdr-directory),
body:has(.tdr-directory) :is(.tdr-directory),
body.tdr-profile-page :is(.tdr-profile, .tdr-profile__warning),
body:has(.tdr-profile) :is(.tdr-profile, .tdr-profile__warning) {
    text-transform: none !important;
    letter-spacing: normal !important;
    text-shadow: none !important;
}

body.tdr-hero-page :is(.tdr-hero),
body:has(.tdr-hero) :is(.tdr-hero),
body.tdr-directory-page :is(.tdr-directory),
body:has(.tdr-directory) :is(.tdr-directory),
body.tdr-profile-page :is(.tdr-profile, .tdr-profile__warning),
body:has(.tdr-profile) :is(.tdr-profile, .tdr-profile__warning),
body.tdr-hero-page :is(.tdr-hero) *,
body:has(.tdr-hero) :is(.tdr-hero) *,
body.tdr-directory-page :is(.tdr-directory) *,
body:has(.tdr-directory) :is(.tdr-directory) *,
body.tdr-profile-page :is(.tdr-profile, .tdr-profile__warning) *,
body:has(.tdr-profile) :is(.tdr-profile, .tdr-profile__warning) * {
    box-sizing: border-box;
}

body.tdr-hero-page :is(.tdr-hero) a,
body:has(.tdr-hero) :is(.tdr-hero) a,
body.tdr-directory-page :is(.tdr-directory) a,
body:has(.tdr-directory) :is(.tdr-directory) a,
body.tdr-profile-page :is(.tdr-profile, .tdr-profile__warning) a,
body:has(.tdr-profile) :is(.tdr-profile, .tdr-profile__warning) a {
    text-decoration: none !important;
}

body.tdr-hero-page :is(.tdr-hero) :is(a, button, input, select, textarea),
body:has(.tdr-hero) :is(.tdr-hero) :is(a, button, input, select, textarea),
body.tdr-directory-page :is(.tdr-directory) :is(a, button, input, select, textarea),
body:has(.tdr-directory) :is(.tdr-directory) :is(a, button, input, select, textarea),
body.tdr-profile-page :is(.tdr-profile, .tdr-profile__warning) :is(a, button, input, select, textarea),
body:has(.tdr-profile) :is(.tdr-profile, .tdr-profile__warning) :is(a, button, input, select, textarea) {
    font-family: inherit !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    text-shadow: none !important;
    box-shadow: none !important;
}

/* ---- Hard reset for interactive fields (component CSS rebuilds visuals) ---- */
body.tdr-hero-page :is(.tdr-hero) :is(button, input, select, textarea),
body:has(.tdr-hero) :is(.tdr-hero) :is(button, input, select, textarea),
body.tdr-directory-page :is(.tdr-directory) :is(button, input, select, textarea),
body:has(.tdr-directory) :is(.tdr-directory) :is(button, input, select, textarea),
body.tdr-profile-page :is(.tdr-profile, .tdr-profile__warning) :is(button, input, select, textarea),
body:has(.tdr-profile) :is(.tdr-profile, .tdr-profile__warning) :is(button, input, select, textarea) {
    all: unset;
    box-sizing: border-box;
    font: inherit;
    color: inherit;
    line-height: 1.2;
}

body.tdr-hero-page :is(.tdr-hero) :is(input, select, textarea),
body:has(.tdr-hero) :is(.tdr-hero) :is(input, select, textarea),
body.tdr-directory-page :is(.tdr-directory) :is(input, select, textarea),
body:has(.tdr-directory) :is(.tdr-directory) :is(input, select, textarea),
body.tdr-profile-page :is(.tdr-profile, .tdr-profile__warning) :is(input, select, textarea),
body:has(.tdr-profile) :is(.tdr-profile, .tdr-profile__warning) :is(input, select, textarea) {
    appearance: none;
    -webkit-appearance: none;
}

/* Date inputs need their native rendering preserved for iOS Safari */
body.tdr-hero-page :is(.tdr-hero) input[type="date"],
body:has(.tdr-hero) :is(.tdr-hero) input[type="date"],
body.tdr-directory-page :is(.tdr-directory) input[type="date"],
body:has(.tdr-directory) :is(.tdr-directory) input[type="date"] {
    all: revert !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    background: transparent !important;
    border: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    width: 100% !important;
    min-width: 120px !important;
    min-height: 24px !important;
    font: inherit !important;
    color: inherit !important;
    color-scheme: light !important;
    cursor: pointer !important;
}
