/* Whole-site dark theme (Astra + WordPress content outside store shells) */

html[data-store-theme="dark"] {
    color-scheme: dark;
}

/* Base page */

html[data-store-theme="dark"] body {
    background-color: var(--store-color-surface, #0f172a);
    color: var(--store-color-text, #f8fafc);
}

html[data-store-theme="dark"] #page,
html[data-store-theme="dark"] #content,
html[data-store-theme="dark"] .site-content,
html[data-store-theme="dark"] #primary {
    background-color: var(--store-color-surface, #0f172a);
    color: var(--store-color-text, #f8fafc);
}

html[data-store-theme="dark"] #content > .ast-container,
html[data-store-theme="dark"] .ast-separate-container,
html[data-store-theme="dark"] .ast-plain-container {
    background-color: transparent;
    color: inherit;
}

/* Elementor page chrome (landing, blog, static pages) */

html[data-store-theme="dark"] .entry-content > .elementor,
html[data-store-theme="dark"] .entry-content .elementor-section,
html[data-store-theme="dark"] .entry-content .e-con,
html[data-store-theme="dark"] .entry-content .e-con-inner,
html[data-store-theme="dark"] .entry-content .elementor-widget-wrap,
html[data-store-theme="dark"] body.store-page-active .entry-content > .elementor,
html[data-store-theme="dark"] body.store-page-active .entry-content .e-con,
html[data-store-theme="dark"] body.store-page-active .entry-content .e-con-inner {
    background-color: var(--store-color-surface, #0f172a) !important;
    color: var(--store-color-text, #f8fafc);
}

/* Typography — body copy */

html[data-store-theme="dark"] #content a:not(.store-shell a):not(.store-site-header a):not(.product-card-button):not(.add_to_cart_button):not(.elementor-button-link),
html[data-store-theme="dark"] .entry-content a:not(.store-shell a):not(.product-card-button):not(.add_to_cart_button):not(.elementor-button-link) {
    color: var(--store-color-primary, #60a5fa);
}

html[data-store-theme="dark"] #content a:not(.store-shell a):not(.store-site-header a):not(.product-card-button):not(.add_to_cart_button):not(.elementor-button-link):hover,
html[data-store-theme="dark"] #content a:not(.store-shell a):not(.store-site-header a):not(.product-card-button):not(.add_to_cart_button):not(.elementor-button-link):focus,
html[data-store-theme="dark"] .entry-content a:not(.store-shell a):not(.product-card-button):not(.add_to_cart_button):not(.elementor-button-link):hover,
html[data-store-theme="dark"] .entry-content a:not(.store-shell a):not(.product-card-button):not(.add_to_cart_button):not(.elementor-button-link):focus {
    color: var(--store-color-primary-soft, #93c5fd);
}

html[data-store-theme="dark"] #content p,
html[data-store-theme="dark"] #content li,
html[data-store-theme="dark"] #content .entry-content,
html[data-store-theme="dark"] .entry-content p,
html[data-store-theme="dark"] .entry-content li,
html[data-store-theme="dark"] .entry-content ul,
html[data-store-theme="dark"] .entry-content ol,
html[data-store-theme="dark"] .entry-content .elementor-widget-text-editor,
html[data-store-theme="dark"] .entry-content .elementor-widget-text-editor .elementor-widget-container,
html[data-store-theme="dark"] .entry-content .elementor-widget-text-editor .elementor-widget-container div,
html[data-store-theme="dark"] .entry-content .elementor-widget-text-editor p {
    color: var(--store-color-text, #f8fafc) !important;
    -webkit-text-fill-color: currentColor !important;
}

html[data-store-theme="dark"] .entry-content .elementor-widget-text-editor h1,
html[data-store-theme="dark"] .entry-content .elementor-widget-text-editor h2,
html[data-store-theme="dark"] .entry-content .elementor-widget-text-editor h3,
html[data-store-theme="dark"] .entry-content .elementor-widget-text-editor h4 {
    color: var(--store-color-text-strong, #f1f5f9) !important;
    -webkit-text-fill-color: currentColor !important;
}

html[data-store-theme="dark"] .entry-content .elementor-widget-text-editor hr {
    border-color: var(--store-color-border, #334155) !important;
}

/* Elementor text widgets with inline light gray/white info boxes */
html[data-store-theme="dark"] .entry-content .elementor-widget-text-editor .elementor-widget-container div[style*="background"] {
    background: var(--store-color-white, #1e293b) !important;
    background-color: var(--store-color-white, #1e293b) !important;
}

html[data-store-theme="dark"] #content span,
html[data-store-theme="dark"] #content label,
html[data-store-theme="dark"] .entry-content span,
html[data-store-theme="dark"] .entry-content label {
    color: inherit;
}

/* Typography — titles */

html[data-store-theme="dark"] #content h1,
html[data-store-theme="dark"] #content .entry-title,
html[data-store-theme="dark"] #content .page-title,
html[data-store-theme="dark"] .entry-content h1,
html[data-store-theme="dark"] .entry-title,
html[data-store-theme="dark"] .page-title {
    color: var(--store-color-text-strong, #f1f5f9);
    -webkit-text-fill-color: currentColor;
}

html[data-store-theme="dark"] #content h2,
html[data-store-theme="dark"] #content h3,
html[data-store-theme="dark"] .entry-content h2,
html[data-store-theme="dark"] .entry-content h3,
html[data-store-theme="dark"] .entry-content .elementor-heading-title,
html[data-store-theme="dark"] .entry-content .elementor-widget-heading .elementor-heading-title {
    color: var(--store-color-text-strong, #f1f5f9) !important;
    -webkit-text-fill-color: currentColor !important;
}

html[data-store-theme="dark"] #content h4,
html[data-store-theme="dark"] #content h5,
html[data-store-theme="dark"] #content h6,
html[data-store-theme="dark"] .entry-content h4,
html[data-store-theme="dark"] .entry-content h5,
html[data-store-theme="dark"] .entry-content h6 {
    color: var(--store-color-title, #e2e8f0);
    -webkit-text-fill-color: currentColor;
}

html[data-store-theme="dark"] .ast-archive-description {
    color: var(--store-color-text-soft, #e2e8f0);
}

html[data-store-theme="dark"] .ast-article-single {
    color: var(--store-color-text, #f8fafc);
}

/* Forms */

html[data-store-theme="dark"] input:not([type="checkbox"]):not([type="radio"]),
html[data-store-theme="dark"] textarea,
html[data-store-theme="dark"] select {
    background-color: var(--store-color-white, #1e293b);
    border-color: var(--store-color-border, #334155);
    color: var(--store-color-text, #f8fafc);
}

html[data-store-theme="dark"] input::placeholder,
html[data-store-theme="dark"] textarea::placeholder {
    color: var(--store-color-text-muted, #b8c5d6);
}

/* Header */

html[data-store-theme="dark"] .site-header,
html[data-store-theme="dark"] .main-header-bar,
html[data-store-theme="dark"] .ast-primary-header-bar {
    background-color: var(--store-color-surface, #0f172a);
    border-color: var(--store-color-border, #334155);
    color: var(--store-color-text, #f8fafc);
}

html[data-store-theme="dark"] .main-navigation a {
    color: var(--store-color-text-soft, #e2e8f0);
}

/* Footer — backgrounds (Astra native + builder wraps) */

html[data-store-theme="dark"] .site-footer,
html[data-store-theme="dark"] .site-footer-section,
html[data-store-theme="dark"] .site-primary-footer-wrap,
html[data-store-theme="dark"] .site-primary-footer-wrap[data-section="section-primary-footer-builder"],
html[data-store-theme="dark"] .site-secondary-footer-wrap,
html[data-store-theme="dark"] .site-below-footer-wrap,
html[data-store-theme="dark"] .site-below-footer-wrap[data-section="section-below-footer-builder"],
html[data-store-theme="dark"] .ast-small-footer,
html[data-store-theme="dark"] .ast-footer-overlay,
html[data-store-theme="dark"] .footer-adv,
html[data-store-theme="dark"] .footer-adv-overlay,
html[data-store-theme="dark"] [data-section="section-primary-footer-builder"],
html[data-store-theme="dark"] [data-section="section-below-footer-builder"] {
    background-color: var(--store-color-surface, #0f172a) !important;
    background-image: none !important;
    border-color: var(--store-color-border, #334155);
    color: var(--store-color-text, #f8fafc);
}

/* Footer — Elementor Theme Builder (site uses elementor-location-footer, not Astra .site-footer) */

html[data-store-theme="dark"] footer.elementor-location-footer,
html[data-store-theme="dark"] .elementor-location-footer,
html[data-store-theme="dark"] .elementor-location-footer .e-con,
html[data-store-theme="dark"] .elementor-location-footer .e-con-inner,
html[data-store-theme="dark"] .elementor-location-footer .elementor-section,
html[data-store-theme="dark"] .elementor-location-footer .elementor-widget-wrap {
    background-color: var(--store-color-surface, #0f172a) !important;
    background-image: none !important;
    color: var(--store-color-text, #f8fafc);
}

/* Copyright strip — Elementor primary bar; not tied to --store-color-surface */
html[data-store-theme="dark"] .elementor-location-footer .elementor-element-69ad81ae,
html[data-store-theme="dark"] .elementor-location-footer .elementor-element-69ad81ae > .e-con-inner,
html[data-store-theme="dark"] .elementor-location-footer [data-id="69ad81ae"],
html[data-store-theme="dark"] .elementor-location-footer [data-id="69ad81ae"] > .e-con-inner {
    background-color: var(--e-global-color-primary, #1d4ed8) !important;
    background-image: none !important;
    color: var(--e-global-color-astglobalcolor4, #ffffff);
}

html[data-store-theme="dark"] .elementor-location-footer .elementor-heading-title,
html[data-store-theme="dark"] .elementor-location-footer .elementor-image-box-title {
    color: var(--store-color-text-strong, #f1f5f9) !important;
    -webkit-text-fill-color: currentColor !important;
}

html[data-store-theme="dark"] .elementor-location-footer .elementor-element-d9c7f60 .elementor-heading-title,
html[data-store-theme="dark"] .elementor-location-footer [data-id="d9c7f60"] .elementor-heading-title {
    color: var(--e-global-color-astglobalcolor4, #ffffff) !important;
    -webkit-text-fill-color: currentColor !important;
}

html[data-store-theme="dark"] .elementor-location-footer .elementor-image-box-description,
html[data-store-theme="dark"] .elementor-location-footer .elementor-icon-list-text,
html[data-store-theme="dark"] .elementor-location-footer .elementor-icon-list-item a,
html[data-store-theme="dark"] .elementor-location-footer .elementor-nav-menu--main .elementor-item,
html[data-store-theme="dark"] .elementor-location-footer .elementor-nav-menu--dropdown .elementor-item {
    color: var(--store-color-text-soft, #e2e8f0) !important;
    -webkit-text-fill-color: currentColor !important;
    fill: var(--store-color-text-soft, #e2e8f0) !important;
}

html[data-store-theme="dark"] .elementor-location-footer .elementor-icon-list-item:hover .elementor-icon-list-text,
html[data-store-theme="dark"] .elementor-location-footer .elementor-nav-menu--main .elementor-item:hover,
html[data-store-theme="dark"] .elementor-location-footer .elementor-nav-menu--main .elementor-item:focus {
    color: var(--store-color-primary-soft, #93c5fd) !important;
    -webkit-text-fill-color: currentColor !important;
    fill: var(--store-color-primary-soft, #93c5fd) !important;
}

html[data-store-theme="dark"] .elementor-location-footer .elementor-icon-list-icon i {
    color: var(--store-color-text-muted, #b8c5d6) !important;
}

html[data-store-theme="dark"] .elementor-location-footer .elementor-social-icon i,
html[data-store-theme="dark"] .elementor-location-footer .elementor-social-icon svg {
    color: var(--store-color-primary, #60a5fa) !important;
    fill: var(--store-color-primary, #60a5fa) !important;
}

html[data-store-theme="dark"] .elementor-location-footer .elementor-social-icon:hover i,
html[data-store-theme="dark"] .elementor-location-footer .elementor-social-icon:hover svg {
    color: var(--store-color-primary-soft, #93c5fd) !important;
    fill: var(--store-color-primary-soft, #93c5fd) !important;
}

/* Footer — typography (Astra widgets) */

html[data-store-theme="dark"] .footer-widget-area,
html[data-store-theme="dark"] .footer-widget-area p,
html[data-store-theme="dark"] .footer-widget-area li {
    color: var(--store-color-text, #f8fafc);
}

html[data-store-theme="dark"] .footer-widget-area .widget-title,
html[data-store-theme="dark"] .footer-widget-area h1,
html[data-store-theme="dark"] .footer-widget-area h2,
html[data-store-theme="dark"] .footer-widget-area h3,
html[data-store-theme="dark"] .footer-widget-area h4 {
    color: var(--store-color-text-strong, #f1f5f9);
}

html[data-store-theme="dark"] .footer-widget-area a {
    color: var(--store-color-primary, #60a5fa);
}

html[data-store-theme="dark"] .footer-widget-area a:hover,
html[data-store-theme="dark"] .footer-widget-area a:focus {
    color: var(--store-color-primary-soft, #93c5fd);
}

html[data-store-theme="dark"] .ast-footer-copyright,
html[data-store-theme="dark"] .ast-footer-copyright a {
    color: var(--store-color-text-muted, #b8c5d6);
}

/* Widgets / blog */

html[data-store-theme="dark"] .widget {
    color: var(--store-color-text-soft, #e2e8f0);
}

html[data-store-theme="dark"] .widget-title {
    color: var(--store-color-text-strong, #f1f5f9);
}

html[data-store-theme="dark"] button,
html[data-store-theme="dark"] .button,
html[data-store-theme="dark"] input[type="submit"],
html[data-store-theme="dark"] input[type="button"] {
    color: inherit;
}

html[data-store-theme="dark"] ::selection {
    background: rgba(59, 130, 246, 0.35);
    color: var(--store-color-text, #f8fafc);
}

/* My Account — address cards (Adreslerim) */

html[data-store-theme="dark"] body.woocommerce-account .woocommerce-Address,
html[data-store-theme="dark"] body.woocommerce-account .woocommerce-Addresses > .woocommerce-Address,
html[data-store-theme="dark"] body.woocommerce-account .woocommerce-Addresses > .u-column1,
html[data-store-theme="dark"] body.woocommerce-account .woocommerce-Addresses > .u-column2,
html[data-store-theme="dark"] body.woocommerce-account .woocommerce-Addresses > .col-1,
html[data-store-theme="dark"] body.woocommerce-account .woocommerce-Addresses > .col-2,
html[data-store-theme="dark"] body.woocommerce-account .store-account-shell .woocommerce-Address,
html[data-store-theme="dark"] body.woocommerce-account .store-account-shell .woocommerce-address-fields {
    background-color: #1e293b !important;
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #f8fafc;
}

html[data-store-theme="dark"] body.woocommerce-account .woocommerce-Address .title h2,
html[data-store-theme="dark"] body.woocommerce-account .woocommerce-Address .title h3,
html[data-store-theme="dark"] body.woocommerce-account .woocommerce-Address address,
html[data-store-theme="dark"] body.woocommerce-account .woocommerce-Address .woocommerce-Address-title {
    color: #f8fafc;
}

html[data-store-theme="dark"] body.woocommerce-account .woocommerce-Address .title h2,
html[data-store-theme="dark"] body.woocommerce-account .woocommerce-Address .title h3 {
    color: #60a5fa;
}

html[data-store-theme="dark"] body.woocommerce-account .store-account-shell .woocommerce-MyAccount-content {
    background: transparent !important;
    background-color: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

/* Order pay (PayTR) — native WooCommerce markup, no store-checkout-shell */

html[data-store-theme="dark"] body.woocommerce-order-pay,
html[data-store-theme="dark"] body.woocommerce-order-pay#error-page {
    background-color: var(--store-color-surface, #0f172a) !important;
    color: var(--store-color-text, #f8fafc);
}

html[data-store-theme="dark"] body.woocommerce-order-pay .order_details,
html[data-store-theme="dark"] body.woocommerce-order-pay ul.order_details {
    background-color: var(--store-color-white, #1e293b) !important;
    border: 1px solid var(--store-color-border, #334155);
    border-radius: var(--store-radius-card, 24px);
    color: var(--store-color-text, #f8fafc);
}

html[data-store-theme="dark"] body.woocommerce-order-pay .order_details li,
html[data-store-theme="dark"] body.woocommerce-order-pay ul.order_details li {
    color: var(--store-color-text-muted, #b8c5d6);
    border-bottom-color: var(--store-color-border, #334155);
}

html[data-store-theme="dark"] body.woocommerce-order-pay .order_details strong,
html[data-store-theme="dark"] body.woocommerce-order-pay ul.order_details strong {
    color: var(--store-color-text, #f8fafc);
}

html[data-store-theme="dark"] body.woocommerce-order-pay #paytriframe,
html[data-store-theme="dark"] body.woocommerce-order-pay iframe[src*="paytr.com"] {
    filter: none !important;
    -webkit-filter: none !important;
    color-scheme: light;
}

/* PayTR gateway description (WooCommerce .payment_box) on order-pay */
html[data-store-theme="dark"] body.woocommerce-order-pay #payment .payment_box,
html[data-store-theme="dark"] body.woocommerce-order-pay .wc_payment_methods .payment_box {
    background: var(--store-color-white, #1e293b) !important;
    color: var(--store-color-text-soft, #e2e8f0) !important;
    border: 1px solid var(--store-color-border, #334155);
}

html[data-store-theme="dark"] body.woocommerce-order-pay #payment .payment_box p,
html[data-store-theme="dark"] body.woocommerce-order-pay .wc_payment_methods .payment_box p {
    color: var(--store-color-text-soft, #e2e8f0) !important;
    -webkit-text-fill-color: currentColor !important;
}
