/* Brand font for the popup. frontend.css loads site-wide, so the face is
   declared here too rather than relying on the theme. Single static weight
   declared across 100-900 so no weight is ever synthesised. */
@font-face {
    font-family: 'PQPJohnston';
    src: url('https://greenyellow-raven-645070.hostingersite.com/wp-content/uploads/2026/09/Johnston-ITC-Regular.woff2') format('woff2'),
         url('https://greenyellow-raven-645070.hostingersite.com/wp-content/uploads/2026/09/Johnston-ITC-Regular.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/**
 * Pharma Quiz Popup - Frontend Styles
 * 
 * @package PharmaQuizPopup
 * @author Tanmeet Singh - WebsiteCreatorz
 */

/* Sticky Button - PharmaAccess Branded */
.pqp-sticky-btn {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(90deg, #F08900 0%, #1F9E91 100%);
    color: white;
    padding: 15px 12px;
    border-radius: 8px 0 0 8px;
    cursor: pointer;
    box-shadow: -2px 4px 15px rgba(31, 158, 145, 0.3);
    z-index: 999998;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-weight: 600;
    display: none;
    border: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    letter-spacing: 0.5px;
    font-size: 14px;
}

.pqp-sticky-btn:hover {
    right: 0;
    box-shadow: -4px 6px 25px rgba(31, 158, 145, 0.4);
    transform: translateY(-50%) scale(1.05);
    padding-right: 15px;
}

.pqp-sticky-btn.show {
    display: block;
    animation: pqpSlideIn 0.5s ease;
}

@keyframes pqpSlideIn {
    from {
        right: -100px;
        opacity: 0;
    }
    to {
        right: 20px;
        opacity: 1;
    }
}

/* Popup Overlay */
.pqp-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    justify-content: center;
    align-items: center;
    animation: pqpFadeIn 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* Body scroll lock — simple overflow hidden, no position:fixed (avoids ScrollSmoother conflict) */
body.pqp-body-locked {
    overflow: hidden !important;
}

.pqp-overlay.active {
    display: flex;
}

/* Popup Container */
.pqp-popup {
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    animation: pqpSlideUp 0.4s ease;
    box-shadow: 0 10px 50px rgba(0,0,0,0.3);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    margin: 20px;
}

/* Close Button - Enhanced */
.pqp-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.pqp-close:hover {
    background: #f0f0f0;
    color: #F08900;
    transform: rotate(90deg) scale(1.1);
}

/* Content Area */
.pqp-content {
    padding: 40px;
    padding-top: 50px;
}

/* Progress Bar - Brand Gradient */
.pqp-progress-container {
    width: 100%;
    height: 6px;
    background: #e0e0e0;
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
}

.pqp-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #F08900 0%, #1F9E91 100%);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
    width: 0;
    box-shadow: 0 2px 8px rgba(31, 158, 145, 0.3);
}

/* Step Indicator */
.pqp-step-indicator {
    text-align: center;
    color: #888;
    font-size: 14px;
    margin-bottom: 10px;
    font-weight: 500;
}

/* Headings */
.pqp-popup h2 {
    color: #333;
    font-size: 28px;
    margin-bottom: 10px;
    font-weight: 700;
    line-height: 1.3;
}

.pqp-subtitle {
    color: #666;
    margin-bottom: 25px;
    font-size: 16px;
    line-height: 1.6;
}

/* Form Groups */
.pqp-form-group {
    margin-bottom: 25px;
}

.pqp-form-group label {
    display: block;
    margin-bottom: 10px;
    color: #333;
    font-weight: 600;
    font-size: 15px;
}

.pqp-form-group input[type="text"],
.pqp-form-group input[type="email"],
.pqp-form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.pqp-form-group input:focus,
.pqp-form-group select:focus {
    outline: none;
    border-color: #1F9E91;
    box-shadow: 0 0 0 3px rgba(31, 158, 145, 0.1);
}

/* Phone field hint text */
.pqp-field-hint {
    display: block;
    color: #999;
    font-size: 12px;
    margin-top: 5px;
}

.pqp-form-group input[type="tel"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.pqp-form-group input[type="tel"]:focus {
    outline: none;
    border-color: #1F9E91;
    box-shadow: 0 0 0 3px rgba(31, 158, 145, 0.1);
}

/* Option Groups - Brand Colors */
.pqp-option-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pqp-option-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    user-select: none;
}

.pqp-option-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(240, 137, 0, 0.05) 0%, rgba(31, 158, 145, 0.05) 100%);
    transition: left 0.3s ease;
}

.pqp-option-item:hover::before {
    left: 0;
}

.pqp-option-item:hover {
    border-color: #1F9E91;
    background: rgba(31, 158, 145, 0.02);
    transform: translateX(5px);
}

.pqp-option-item input[type="checkbox"],
.pqp-option-item input[type="radio"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: #1F9E91;
}

