/* Vihar final black/white theme layer. Loaded last on public and admin pages. */
html[data-theme="light"] {
  --bg:#ffffff;
  --section:#f7f7f7;
  --surface:var(--section);
  --card:#ffffff;
  --text:#000000;
  --heading:#000000;
  --muted:#444444;
  --border:#dddddd;
  --accent:#000000;
  --accent-text:#ffffff;
  --btn-bg:#000000;
  --btn-text:#ffffff;
  --btn-outline-bg:#ffffff;
  --btn-outline-text:#000000;
  --btn-outline-border:#222222;
  --icon-bg:#f2f2f2;
  --icon-color:#000000;
  --input-bg:#ffffff;
  --input-text:#000000;
  --input-border:#cccccc;
  --star:#f5c542;
  --blue:var(--accent);
  --blue-lt:var(--accent);
  --primary:var(--accent);
  --primary-soft:var(--section);
  --a-bg:var(--bg);
  --a-surface:var(--section);
  --a-card:var(--card);
  --a-border:var(--border);
  --a-white:var(--text);
  --a-muted:var(--muted);
  --a-gray:var(--muted);
  --a-gray-lt:var(--border);
  --a-accent:var(--accent);
  --black:var(--bg);
  --black2:var(--card);
  --white:var(--heading);
  color-scheme:light;
}

html[data-theme="dark"] {
  --bg:#000000;
  --section:#050505;
  --surface:var(--section);
  --card:#111111;
  --text:#ffffff;
  --heading:#ffffff;
  --muted:#c7c7c7;
  --border:#333333;
  --accent:#ffffff;
  --accent-text:#000000;
  --btn-bg:#ffffff;
  --btn-text:#000000;
  --btn-outline-bg:#000000;
  --btn-outline-text:#ffffff;
  --btn-outline-border:#555555;
  --icon-bg:#151515;
  --icon-color:#ffffff;
  --input-bg:#111111;
  --input-text:#ffffff;
  --input-border:#444444;
  --star:#f5c542;
  --blue:var(--accent);
  --blue-lt:var(--accent);
  --primary:var(--accent);
  --primary-soft:var(--section);
  --a-bg:var(--bg);
  --a-surface:var(--section);
  --a-card:var(--card);
  --a-border:var(--border);
  --a-white:var(--text);
  --a-muted:var(--muted);
  --a-gray:var(--muted);
  --a-gray-lt:var(--border);
  --a-accent:var(--accent);
  --black:var(--bg);
  --black2:var(--card);
  --white:var(--heading);
  color-scheme:dark;
}

html[data-theme],
html[data-theme] body {
  background:var(--bg);
  color:var(--text);
}

html[data-theme] :where(.hero,.section,.section-pad,.section-dark,.page-hero,.partners-section,.usp-section,.cta-section,.product-faq-section,.product-reviews-section,.admin-content) {
  background:var(--bg);
  color:var(--text);
}

html[data-theme] :where(nav,.nav-links,.usp-banner,footer,.admin-sidebar,.admin-header,.login-wrap) {
  background:var(--card);
  color:var(--text);
  border-color:var(--border);
}

html[data-theme] :where(.card,.product-card,.service-card,.tech-partner-card,.usp-card,.why-card,.partner-card,.contact-form-wrap,.checkout-summary,.checkout-form-wrap,.order-receipt,.sidebar-card,.product-review-card,.product-review-reply,.product-faq-item,.page-box,.chat-window,.a-card,.a-table-wrap,.dashboard-table-card,.login-wrap) {
  background:var(--card);
  color:var(--text);
  border-color:var(--border);
  box-shadow:none;
}

html[data-theme] :where(h1,h2,h3,h4,h5,h6,.hero-title,.section-title,.product-name,.price-now,.price-current,.nav-logo,.nav-logo-text,.chat-name,.admin-page-title,.sidebar-brand,.login-logo h2,.a-card-head h3,.a-section-head) {
  color:var(--heading);
  -webkit-text-fill-color:currentColor;
}

