/**
 * Lab Certificates Styles
 * Shared styles for purity and endotoxin certificate templates
 * Version: 2.0.0
 */

/* Hide WordPress Meta Elements */
.entry-meta,
.posted-on,
.byline,
.cat-links,
.tag-links,
.edit-link,
.post-date,
.author-info,
.entry-footer,
.wp-block-post-date,
.wp-block-post-author,
.social-share,
.social-links,
.share-buttons,
.addthis_toolbox,
.addthis_sharing_toolbox,
.jp-sharing-button-container,
.sharedaddy,
.sharing-wrapper,
[class*="share"],
[class*="social"],
.post-meta,
.entry-date,
.author-link,
.post-categories,
.post-tags,
.post-navigation,
.author-meta,
.publish-date,
.post-details,
.entry-details {
    display: none !important;
    visibility: hidden !important;
}

/* Force hide theme-specific elements */
.single .entry-header .entry-meta,
.single-post .entry-header .entry-meta,
.nm-post-share,
.nm-social-share,
.nm-post-meta,
.savoy-meta,
.theme-meta {
    display: none !important;
    visibility: hidden !important;
}

/* ========================================
   LAYOUT - Product Images & Summary
   ======================================== */

.lab-result-page .product-images-summary-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
    align-items: start;
}

.lab-result-page .images figure {
    margin: 0;
}

.lab-result-page .images img {
    width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    transition: transform 0.3s ease;
}

.lab-result-page .images img:hover {
    transform: scale(1.02);
}

/* ========================================
   SUMMARY SECTION
   ======================================== */

.lab-product-name {
    font-size: 1.8em;
    color: #282828;
    margin: 10px 0 20px 0;
    font-weight: 600;
    line-height: 1.2;
}

.lab-summary-clean {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.lab-description {
    color: #777777;
    font-size: 1.1em;
    line-height: 1.6;
    margin: 0;
}

/* ========================================
   ACTION BUTTONS
   ======================================== */

.lab-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lab-order-button,
.lab-download-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.lab-order-button {
    background: #DC9814;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(220, 152, 20, 0.3);
}

.lab-order-button:hover {
    background: #b8821a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 152, 20, 0.4);
    text-decoration: none;
    color: #ffffff;
}

.lab-download-button {
    background: #f8f9fa;
    color: #282828;
    border: 2px solid #e9ecef;
}

.lab-download-button:hover {
    background: #e9ecef;
    border-color: #DC9814;
    transform: translateY(-1px);
    text-decoration: none;
    color: #282828;
}

/* ========================================
   TABS
   ======================================== */

.woocommerce-tabs {
    margin-top: 40px;
}

.wc-tabs {
    border-bottom: 2px solid #f0f0f0;
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: 0;
}

.wc-tabs li {
    margin: 0;
}

.wc-tabs li a {
    display: block;
    padding: 16px 24px;
    text-decoration: none;
    color: #777777;
    font-weight: 600;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.wc-tabs li.active a,
.wc-tabs li a:hover {
    color: #DC9814;
    border-bottom-color: #DC9814;
}

.woocommerce-Tabs-panel {
    padding: 32px 0;
    display: none;
}

.woocommerce-Tabs-panel.active {
    display: block;
}

.woocommerce-Tabs-panel:first-of-type {
    display: block;
}

.woocommerce-Tabs-panel h2 {
    color: #282828;
    font-size: 1.8em;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid #DC9814;
    display: inline-block;
}

/* ========================================
   PDF VIEWER
   ======================================== */

.pdf-embed-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    background: #f5f5f5;
    margin: 20px 0;
    width: 100%;
}

.pdf-embed-container iframe {
    display: block;
    width: 100%;
    min-height: 1200px;
    border: none;
}

.pdf-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 24px;
    flex-wrap: wrap;
}

.lab-pdf-download,
.lab-pdf-fullscreen {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #DC9814;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 14px;
}

.lab-pdf-download:hover,
.lab-pdf-fullscreen:hover {
    background: #b8821a;
    transform: translateY(-1px);
    text-decoration: none;
    color: #ffffff;
}

/* ========================================
   TEST HISTORY TAB
   ======================================== */

.oath-test-history-intro {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 24px 28px;
    margin: 24px 0 28px 0;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.oath-test-history-intro-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.oath-test-history-intro-icon {
    font-size: 24px;
}

.oath-test-history-intro-title {
    font-size: 17px;
    font-weight: 700;
    color: #282828;
}

.oath-test-history-intro p {
    margin: 0;
    color: #555;
    font-size: 15px;
    line-height: 1.5;
}

.oath-test-history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.oath-history-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #ffffff;
    border-radius: 12px;
    padding: 16px 20px;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    text-decoration: none;
    transition: all 0.3s ease;
    color: inherit;
}

.oath-history-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    transform: translateY(-1px);
    border-color: #DC9814;
    text-decoration: none;
    color: inherit;
}

