/*
Theme Name: Trix Plus
Theme URI: https://TrixPlus.cloud
Author: TrixPlus theme
Author URI: https://TrixPlus.cloud
Description: A premium FSE (Full Site Editing) WordPress theme with drag-and-drop capabilities.
Version: 2.0.0
License: General Public License v2 or later
License URI: https://TrixPlus.cloud
Text Domain: trixplus
Tags: full-site-editing, custom-colors, custom-menu, custom-logo, dark-mode, editor-style
*/

/* 
 * Styles are handled globally by theme.json.
 * Add custom CSS here only if strictly necessary. 
 */

/* Premium Neon Effect */
.neon-hover {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.neon-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 0 15px var(--wp--preset--color--primary),
        0 0 30px rgba(0, 200, 83, 0.4);
    border-color: var(--wp--preset--color--primary) !important;
    z-index: 10;
}

/* ---------------------------------------------------------
   Premium Sticky Header & Mobile Menu
--------------------------------------------------------- */

/* Sticky Glass Header */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(26, 31, 44, 0.85) !important;
    /* Semi-transparent Dark */
    backdrop-filter: blur(12px);
    /* Glass Effect */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

/* Modern Mobile Menu Overlay (Forced Override) */
:root body .wp-block-navigation__responsive-container.is-menu-open {
    background-color: rgba(26, 31, 44, 0.98) !important;
    /* Dark Overlay */
    backdrop-filter: blur(15px) !important;
    color: #fff !important;
}

:root body .wp-block-navigation__responsive-container .wp-block-navigation__responsive-container-content {
    padding-top: 5rem;
    align-items: center;
}

/* Menu Items in Mobile */
:root body .wp-block-navigation__responsive-container .wp-block-navigation-item__content {
    color: #fff !important;
    font-size: 1.8rem !important;
    font-weight: 700;
    text-transform: capitalize;
    transition: color 0.3s ease;
}

:root body .wp-block-navigation__responsive-container .wp-block-navigation-item__content:hover {
    color: var(--wp--preset--color--primary) !important;
}

/* Close/Open Button color */
:root body .wp-block-navigation__responsive-container-close,
:root body .wp-block-navigation__responsive-container-close svg,
:root body .wp-block-navigation__responsive-container-open svg {
    fill: #fff !important;
    color: #fff !important;
}

/* ---------------------------------------------------------
   Universal Plugin & Embed Compatibility
   Ensures PDFs, iframes, videos work with any plugin
--------------------------------------------------------- */

/* Reset for all embeds - Let plugins control their own styling */
.wp-block-embed,
.wp-block-embed__wrapper,
.wp-block-embed iframe,
.embedpress-wrapper,
.embedpress-embed-wrapper,
[class*="embed"],
[class*="ose-"],
iframe {
    max-width: 100% !important;
    width: 100%;
    height: auto;
}

/* Responsive iframe container */
.wp-block-embed__wrapper,
.embedpress-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* PDF Embed Support */
.wp-block-file,
.wp-block-file__embed,
iframe[src*=".pdf"],
embed[type="application/pdf"],
object[type="application/pdf"] {
    min-height: 600px !important;
    width: 100% !important;
    max-width: 100% !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* Video Embeds (YouTube, Vimeo, etc) */
.wp-block-embed.is-type-video iframe,
.wp-block-embed__wrapper iframe[src*="youtube"],
.wp-block-embed__wrapper iframe[src*="vimeo"],
.wp-block-embed__wrapper iframe[src*="dailymotion"] {
    aspect-ratio: 16 / 9;
    height: auto !important;
    min-height: 400px;
}

/* Ensure embeds don't break layout */
.wp-block-post-content .wp-block-embed,
.entry-content .wp-block-embed {
    margin: 2rem 0;
    clear: both;
}

/* Override any plugin inline styles that might conflict */
.wp-block-embed iframe[style],
.embedpress-wrapper iframe[style] {
    width: 100% !important;
    max-width: 100% !important;
}

/* Support for Embed Press and similar plugins */
.ose-embedpress-responsive,
.embera-embed-responsive,
[data-source-id] {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
}

/* Specific PDF viewer plugins compatibility */
.pdfemb-viewer,
.pdf-embedder,
.wpview-wrap[data-wpview-type="embedURL"] {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 600px !important;
}

/* ---------------------------------------------------------
   PDF Embedder Plugin - Enhanced Compatibility
--------------------------------------------------------- */

/* Main PDF viewer container - override all plugin inline styles */
.pdfemb-viewer,
div.pdfemb-viewer {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 600px !important;
    margin: 2rem auto !important;
    padding: 0 !important;
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 4px !important;
    overflow: hidden !important;
}

/* PDF canvas and inner container */
.pdfemb-viewer canvas,
.pdfemb-viewer .pdfemb-inner-div {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
}

/* Toolbar styling to match theme */
.pdfemb-toolbar {
    background: rgba(26, 31, 44, 0.95) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 0.5rem !important;
}

/* PDF pages container */
.pdfemb-inner-div {
    background: #fff !important;
    overflow: auto !important;
}

/* Custom scrollbars for PDF viewer */
.pdfemb-viewer::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.pdfemb-viewer::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.pdfemb-viewer::-webkit-scrollbar-thumb {
    background: var(--wp--preset--color--primary);
    border-radius: 4px;
}

/* Hide plugin branding */
.pdfemb-poweredby {
    display: none !important;
}

/* Mobile responsiveness for embeds */
@media (max-width: 768px) {

    iframe[src*=".pdf"],
    embed[type="application/pdf"],
    .pdfemb-viewer {
        min-height: 400px !important;
    }

    .wp-block-embed.is-type-video iframe {
        min-height: 250px;
    }

    /* PDF Embedder mobile specific */
    .pdfemb-viewer {
        min-height: 400px !important;
        margin: 1rem 0 !important;
    }

    .pdfemb-toolbar {
        font-size: 0.85rem !important;
        padding: 0.3rem !important;
    }
}