/*
 Theme Name:   WebNQ
 Theme URI:    https://webnq.com/
 Description:  GeneratePress Child Theme for Mobile Responsive code block Share Website.
 Author:       WebNQ.com
 Author URI:   https://webnq.com
 Template:     generatepress
 Version:      1.0
*/

.main-navigation {
	box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
}
.inb-scroll-menu {
    background: white;
    display: block !important;
    color: black;
	width: 100%;
    overflow-x: auto;
	white-space: nowrap;
    position: fixed;
    box-shadow: 0 3px 4px rgb(0 0 0 / 13%) !important;
    z-index: 10000;
    border-top: 1px solid #ccc;
}
/*Horizontal scrolling*/
.horiz-scroll {
	flex-wrap: nowrap!important;
	overflow-x: auto!important;
}
.wplite-banner-ads {
	margin-bottom: 15px;
}
/* WP Image*/
.size-auto, .size-full, .size-large, .size-medium, .size-thumbnail {
	margin-bottom: 20px;
}
.gb-container .wp-block-image img {
	border-radius: 5px;
	margin-bottom: 5px;
}
/* Sticky widgets */ 
.auto-width.gb-query-loop-wrapper {
    flex: 1;
}
@media (min-width: 768px) {
.sticky-container > .gb-inside-container,.sticky-container {
    position: sticky;
    top: 80px;
}
#right-sidebar .inside-right-sidebar {
    height: 100%;
}
}
select#wp-block-categories-1 {
    width: 100%;
}
/* Rank MathCSS */
.rank-math-breadcrumb p {
	background: #e5e8ec;
	color: #000000;
	padding: 5px 10px;
	border-radius: 4px;
    font-size: 11px;
	font-weight: 700;
}
@media (max-width: 768px){
	.rank-math-breadcrumb p {
		margin: 0px 10px;
	}
}
/*Table of contents*/
#toc_container li a {
    display: block;
    width: 100%;
    color: var(--link-text);
    padding: 10px 1em;
    border-top: 1px solid #aaa;
}
#toc_container {
    background: #f9f9f900;
    border: 1px solid #aaa;
    padding: 0px;
}
#toc_container span.toc_toggle {
    font-weight: 400;
    background: #fff;
    padding: 3px 20px;
    font-size: 18px;
    text-transform: capitalize;
    text-align: center;
    display: block;
}
/*Post Date*/
.post-dates {
    font-size: 12px;
	font-weight: 400;
    color: var(--text-1);
}
/* social-sharing-icon */ 
.sticky-social-icons {
     position: fixed!important;
     right:0!important;
     top: 45%!important;
}
/*WhatsApp Highlight*/
.whatsapphighlight {
	animation: WPLiteTheme-GreenBorderAnimation 1s infinite;
}
@keyframes WPLiteTheme-GreenBorderAnimation {
	0% {
		border-color: transparent;
	}
	50% {
		border-color: #25d366;
	}
	100% {
		border-color: transparent;
	}
}
/*Tag Cloud*/
.widget_epcl_tag_cloud a, .widget_tag_cloud a, .wp-block-tag-cloud a {
    font-size: 12px!important;
    margin-bottom: 8px;
    margin-right: 8px;
}
.widget_epcl_tag_cloud a, .widget_tag_cloud a, .wp-block-tag-cloud a,  div.tags a{
    color: #333333;
    display: inline-block;
    padding: 4px 15px;
    line-height: 1.2;
    margin-right: 10px;
    background: #fff;
    border: 1px solid #333333;
    border-radius: 25px;
}
/*Social Share*/
.wpjankari-social-wrapper {
    margin: 5px;
    font-size: 0;
    text-align: center;
	display: flex;
    flex-wrap: wrap;
}
.wpjankari-social-sharing {
	padding: 8px;
	margin: 4px;
	border-radius: 3px;
    flex: 1;
    transition: background-color 0.3s, transform 0.3s, color 0.3s;
}
.wpjankari-social-sharing:hover {
	transform: translateY(-3px);
	border: none;
	box-shadow: rgba(0, 0, 0, 0.1) 0px 20px 25px -5px, rgba(0, 0, 0, 0.04) 0px 10px 10px -5px;
}
@media only screen and (max-width: 600px) {
    .wpjankari-social-sharing {
		display: inline-block;
    }
}
.wpjankari-social-sharing svg {
    position: relative;
    top: 0.15em;
    display: inline-block;
}
.wpjankari-social-facebook {
    fill: #fff;
    background-color: rgba(59, 89, 152, 1);
}
.wpjankari-social-twitter {
    fill: #fff;
    background-color: rgba(0, 0, 0);
}
.wpjankari-social-whatsapp {
    fill: #fff;
    background-color: rgba(37, 211, 102, 1);
}
.wpjankari-social-telegram {
    fill: #fff;
    background-color: rgb(2, 126, 189);
}
.wpjankari-social-more {
    fill: #fff;
    background-color: rgba(0, 0, 0);
}
/*sticky footer menu*/
@media only screen and (min-width: 960px) {
.sticky-footer-menu{display:none!important;}
}
.sticky-footer-menu {
	position: fixed;
	height: 60px;
	width: 100%;
	bottom: 0;
	box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
	z-index: 23235;
}