.pqp-option-item.selected {
    border-color: #1F9E91;
    background: linear-gradient(90deg, rgba(240, 137, 0, 0.05) 0%, rgba(31, 158, 145, 0.08) 100%);
    box-shadow: 0 2px 8px rgba(31, 158, 145, 0.15);
}

.pqp-option-item span {
    flex: 1;
}

/* Buttons */
.pqp-btn-container {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.pqp-btn {
    flex: 1;
    padding: 14px 30px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.pqp-btn-primary {
    background: linear-gradient(90deg, #F08900 0%, #1F9E91 100%);
    color: white !important;
    position: relative;
    overflow: hidden;
}

.pqp-btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: #1F9E91;
    transition: width 0.4s ease;
    z-index: 0;
}

.pqp-btn-primary:hover:not(:disabled)::before {
    width: 100%;
}

.pqp-btn-primary *,
.pqp-btn-primary {
    position: relative;
    z-index: 2;
    color: white !important;
}

.pqp-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(31, 158, 145, 0.4);
    color: white !important;
}

.pqp-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.pqp-btn-secondary {
    background: #f0f0f0;
    color: #666;
}

.pqp-btn-secondary:hover {
    background: #e0e0e0;
}

/* Summary Box - Brand Styled */
.pqp-summary-box {
    background: linear-gradient(135deg, rgba(31, 158, 145, 0.05) 0%, rgba(240, 137, 0, 0.05) 100%);
    border-left: 4px solid #1F9E91;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(31, 158, 145, 0.1);
}

.pqp-summary-box h3 {
    color: #1F9E91;
    margin-bottom: 10px;
    margin-top: 0;
    font-size: 18px;
    font-weight: 700;
}

.pqp-summary-box p {
    color: #555;
    line-height: 1.6;
    margin: 5px 0;
}

.pqp-summary-box p strong {
    color: #F08900;
}

/* Encouraging Text - Brand Accent */
.pqp-encouraging-text {
    background: linear-gradient(90deg, rgba(240, 137, 0, 0.1) 0%, rgba(246, 141, 30, 0.05) 100%);
    border-left: 3px solid #F08900;
    padding: 12px 15px;
    margin: 15px 0;
    border-radius: 5px;
    font-size: 14px;
    color: #666;
}

/* Step Content */
.pqp-step {
    display: none;
}

.pqp-step.active {
    display: block;
    animation: pqpFadeIn 0.3s ease;
}

/* Animations */
@keyframes pqpFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Scrollbar Styling */
.pqp-popup::-webkit-scrollbar {
    width: 8px;
}

.pqp-popup::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.pqp-popup::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.pqp-popup::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive Design - Enhanced */
@media (max-width: 768px) {
    .pqp-popup {
        width: 95%;
        max-height: 95vh;
        border-radius: 15px;
    }
    
    .pqp-content {
        padding: 30px 20px;
    }
    
    .pqp-popup h2 {
        font-size: 24px;
    }
    
    .pqp-btn-container {
        flex-direction: column;
    }
    
    .pqp-sticky-btn {
        font-size: 14px;
        padding: 12px 15px;
        writing-mode: horizontal-tb;
        top: auto;
        bottom: 20px;
        border-radius: 50px 50px 0 0;
        left: 50%;
        transform: translateX(-50%);
        right: auto;
    }
    
    .pqp-sticky-btn.show {
        animation: pqpSlideUp 0.5s ease;
    }
    
    @keyframes pqpSlideUp {
        from {
            bottom: -100px;
            opacity: 0;
        }
        to {
            bottom: 20px;
            opacity: 1;
        }
    }
    
    .pqp-option-item {
        padding: 12px;
        font-size: 14px;
    }
    
    /* Touch-friendly tap targets */
    .pqp-close {
        width: 44px;
        height: 44px;
        font-size: 32px;
    }
    
    /* Swipe indicator for mobile */
    .pqp-popup::after {
        content: '';
        position: absolute;
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background: #e0e0e0;
        border-radius: 2px;
    }
}

@media (max-width: 480px) {
    .pqp-content {
        padding: 25px 15px;
    }
    
    .pqp-popup h2 {
        font-size: 22px;
    }
    
    .pqp-option-item {
        padding: 12px;
    }
    
    .pqp-form-group input[type="text"],
    .pqp-form-group input[type="email"],
    .pqp-form-group input[type="tel"],
    .pqp-form-group select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Tablet landscape */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .pqp-popup {
        max-height: 85vh;
    }
}

/* Loading Spinner */
.pqp-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: pqpSpin 0.8s linear infinite;
}

@keyframes pqpSpin {
    to { transform: rotate(360deg); }
}

/* Touch feedback */
.pqp-option-item:active {
    transform: scale(0.98);
}

.pqp-btn:active {
    transform: scale(0.98);
}