html[data-theme] :where(p,li,td,th,label,small,.hero-desc,.section-subtitle,.page-hero p,.product-desc,.product-tagline,.product-features li,.product-detail-features li,.feature-list-big li,.summary-features li,.sidebar-note,.footer-brand p,.footer-links li a,.footer-contact p,.footer-contact a,.product-review-card p,.product-review-reply p,.product-review-answer summary,.product-faq-item p,.blog-content,.prose-section,.prose-section p,.affiliate-card p,.partner-card p,.a-card p,.a-table td,.a-form-group label,.a-form-group small,.a-doc-note,.admin-user,.sidebar-nav a,.sidebar-logout) {
  color:var(--text);
}

html[data-theme] :where(.muted,.price-old,.receipt-row span,.summary-line span:first-child,.product-review-card small,.product-reviews-pager-status,.product-reviews-page-ellipsis,.footer-links h4,.footer-contact h4,.chat-status,.a-card-head .a-link,.a-detail-row span) {
  color:var(--muted);
}

html[data-theme] :where(a,.nav-links a,.nav-link-button,.nav-dropdown-toggle,.nav-dropdown-item,.footer-links li a,.footer-contact a,.contact-item a,.a-link) {
  color:var(--text);
}

html[data-theme] :where(a:hover,.nav-links a:hover,.nav-links a.active,.nav-link-button:hover,.nav-dropdown-toggle:hover,.footer-links li a:hover,.footer-contact a:hover,.contact-item a:hover,.a-link:hover) {
  color:var(--heading);
  background:var(--section);
}

html[data-theme] .gradient-text {
  background:none;
  color:var(--heading);
  -webkit-text-fill-color:var(--heading);
}

html[data-theme] :where(i,.fa,.fas,.far,.fab,.fa-solid,.fa-regular,.fa-brands,svg.icon) {
  color:var(--icon-color);
}

html[data-theme] :where(.product-icon-wrap,.service-icon,.usp-icon,.product-card-icon-fallback,.product-detail-icon-fallback,.chat-avatar,.footer-socials a,.theme-switcher button,.theme-btn,.floating-contact-btn,.chat-fab,.sidebar-toggle) {
  background:var(--icon-bg);
  color:var(--icon-color);
  border:1px solid var(--border);
  box-shadow:0 10px 24px rgba(0,0,0,.12);
  transition:transform .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease;
}

html[data-theme] :where(.product-icon-wrap:hover,.service-icon:hover,.usp-icon:hover,.footer-socials a:hover,.theme-switcher button:hover,.theme-switcher button.is-active,.theme-btn:hover,.theme-btn.active,.theme-btn.is-active,.floating-contact-btn:hover,.chat-fab:hover,.sidebar-toggle:hover) {
  transform:translateY(-1px);
  background:var(--btn-bg);
  color:var(--btn-text);
  box-shadow:0 14px 30px rgba(0,0,0,.18);
}

html[data-theme] :where(.product-icon,.product-icon-wrap i,.service-icon i,.usp-icon i,.product-card-icon-fallback i,.product-detail-icon-fallback i,.chat-avatar i,.footer-socials a i,.theme-switcher button i,.theme-btn i,.floating-contact-btn i,.chat-fab i,.sidebar-toggle i) {
  color:currentColor;
}

html[data-theme] :where(.btn-buy,.btn-primary,.btn-hero-primary,.nav-cta,.chat-footer button,.a-btn-primary,.account-profile-submit,.customer-order-link,.payment-retry-btn) {
  background:var(--btn-bg);
  color:var(--btn-text);
  border-color:var(--btn-bg);
}

html[data-theme] :where(.btn-details,.btn-outline,.btn-hero-secondary,.product-feature-toggle,.product-reviews-page-number,.a-btn,.sidebar-logout,.billing-option,.theme-switcher,.login-theme-controls,.admin-theme-switcher) {
  background:var(--btn-outline-bg);
  color:var(--btn-outline-text);
  border-color:var(--btn-outline-border);
}