/* codeblock */
:root {
  --code-bg: #1e1e1e; /* ChatGPT-like background */
  --code-border: rgba(255,255,255,0.06);
  --code-radius: 8px;
  --button-bg: rgba(255,255,255,0.06);
  --button-bg-hover: rgba(255,255,255,0.10);
  --button-color: #e6e6e6;
  --accent: #0ea5e9;
  --font-mono: "Fira Code", ui-monospace, SFMono-Regular, Menlo, Monaco, "Roboto Mono", "Courier New", monospace;
}

/* Ensure body text uses default theme, but code blocks use Fira Code */
.code-block,
.code-block pre,
.code-block code {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.45;
  direction: ltr; /* important for horizontal scroll */
}

/* Outer wrapper around each code block (ChatGPT-like card) */
.code-block {
  position: relative; /* for absolute-positioned button */
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--code-radius);
  padding: 14px; /* spacing inside wrapper */
  margin: 1.2em 0;
  overflow: hidden; /* the pre element will handle scrolling */
  box-shadow: 0 1px 0 rgba(255,255,255,0.02) inset;
}

/* The <pre> element: allow both vertical and horizontal scrolling */
.code-block pre {
  margin: 0; /* remove default pre margin */
  background: transparent !important; /* use wrapper's background */
  padding: 0; /* wrapper handles padding */
  max-height: 480px; /* sensible max-height; adjust as needed */
  overflow: auto; /* both axis scroll when needed */
  white-space: pre; /* preserve whitespace; allow horizontal scroll */
  -webkit-overflow-scrolling: touch;
  border-radius: calc(var(--code-radius) - 2px);
}

/* Ensure code element takes full width and uses block display for Prism compatibility */
.code-block pre > code {
  display: block;
  min-width: 100%;
  padding: 10px 12px;
  box-sizing: border-box;
  color: #dcdcdc; /* fallback text color */
  tab-size: 4;
  -moz-tab-size: 4;
  font-feature-settings: "liga" 1; /* allow Fira Code ligatures */
}

/* Make sure long lines don't wrap and horizontal scroll shows */
.code-block pre::-webkit-scrollbar {
  height: 10px;
  width: 10px;
}
.code-block pre::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
}
.code-block pre::-webkit-scrollbar-track {
  background: transparent;
}

/* Copy button styling (top-right, sticky inside code-block) */
.copy-code-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 20;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1;
  background: var(--button-bg);
  color: var(--button-color);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 6px;
  cursor: pointer;
  transition: background 160ms ease, transform 120ms ease;
  -webkit-tap-highlight-color: transparent;
  backdrop-filter: blur(6px);
}

/* Smaller button on mobile to avoid overlap */
@media (max-width: 480px) {
  .copy-code-btn {
    top: 8px;
    right: 8px;
    padding: 5px 8px;
    font-size: 11px;
  }
}

/* hover and active states */
.copy-code-btn:hover {
  background: var(--button-bg-hover);
  transform: translateY(-1px);
}

/* Visual state when copied */
.copy-code-btn.copied {
  background: rgba(16,185,129,0.12); /* subtle green tint */
  color: #10b981; /* green */
  border-color: rgba(16,185,129,0.18);
}

/* Make sure Prism theme styling's tokens have room to breathe inside code */
.code-block .token.comment,
.code-block .token.prolog,
.code-block .token.doctype,
.code-block .token.cdata {
  opacity: 0.6;
}

/* Ensure code blocks are responsive and don't overflow the page */
@media (max-width: 768px) {
  .code-block {
    padding: 10px;
    border-radius: 6px;
  }
  .code-block pre {
    max-height: 360px;
  }
}

/* Optional: small style tweak to match ChatGPT subtle rounded border marks */
.code-block:focus-within {
  box-shadow: 0 0 0 3px rgba(14,165,233,0.08);
  outline: none;
}

/* If your theme applies default code styles, make sure Prism tokens remain visible */
pre code[class*="language-"] {
  /* take theme's colors, but ensure transparent background not override */
  background: transparent !important;
}

/* Accessibility: ensure button is focus-visible */
.copy-code-btn:focus {
  outline: 2px solid rgba(14,165,233,0.18);
  outline-offset: 2px;
}

/* End of styles */
