/*
Theme Name: דם - תבנית בת
Theme URI: https://www.dam.org.il/
Author: DAM Design Project
Description: Brand refinements for DAM Flow, the official volunteer blood donors nonprofit site. Activate this child after installing the DAM Flow parent theme.
Version: 1.7.3.1
Requires at least: 6.2
Requires PHP: 8.2
Template: dam-flow
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dam-flow-child
*/

/* Organization-specific refinements. The canonical palette is controlled in DAM Flow > Colors. */
.site-header .header-cta { box-shadow: 0 8px 24px rgb(221 51 51 / 18%); }
.hero::before { background: radial-gradient(circle at 72% 12%, rgb(255 255 255 / 10%), transparent 48%); }
.action-card:first-child .action-card-icon { background: var(--dam-brand-tint); color: var(--dam-brand-dark); }
.footer-accent { background: linear-gradient(90deg, var(--dam-brand), var(--dam-accent)); }

/* Old OceanWP child settings that still apply to the active plugins. */
#acwp-toolbar-btn { background: var(--dam-accent) !important; background-color: var(--dam-accent) !important; }
.wpcf7 .wpcf7-list-item { display: block; }
.wpcf7 input[type="number"] { max-width: 100%; }

/* Keep existing social icon brand colors on legacy font-icon links only;
 * do not override Elementor's configurable .elementor-social-icon widgets. */