html[data-theme] :where(.btn-buy i,.btn-primary i,.btn-hero-primary i,.nav-cta i,.chat-footer button i,.a-btn-primary i,.btn-details i,.btn-outline i,.btn-hero-secondary i,.product-feature-toggle i,.a-btn i,.sidebar-logout i,.billing-option i) {
  color:currentColor;
}

html[data-theme] :where(.btn-buy:hover,.btn-primary:hover,.btn-hero-primary:hover,.nav-cta:hover,.chat-footer button:hover,.a-btn-primary:hover) {
  filter:none;
  opacity:.92;
  transform:translateY(-1px);
}

html[data-theme] :where(.btn-details:hover,.btn-outline:hover,.btn-hero-secondary:hover,.product-feature-toggle:hover,.a-btn:hover,.sidebar-logout:hover,.billing-option:hover,.billing-option.active,.sidebar-nav a:hover,.sidebar-nav a.active) {
  background:var(--section);
  color:var(--heading);
  border-color:var(--btn-outline-border);
}

html[data-theme] :where(input,select,textarea,.form-group input,.form-group select,.form-group textarea,.chat-footer input,.product-review-answer input,.product-review-answer select,.product-review-answer textarea,.a-form-group input,.a-form-group select,.a-form-group textarea,.a-select,.a-input-sm,.a-card input,.a-card select,.a-card textarea) {
  background:var(--input-bg);
  color:var(--input-text);
  border-color:var(--input-border);
  caret-color:var(--input-text);
}

html[data-theme] :where(input::placeholder,textarea::placeholder,.form-group input::placeholder,.form-group textarea::placeholder,.chat-footer input::placeholder,.a-form-group input::placeholder,.a-form-group textarea::placeholder) {
  color:var(--muted);
  opacity:1;
}

html[data-theme] :where(.product-card-media,.product-detail-media,.partner-chip,.chat-msg.bot,.chat-header,.chat-footer,.footer-payment-logo,.a-alert,.a-doc-note) {
  background:var(--section);
  color:var(--text);
  border-color:var(--border);
}

html[data-theme] :where(.product-badge,.badge-paid,.badge-pending,.verified-badge,.product-review-verified,.sidebar-badge) {
  background:var(--section);
  color:var(--text);
  border:1px solid var(--border);
}

html[data-theme] :where(.product-review-stars i,.review-stars i,.rating-stars i,.fa-star.review-star) {
  color:var(--star);
}

html[data-theme] :where(.floating-contact-whatsapp,.floating-contact-call,.chat-fab,.chat-window .chat-avatar) {
  background:var(--btn-bg);
  color:var(--btn-text);
  border-color:var(--btn-bg);
}

html[data-theme] :where(.floating-contact-whatsapp i,.floating-contact-call i,.chat-fab svg,.chat-fab svg *,.chat-window .chat-avatar i) {
  color:var(--btn-text);
  fill:currentColor;
  stroke:currentColor;
}

html[data-theme] :where(.nav-logo-icon:not(img),.nav-logo-icon:not(img) *) {
  color:var(--icon-color);
  fill:currentColor;
  stroke:currentColor;
}

html[data-theme] :where([style*="color:#fff"],[style*="color: #fff"],[style*="color:white"],[style*="color: white"],[style*="color:#FFFFFF"],[style*="color: #FFFFFF"],[style*="color:#000"],[style*="color: #000"],[style*="color:black"],[style*="color: black"],[style*="color:#60A5FA"],[style*="color: #60A5FA"],[style*="color:#2563eb"],[style*="color: #2563eb"],[style*="color:#3b82f6"],[style*="color: #3b82f6"],[style*="color:#aaa"],[style*="color: #aaa"],[style*="color:rgba(255,255,255"],[style*="color: rgba(255,255,255"],[style*="color:rgba(0,0,0"],[style*="color: rgba(0,0,0"]) {
  color:var(--text) !important;
  -webkit-text-fill-color:currentColor !important;
}