.oath-history-card.is-current {
    border: 2px solid #DC9814;
    background: linear-gradient(135deg, #fffbf0 0%, #fff8e8 100%);
    box-shadow: 0 4px 16px rgba(220, 152, 20, 0.12);
    cursor: default;
    pointer-events: none;
}

.oath-history-purity {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #2e7d32;
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 16px;
    white-space: nowrap;
    border: 1px solid #a5d6a7;
    flex-shrink: 0;
    min-width: 72px;
    text-align: center;
}

.oath-history-purity.oath-history-endotoxin {
    border-color: #81c784;
}

.oath-history-details {
    flex: 1;
    min-width: 0;
}

.oath-history-batch {
    font-weight: 700;
    color: #282828;
    font-size: 15px;
    margin-bottom: 2px;
}

.oath-history-date {
    color: #777;
    font-size: 13px;
}

.oath-history-current-badge {
    background: #DC9814;
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.oath-history-arrow {
    color: #DC9814;
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.oath-history-card:hover .oath-history-arrow {
    transform: translateX(3px);
}

/* ========================================
   STICKY CTA - DESKTOP SIDEBAR
   ======================================== */

.oath-sticky-cta-desktop {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%) translateX(320px);
    width: 280px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    padding: 24px;
    z-index: 500;
    opacity: 0;
    transition: all 0.3s ease-out;
    pointer-events: none;
}

.oath-sticky-cta-desktop.oath-visible {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
    pointer-events: auto;
}

.oath-sticky-desktop-inner {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.oath-sticky-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.oath-sticky-title {
    font-size: 1.3em;
    font-weight: 700;
    color: #282828;
    margin: 0;
    line-height: 1.2;
}

.oath-sticky-badge {
    display: inline-block;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #2e7d32;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 700;
    border: 1px solid #a5d6a7;
    width: fit-content;
}

.oath-sticky-badge-endotoxin {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #2e7d32;
    border-color: #4caf50;
}

.oath-sticky-btn {
    display: block;
    width: 100%;
    background: #282828;
    color: #ffffff;
    text-align: center;
    padding: 14px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1em;
    border: 2px solid #DC9814;
    transition: all 0.2s ease;
}

.oath-sticky-btn:hover {
    background: #DC9814;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 152, 20, 0.3);
    text-decoration: none;
    color: #ffffff;
}

/* ========================================
   STICKY CTA - MOBILE BAR
   ======================================== */

.oath-sticky-cta-mobile {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(40, 40, 40, 0.97);
    backdrop-filter: blur(10px);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
    padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 500;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
}

.oath-sticky-cta-mobile.oath-visible {
    transform: translateY(0);
}

.oath-sticky-mobile-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: 100%;
}

.oath-sticky-mobile-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.oath-mobile-badge {
    display: inline-block;
    background: #2e7d32;
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75em;
    font-weight: 700;
    width: fit-content;
}

.oath-mobile-badge-endotoxin {
    background: #4caf50;
}

.oath-mobile-name {
    color: #ffffff;
    font-size: 0.95em;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.oath-mobile-btn {
    flex-shrink: 0;
    background: #DC9814;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95em;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.oath-mobile-btn:hover {
    background: #b8821a;
    text-decoration: none;
    color: #ffffff;
}

.oath-sticky-dismiss {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255,255,255,0.2);
    border: none;
    color: #ffffff;
    min-width: 44px;
    min-height: 44px;
    border-radius: 50%;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.oath-sticky-dismiss:hover {
    background: rgba(255,255,255,0.3);
}

/* ========================================
   MOBILE RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .lab-result-page .product-images-summary-wrap {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .lab-actions {
        gap: 12px;
    }

    .lab-order-button,
    .lab-download-button {
        font-size: 15px;
        padding: 14px 20px;
    }

    .wc-tabs {
        flex-direction: column;
        gap: 4px;
    }

    .wc-tabs li a {
        padding: 12px 16px;
    }

    .pdf-embed-container iframe {
        height: 800px !important;
    }

    .pdf-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .oath-history-card {
        flex-wrap: wrap;
        gap: 10px;
        padding: 14px 16px;
    }

    .oath-history-details {
        flex: 1 1 calc(100% - 110px);
    }

    .oath-sticky-cta-desktop {
        display: none;
    }
}

@media (max-width: 480px) {
    .lab-product-name {
        font-size: 1.5em;
        text-align: center;
    }

    .lab-description {
        text-align: center;
        font-size: 1em;
    }

    .pdf-embed-container iframe {
        height: 600px !important;
    }

    .oath-history-card {
        gap: 8px;
        padding: 12px 14px;
    }

    .oath-history-purity {
        font-size: 14px;
        padding: 6px 10px;
        min-width: 60px;
    }

    .oath-test-history-intro {
        padding: 18px 20px;
    }
}

@media (min-width: 769px) {
    .oath-sticky-cta-mobile {
        display: none;
    }
}
