/* PWA Install Overlay & Topics Modal */
:root {
    --vcn-pwa-primary: #007bff;
    --vcn-pwa-bg: rgba(0, 0, 0, 0.85);
    --vcn-pwa-card: #ffffff;
    --vcn-pwa-text: #333333;
}

.vcn-pwa-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--vcn-pwa-bg);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.vcn-pwa-overlay-content,
.vcn-pwa-modal-content {
    background: var(--vcn-pwa-card);
    padding: 15px 12px;
    border-radius: 16px;
    width: 97%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    color: var(--vcn-pwa-text);
}

.vcn-pwa-overlay-content h2,
.vcn-pwa-modal-content h2 {
    margin-top: 0;
    margin-bottom: 5px;
    font-size: 20px;
    font-weight: bold;
    color: var(--vcn-pwa-text);
}

.vcn-pwa-overlay-content p {
    font-size: 13px;
    margin-bottom: 10px;
    line-height: 1.3;
}

.vcn-pwa-instruction {
    background: #f5f5f7;
    padding: 15px;
    border-radius: 12px;
    margin: 20px 0;
    font-size: 16px;
    line-height: 1.5;
    text-align: left;
}

#vcn-pwa-topics-list {
    max-height: 45vh;
    overflow-y: auto;
    margin: 15px 0;
    padding-right: 10px;
}

/* Custom Scrollbar for better UX on desktop/some mobile */
#vcn-pwa-topics-list::-webkit-scrollbar {
    width: 6px;
}
#vcn-pwa-topics-list::-webkit-scrollbar-track {
    background: #f1f1f1; 
    border-radius: 4px;
}
#vcn-pwa-topics-list::-webkit-scrollbar-thumb {
    background: #ccc; 
    border-radius: 4px;
}

.ios-share-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M336 176h40a40 40 0 0140 40v208a40 40 0 01-40 40H136a40 40 0 01-40-40V216a40 40 0 0140-40h40" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M336 112l-80-80-80 80M256 32v256"/></svg>');
    background-size: cover;
    vertical-align: middle;
}

.vcn-pwa-arrow-down {
    font-size: 50px;
    margin-top: 20px;
    animation: bounce 1.5s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(20px); }
    60% { transform: translateY(10px); }
}

.vcn-pwa-tutorial-video {
    margin: 10px auto;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    background: #000;
    
    position: relative;
    /* Simulate a phone screen aspect ratio */
    aspect-ratio: 9 / 19.5;
    height: 65vh; 
    max-height: 600px;
    max-width: 100%;
}

.vcn-pwa-tutorial-video img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: auto;
    /* Zoom dynamically out of the webp's large gray background */
    transform: translate(-50%, -46%) scale(3.2);
    transform-origin: center center;
    pointer-events: none;
    display: block;
}

.vcn-pwa-btn {
    background-color: var(--vcn-pwa-primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: bold;
    width: 100%;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.2s;
}

.vcn-pwa-btn:active {
    background-color: #0056b3;
}

.vcn-pwa-close-btn {
    background: none;
    border: none;
    color: #888;
    margin-top: 15px;
    font-size: 14px;
    text-decoration: underline;
    cursor: pointer;
}

/* Toggles for Topics */
.vcn-pwa-topic-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    text-align: left;
}
.vcn-pwa-topic-item:last-child {
    border-bottom: none;
}

.vcn-pwa-topic-name {
    font-size: 16px;
    font-weight: 500;
}

.vcn-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}
.vcn-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.vcn-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}
.vcn-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .vcn-slider {
    background-color: var(--vcn-pwa-primary);
}
input:checked + .vcn-slider:before {
    transform: translateX(22px);
}

/* Static PWA Steps List */
.vcn-pwa-steps-list {
    max-height: 60vh;
    overflow-y: auto;
    text-align: left;
    margin: 15px 0;
    padding-right: 8px;
    border-radius: 8px;
    background: #f8f9fa;
    border: 1px solid #ebedef;
    -webkit-overflow-scrolling: touch;
}

.vcn-tutorial-column .vcn-pwa-steps-list {
    max-height: 500px;
}

.vcn-pwa-steps-list::-webkit-scrollbar { width: 6px; }
.vcn-pwa-steps-list::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 4px; }
.vcn-pwa-steps-list::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }

.vcn-pwa-step {
    display: flex;
    gap: 12px;
    padding: 15px;
    border-bottom: 1px solid #ddd;
}
.vcn-pwa-step:last-child {
    border-bottom: none;
}

.vcn-pwa-step-num {
    background: var(--vcn-pwa-primary, #007bff);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    flex-shrink: 0;
}

.vcn-pwa-step-content {
    flex: 1;
}

.vcn-pwa-step-content p {
    margin: 0 0 10px 0 !important;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
}

.vcn-pwa-step-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: block;
    border: 1px solid rgba(0,0,0,0.05);
}