.site :not(.elementor-social-icon) > .fa-rss::before { color: #db9514; }
.site :not(.elementor-social-icon) > .fa-linkedin::before { color: #1d5cae; }
.site :not(.elementor-social-icon) > .fa-facebook::before { color: #0548a0; }
.site :not(.elementor-social-icon) > .fa-twitter::before { color: #49c0fb; }
.site :not(.elementor-social-icon) > .fa-instagram::before { color: #ff4800; }
.site :not(.elementor-social-icon) > .fa-telegram::before { color: #0088cc; }
.site :not(.elementor-social-icon) > .fa-youtube::before { color: #c4302b; }

/* Keep the original Google Translate globe placement, using logical sides for RTL. */
.gglobe { position: fixed; inset-block-start: 12%; inset-inline-end: 1%; height: 40px; width: 40px; z-index: 600; }


/* 1.6.6: wpDataTables — dark-mode contrast ONLY, both Simple Tables and Data Tables.
   The plugin's light skin is left unchanged. Cell text colors are not forced with
   !important, so existing custom red/green conditional-formatting text survives.
   Official plugin hooks: .wpdt-c, table.wpDataTable, table.wpdtSimpleTable. */
:is(html[data-dam-theme="dark"], html.wp-dark-mode-active,
    html.mdm-dark-mode, html[data-mdm-dark-mode="dark"],
    html[data-theme="dark"], html.dark-mode, html.dark,
    body.wp-dark-mode-active, body.wp-dark-mode-enabled, body.dark-mode, body.dark)
    .wpdt-c :is(.wpDataTablesWrapper, .wpDataTables, .dataTables_wrapper) {
    background-color: transparent;
    color: #eaf0f7;
}
:is(html[data-dam-theme="dark"], html.wp-dark-mode-active,
    html.mdm-dark-mode, html[data-mdm-dark-mode="dark"],
    html[data-theme="dark"], html.dark-mode, html.dark,
    body.wp-dark-mode-active, body.wp-dark-mode-enabled, body.dark-mode, body.dark)
    .wpdt-c :is(table.wpDataTable, table.wpdtSimpleTable) {
    background-color: #1d2938 !important;
    color: #eaf0f7;
    border-color: #49586b;
}
:is(html[data-dam-theme="dark"], html.wp-dark-mode-active,
    html.mdm-dark-mode, html[data-mdm-dark-mode="dark"],
    html[data-theme="dark"], html.dark-mode, html.dark,
    body.wp-dark-mode-active, body.wp-dark-mode-enabled, body.dark-mode, body.dark)
    .wpdt-c :is(table.wpDataTable, table.wpdtSimpleTable) :is(th,td) {
    border-color: #49586b !important;
}
:is(html[data-dam-theme="dark"], html.wp-dark-mode-active,
    html.mdm-dark-mode, html[data-mdm-dark-mode="dark"],
    html[data-theme="dark"], html.dark-mode, html.dark,
    body.wp-dark-mode-active, body.wp-dark-mode-enabled, body.dark-mode, body.dark)
    .wpdt-c :is(table.wpDataTable, table.wpdtSimpleTable) thead :is(th,td) {
    background-color: #2c3c50 !important;
    color: #f5f7fa !important;
}
:is(html[data-dam-theme="dark"], html.wp-dark-mode-active,
    html.mdm-dark-mode, html[data-mdm-dark-mode="dark"],
    html[data-theme="dark"], html.dark-mode, html.dark,
    body.wp-dark-mode-active, body.wp-dark-mode-enabled, body.dark-mode, body.dark)
    .wpdt-c :is(table.wpDataTable, table.wpdtSimpleTable) tbody tr:nth-child(odd) > :is(td,th) {
    background-color: #1c2939 !important;
    color: #eaf0f7;
}
:is(html[data-dam-theme="dark"], html.wp-dark-mode-active,
    html.mdm-dark-mode, html[data-mdm-dark-mode="dark"],
    html[data-theme="dark"], html.dark-mode, html.dark,
    body.wp-dark-mode-active, body.wp-dark-mode-enabled, body.dark-mode, body.dark)
    .wpdt-c :is(table.wpDataTable, table.wpdtSimpleTable) tbody tr:nth-child(even) > :is(td,th) {
    background-color: #253447 !important;
    color: #eaf0f7;
}
:is(html[data-dam-theme="dark"], html.wp-dark-mode-active,
    html.mdm-dark-mode, html[data-mdm-dark-mode="dark"],
    html[data-theme="dark"], html.dark-mode, html.dark,
    body.wp-dark-mode-active, body.wp-dark-mode-enabled, body.dark-mode, body.dark)
    .wpdt-c :is(table.wpDataTable, table.wpdtSimpleTable) tbody tr:hover > :is(td,th) {
    background-color: #31465e !important;
}


/* DAM Flow 1.6.7 — site-specific legacy overflow and reCAPTCHA rules. */
/* keep site width at 100% without dripping to the sides */
html, body {
    width: 100%;
    overflow-x: hidden;
}
/* end of keep site width at 100% without dripping to the sides */

/* Remove Google  Re-Captcha button right-bottom */
.grecaptcha-badge {
    opacity: 0;
}
/* End of Remove Google button right-bottom */

/* DAM Flow 1.7.0 - Elementor H1/H2 only.
 * Preserve Elementor Free's selected widget colors, global palette and inline
 * declarations. A heading without a configured color should fall back to the
 * original organization's red, rather than inheriting the theme's grey/white
 * body text (especially in dark mode).
 *
 * This is intentionally placed in a CSS cascade layer: normal unlayered
 * Elementor CSS, including generated per-widget rules, ALWAYS wins. We set
 * an inherited fallback on the Heading widget, not a color on the heading
 * element, so explicitly styled widget titles/containers keep full control.
 * Text Editor widgets, H3-H6, hero headings and core theme markup are untouched.
 * :has() is supported by current Chrome, Firefox and Safari.
 */
@layer dam-flow-heading-defaults {
    :where(.dam-elementor-content .elementor-widget-heading:has(.elementor-heading-title:is(h1, h2))) {
        color: var(--dam-brand, #dd3333);
    }
}


/* 1.7.3.1: Optional social-links widget only. No footer or global layout overrides. */
.dam-flow-child-social-widget .dam-flow-child-social-links {
    justify-content: flex-start;
    max-width: 100%;
}
/* The footer's translucent tiles need a dark base when placed on a light sidebar. */
.dam-flow-child-social-widget .dam-flow-child-social-links .footer-social-link {
    background: #1e2936;
    border-color: #526174;
    color: #e9f4ff !important;
    text-decoration: none;
}
.dam-flow-child-social-widget .dam-flow-child-social-links .footer-social-link:hover,
.dam-flow-child-social-widget .dam-flow-child-social-links .footer-social-link:focus-visible {
    background: var(--dam-brand-dark, #a82222);
    border-color: var(--dam-brand-dark, #a82222);
    color: #fff !important;
}
