/* 
 * Scroll Highlight Panel CSS
 * Save as: /wp-content/themes/zeen-child/assets/scroll-panel.css
 */

.scroll-panel-wrapper {
    margin: 40px 0;
    background: transparent;
}

/* Main layout container */
.scroll-page-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

/* Main content area */
.scroll-main-content {
    background: #fff;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

/* Right column for panels */
.scroll-panel-column {
    position: relative;
    padding: 20px 0;
}

/* Highlight styling */
.scroll-highlight {
    background: #ffeb3b;
    padding: 2px 4px;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-weight: 500;
}

.scroll-highlight:hover {
    background: #ffd600;
}

.scroll-highlight.active {
    background: #66785a; !important
    color: #fff;
}

/* Panel styling - exact match from original */
.scroll-panel {
    position: sticky;
    top: 50vh;
    transform: translateY(-50%);
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: all 300ms ease;
    pointer-events: none;
    z-index: 100;
}

.scroll-panel.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    animation: slideInRight 300ms ease;
}

.scroll-panel.hiding {
    animation: slideOutRight 300ms ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
    to {
        opacity: 0;
        transform: translateY(-50%) translateX(20px);
    }
}

/* Panel content styling - exact match */
.scroll-panel-content {
    position: relative;
    width: 100%;
    border-radius: 6px;
    padding: 12px;
    transition: all 300ms ease;
    font-size: 14px;
    margin-top: 12px;
    border: 1px solid #374151;
    overflow: hidden;
    background: #000;
    color: #fff;
    padding-top: 12px;
    max-height: calc(40vh + 80px);
}

@media (min-width: 768px) {
    .scroll-panel-content {
        max-height: 500px;
    }
}

.scroll-panel-content:first-child {
    margin-top: 0;
}

.scroll-panel-text {
    padding: 8px 0;
    line-height: 1.5;
}

.scroll-panel-text h3 {
    color: #fff !important;
    margin-bottom: 16px !important;
    margin-top: 0 !important;
    font-size: 16px;
    font-weight: 600;
}

.scroll-panel-text p {
    color: #e5e7eb !important;
    margin: 12px 0 !important;
    font-size: 14px;
    line-height: 1.5;
}

.scroll-close-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 18px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.scroll-close-btn:hover {
    opacity: 1;
}

/* Responsive layout */
@media (max-width: 1024px) {
    .scroll-page-container {
        grid-template-columns: 1fr 350px;
        gap: 30px;
    }
    
    .scroll-main-content {
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .scroll-page-container {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .scroll-main-content {
        padding: 20px;
        margin: 0;
        border-radius: 0;
    }
    
    .scroll-panel-column {
        display: none;
    }
    
    .scroll-panel {
        position: fixed;
        top: auto;
        bottom: 20px;
        left: 20px;
        right: 20px;
        width: auto;
        transform: none;
        z-index: 1000;
    }
    
    .scroll-panel.visible {
        animation: slideInUp 300ms ease;
    }
    
    .scroll-panel.hiding {
        animation: slideOutDown 300ms ease;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOutDown {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(20px);
    }
}

/* WordPress content styling overrides */
.scroll-main-content h1,
.scroll-main-content h2,
.scroll-main-content h3,
.scroll-main-content h4,
.scroll-main-content h5,
.scroll-main-content h6 {
    color: #000 !important;
    margin: 30px 0 20px 0 !important;
}

.scroll-main-content p {
    color: #333 !important;
    margin: 20px 0 !important;
    line-height: 1.6;
}

/* Ensure proper stacking with WordPress themes */
.scroll-panel-wrapper {
    position: relative;
    z-index: 99;
}

/* Override any theme conflicts */
.scroll-panel * {
    box-sizing: border-box;
}