/* ===== Toolbar Layout ===== */

.pht-toolbar {
    display: flex;
    width: 100%;
    height: 40px;
    background-color: #c9c9c9 ;
    margin-bottom: 15px;
    align-items: center;
    font-size: 12px;
	border-radius: 10px;
}

.pht-col-60 {
    width: 60%;
    display: flex;
    align-items: center;
}

.pht-col-30 {
    width: 30%;
    display: flex;
    align-items: center;
}

.pht-col-10 {
    width: 10%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Toggle container */
.xai-theme-toggle-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Hide the checkbox completely */
.xai-theme-checkbox {
    opacity: 0;
    position: absolute;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
}

/* Style the toggle button */
.xai-theme-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background-color: #f0f0f0;
    border: 1px solid #5a6b8b;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Icon for sun/moon */
.xai-theme-icon {
    width: 16px;
    height: 16px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23333" stroke-width="2"><circle cx="12" cy="12" r="5"/><path d="M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"/></svg>') no-repeat center;
    background-size: contain;
    transition: background 0.3s ease;
}

/* Dark mode icon (moon) */
.xai-theme-checkbox:checked + .xai-theme-button .xai-theme-icon {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23fff" stroke-width="2"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/></svg>') no-repeat center;
    background-size: contain;
}

/* Button hover and checked state */
.xai-theme-button:hover {
    transform: scale(1.1);
}

.xai-theme-checkbox:checked + .xai-theme-button {
    background-color: #2c3e50;
}

/* Default styles for content-inner */
.content-inner {
    padding: 10px;
    font-size: 18px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Dark mode for content-inner */
.single .content-inner.xai-dark p,
.single .content-inner.xai-dark span,
.single .content-inner.xai-dark li,
.single .content-inner.xai-dark a,
.single .content-inner.xai-dark strong,
.single .content-inner.xai-dark em,
.single .content-inner.xai-dark blockquote,
.single .content-inner.xai-dark h1,
.single .content-inner.xai-dark h2,
.single .content-inner.xai-dark h3,
.single .content-inner.xai-dark h4,
.single .content-inner.xai-dark h5,
.single .content-inner.xai-dark h6 {
    color: #ffffff !important;
}
.content-inner.xai-dark {
    background-color: #1a1a1a !important;
}
.content-inner.xai-dark .adsbygoogle {
    background-color: #1a1a1a !important;
}

/* ===== Reader controls ===== */

.reader-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem;
    border-radius: 0.25rem;
    /*padding: 0.2rem 0.6rem;*/
}

.reader-controls button {
    padding: 0.2rem 0.6rem;
    background-color: #4a5568;
    color: #fff;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.reader-controls button:hover {
    background-color: #5a6b8b;
}

.toolbar-read {
    display: flex;
    gap: 1rem;
    border-radius: 6px;
    padding: 0.2rem 0.6rem;
    justify-content: flex-start;
    align-items: center;
}

.toolbar-read button {
    background: #4a5568;
    color: white;
    border: none;
    padding: 0.2rem 0.6rem;
    font-size: 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.toolbar-read button:hover {
    background: #000;
}
/* ===========================
   CUSTOM TOOLTIP SYSTEM
   =========================== */

[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.85);
    color: #fff;
    padding: 6px 10px;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
    border-radius: 4px;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, transform .25s ease;
    z-index: 9999;
}

[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-2px);
}
/* Reader width mode */
.content-inner.reader-narrow {
    max-width: 680px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    display: block !important;
}

/* Dyslexia font */
@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:wght@400;700&display=swap');

.content-inner.reader-dyslexia {
    font-family: 'Atkinson Hyperlegible', Arial, sans-serif !important;
}