html[data-theme] :where([style*="background:#fff"],[style*="background: #fff"],[style*="background:white"],[style*="background: white"],[style*="background:#FFFFFF"],[style*="background: #FFFFFF"],[style*="background:#000"],[style*="background: #000"],[style*="background:black"],[style*="background: black"],[style*="background:#2563eb"],[style*="background: #2563eb"],[style*="background:#3b82f6"],[style*="background: #3b82f6"]) {
  background:var(--card) !important;
}

html[data-theme] :where(.btn-buy[style],.btn-primary[style],.btn-hero-primary[style],.nav-cta[style]) {
  background:var(--btn-bg) !important;
  color:var(--btn-text) !important;
}

html[data-theme] :where(.btn-details[style],.btn-outline[style],.btn-hero-secondary[style]) {
  background:var(--btn-outline-bg) !important;
  color:var(--btn-outline-text) !important;
  border-color:var(--btn-outline-border) !important;
}

html[data-theme] :where(a[href],button,input,select,textarea,label,.nav-toggle,.sidebar-toggle,.chat-fab,.floating-contact-btn,.theme-switcher button,.admin-theme-switcher button) {
  pointer-events:auto;
}

html[data-theme] .chat-window:not(.open),
html[data-theme] .floating-contact-actions:not(.is-visible) {
  pointer-events:none;
}

html[data-theme] .chat-window.open,
html[data-theme] .floating-contact-actions.is-visible {
  pointer-events:auto;
}

html[data-theme] .admin-sidebar,
html[data-theme] .admin-sidebar *,
html[data-theme] .admin-header,
html[data-theme] .admin-header *,
html[data-theme] .admin-content,
html[data-theme] .admin-content * {
  -webkit-text-fill-color:currentColor;
}

html[data-theme] .sidebar-nav a,
html[data-theme] .sidebar-logout,
html[data-theme] .admin-user,
html[data-theme] .admin-page-title,
html[data-theme] .sidebar-brand,
html[data-theme] .sidebar-brand span {
  color:var(--text);
}

html[data-theme] .sidebar-nav a i,
html[data-theme] .sidebar-logout i,
html[data-theme] .admin-user i {
  color:currentColor;
}

html[data-theme="light"] .sidebar-nav a {
  color:#000000;
}

html[data-theme="light"] .sidebar-nav a:hover,
html[data-theme="light"] .sidebar-nav a.active,
html[data-theme="light"] .sidebar-logout:hover {
  background:#f2f2f2;
  color:#000000;
  border-color:#dddddd;
}

html[data-theme="dark"] .sidebar-nav a {
  color:#ffffff;
}

html[data-theme="dark"] .sidebar-nav a:hover,
html[data-theme="dark"] .sidebar-nav a.active,
html[data-theme="dark"] .sidebar-logout:hover {
  background:#151515;
  color:#ffffff;
  border-color:#333333;
}

html[data-theme] .floating-contact-btn,
html[data-theme] .floating-contact-whatsapp,
html[data-theme] .floating-contact-call,
html[data-theme] .chat-fab {
  background:var(--btn-bg);
  color:var(--btn-text);
  border-color:var(--btn-bg);
}

html[data-theme] .floating-contact-btn i,
html[data-theme] .floating-contact-whatsapp i,
html[data-theme] .floating-contact-call i,
html[data-theme] .chat-fab svg,
html[data-theme] .chat-fab svg * {
  color:var(--btn-text);
  fill:currentColor;
  stroke:currentColor;
}

@media (prefers-reduced-motion: reduce) {
  html[data-theme] :where(.product-icon-wrap,.service-icon,.usp-icon,.footer-socials a,.theme-btn,.floating-contact-btn,.chat-fab,.sidebar-toggle) {
    transition:none;
  }
}
