/* ============================================================
   Pre-Filled Pen / Nasal Spray upgrade toggle — DETAIL PAGES
   ------------------------------------------------------------
   Ported from css/products.css so the toggle renders correctly
   on /product/* pages WITHOUT pulling in the whole listing-grid
   stylesheet (which broke the detail layout previously).
   ============================================================ */

.pd-upgrade-toggles { margin: 0; }

.pen-upgrade-toggle {
    padding: 0;
    margin-top: 8px;
    margin-bottom: 8px;
}
.pen-upgrade-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 10px 14px;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border: 1.5px solid #ddd6fe;
    border-radius: 10px;
    transition: all 0.2s ease;
    user-select: none;
}
.pen-upgrade-label:hover {
    border-color: #a78bfa;
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
}
.pen-toggle-track {
    position: relative;
    width: 36px;
    height: 20px;
    background: #cbd5e1;
    border-radius: 10px;
    flex-shrink: 0;
    transition: background 0.2s ease;
}
.pen-toggle-track.active { background: #7c3aed; }
.pen-toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    transition: transform 0.2s ease;
}
.pen-toggle-track.active .pen-toggle-thumb { transform: translateX(16px); }
.pen-upgrade-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    line-height: 1.25;
}
.pen-upgrade-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #5b21b6;
}
.pen-upgrade-title i { margin-right: 4px; }
.pen-upgrade-price {
    font-size: 0.78rem;
    font-weight: 600;
    color: #7c3aed;
}
.pen-learn-more {
    color: #7c3aed;
    text-decoration: underline;
    cursor: pointer;
}
.pen-learn-more:hover { color: #5b21b6; }
.spray-learn-more {
    color: #0284c7;
    text-decoration: underline;
    cursor: pointer;
}
.spray-learn-more:hover { color: #0369a1; }

/* Nasal spray variant (Semax/Selank) */
.spray-label:hover {
    border-color: #7dd3fc;
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
}
.spray-label {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-color: #bae6fd;
}
.spray-track.active { background: #0284c7; }
.spray-title { color: #0369a1; }
.spray-price { color: #0284c7; }

/* "Learn more" info popup */
.pen-info-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 4000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.pen-info-overlay.visible { display: flex; }
.pen-info-popup {
    position: relative;
    background: #fff;
    border-radius: 16px;
    max-width: 380px;
    width: 100%;
    padding: 32px 28px 26px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
    text-align: left;
    animation: pdPenPop 0.18s ease;
}
@keyframes pdPenPop { from { transform: scale(0.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.pen-info-close {
    position: absolute;
    top: 12px;
    right: 14px;
    border: none;
    background: none;
    font-size: 1.6rem;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
}
.pen-info-close:hover { color: #475569; }
.pen-info-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
    margin-bottom: 14px;
}
.pen-info-icon i { font-size: 1.5rem; color: #7c3aed; }
.pen-info-heading {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 6px;
}
.pen-info-desc {
    font-size: 0.9rem;
    color: #475569;
    margin: 0 0 14px;
}
.pen-info-list {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
    display: flex;
    flex-direction: column;
    gap: 9px;
}
.pen-info-list li {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 0.88rem;
    color: #334155;
}
.pen-info-list li i { color: #7c3aed; margin-top: 2px; flex-shrink: 0; }
.pen-info-footer {
    background: #f5f3ff;
    color: #5b21b6;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 10px 14px;
    border-radius: 8px;
    text-align: center;
}

@media (max-width: 480px) {
    .pen-upgrade-label { padding: 8px 10px; gap: 8px; }
    .pen-upgrade-title { font-size: 0.78rem; }
    .pen-upgrade-price { font-size: 0.68rem; }
    .pen-toggle-track { width: 32px; height: 18px; }
    .pen-toggle-thumb { width: 14px; height: 14px; }
    .pen-toggle-track.active .pen-toggle-thumb { transform: translateX(14px); }
    .pen-info-popup { padding: 24px 18px 20px; }
}