/* Accessibility - Focus visible */
.pqp-btn:focus-visible,
.pqp-option-item:focus-visible,
.pqp-close:focus-visible {
    outline: 2px solid #1F9E91;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .pqp-option-item {
        border-width: 3px;
    }
    
    .pqp-option-item.selected {
        border-width: 4px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .pqp-overlay,
    .pqp-popup,
    .pqp-sticky-btn,
    .pqp-progress-bar,
    .pqp-btn,
    .pqp-option-item {
        animation: none !important;
        transition: none !important;
    }
}

/* ================================================================
   Routing popup (v2.11.0) - three destinations, no quiz
   Brand tokens match the facility-check flow so the two read as one system.
   ================================================================ */
.pqp-popup.pqp-router {
    --pqp-navy: #16274B;
    --pqp-teal: #1F9E91;
    --pqp-mid:  #4A9E7A;
    --pqp-orange: #E28C22;
    --pqp-line: #E4EAF0;
    --pqp-font: 'PQPJohnston', "johnston_itc_medium-webfont", "Johnston ITC",
                -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-family: var(--pqp-font);
    font-synthesis: none; -webkit-font-synthesis: none;
    max-width: 880px;
    padding: clamp(26px, 4vw, 44px) clamp(20px, 3.4vw, 40px) clamp(24px, 3.4vw, 38px);
    overflow: hidden;
}
.pqp-router * { font-family: var(--pqp-font); font-style: normal; }

.pqp-router-deco { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: inherit; }
.pqp-router .pqp-deco-swoosh { position: absolute; right: -6%; bottom: -8%; width: 62%; height: auto; opacity: .9; }
.pqp-router .pqp-deco-dots   { position: absolute; left: 4%; bottom: 14%; width: 34px; height: 34px; opacity: .75; }

.pqp-router-head { position: relative; z-index: 2; text-align: center; margin-bottom: clamp(18px, 3vh, 30px); }
.pqp-router-title {
    font-size: clamp(19px, 2.3vw, 27px) !important; font-weight: 700; color: var(--pqp-navy) !important;
    margin: 0 0 8px !important; line-height: 1.25; letter-spacing: -.01em;
}
.pqp-router-sub {
    font-size: clamp(12.5px, 1.05vw, 14.5px); color: #6F7C90; margin: 0 auto; max-width: 52ch; line-height: 1.5;
}

.pqp-router-grid {
    position: relative; z-index: 2;
    display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(12px, 1.6vw, 20px);
}
.pqp-route {
    position: relative; display: flex; flex-direction: column; gap: 6px;
    padding: clamp(16px, 2vw, 24px) clamp(14px, 1.6vw, 20px) clamp(14px, 1.8vw, 20px);
    border: 1px solid var(--pqp-line); border-radius: 14px; background: #fff;
    text-decoration: none !important; overflow: hidden;
    transition: transform .28s cubic-bezier(.4,0,.2,1), box-shadow .28s ease, border-color .28s ease;
}
.pqp-route::before {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
    background: var(--accent, var(--pqp-teal)); transform: scaleX(0); transform-origin: left;
    transition: transform .35s cubic-bezier(.4,0,.2,1);
}
.pqp-route-teal   { --accent: var(--pqp-teal); }
/* kept for backward compatibility; all three routes use the brand teal so no
   single destination reads as "featured" */
.pqp-route-mid, .pqp-route-orange { --accent: var(--pqp-teal); }
.pqp-route:hover, .pqp-route:focus-visible {
    transform: translateY(-3px); border-color: var(--accent);
    box-shadow: 0 12px 28px rgba(22, 39, 75, .1);
}
.pqp-route:hover::before, .pqp-route:focus-visible::before { transform: scaleX(1); }

.pqp-route-num { font-size: 11px; letter-spacing: .12em; color: #A7B1C0; }
.pqp-route-ico { width: 26px; height: 26px; color: var(--accent); margin-bottom: 2px; }
.pqp-route-ico svg {
    width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.7;
    stroke-linecap: round; stroke-linejoin: round;
}
.pqp-route-title { font-size: clamp(14px, 1.2vw, 16.5px); font-weight: 600; color: var(--pqp-navy); line-height: 1.3; }
.pqp-route-cta {
    display: inline-flex; align-items: center; gap: 7px; margin-top: 6px;
    font-size: clamp(12px, 1vw, 13.5px); color: var(--accent); border-top: 1px solid var(--pqp-line);
    padding-top: 10px;
}
.pqp-route-cta svg {
    width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9;
    stroke-linecap: round; stroke-linejoin: round; transition: transform .28s ease;
}
.pqp-route:hover .pqp-route-cta svg { transform: translateX(4px); }

@media (max-width: 760px) {
    .pqp-router-grid { grid-template-columns: 1fr; gap: 10px; }
    .pqp-route { flex-direction: row; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; }
    .pqp-route-num { display: none; }
    .pqp-route-ico { width: 22px; height: 22px; flex: none; margin-bottom: 0; }
    .pqp-route-title { flex: 1 1 auto; }
    .pqp-route-cta { flex: 0 0 auto; border-top: 0; padding-top: 0; margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .pqp-route, .pqp-route::before, .pqp-route-cta svg { transition: none; }
}
