/* shared.css - Common Styles for PWA Popups & Overlays */

/* =========================================
   SHARED POPUP OVERLAYS
   ========================================= */
.popup-overlay,
.popup-guide {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.popup-overlay.active,
.popup-guide.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* =========================================
   SELECTOR CARD (Android/iOS)
   ========================================= */
.selector-card,
.guide-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    width: 100%;
    max-width: 360px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.popup-overlay.active .selector-card,
.popup-overlay.active .guide-card,
.popup-guide.open .guide-card {
    transform: scale(1) translateY(0);
}

body.dark .selector-card,
body.dark .guide-card {
    background: rgba(40, 40, 45, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
}

/* =========================================
   SELECTOR HEADER
   ========================================= */
.selector-header {
    padding: 20px;
    text-align: center;
    position: relative;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.selector-header h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 5px 0;
}

.selector-header p {
    font-size: 12px;
    opacity: 0.6;
    margin: 0;
}

body.dark .selector-header {
    border-color: rgba(255, 255, 255, 0.1);
}

/* =========================================
   PLATFORM OPTIONS
   ========================================= */
.platform-options {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.platform-option {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: 16px;
    cursor: pointer;
    transition: 0.2s;
}

.platform-option.android {
    background: linear-gradient(135deg, rgba(61, 220, 132, 0.15), rgba(61, 220, 132, 0.05));
    border: 1px solid rgba(61, 220, 132, 0.3);
}

.platform-option.android:hover {
    background: linear-gradient(135deg, rgba(61, 220, 132, 0.25), rgba(61, 220, 132, 0.1));
}

.platform-option.ios {
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.15), rgba(0, 122, 255, 0.05));
    border: 1px solid rgba(0, 122, 255, 0.3);
}

.platform-option.ios:hover {
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.25), rgba(0, 122, 255, 0.1));
}

.plat-icon {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.platform-option.android .plat-icon {
    background: #3DDC84;
    color: white;
}

.platform-option.ios .plat-icon {
    background: #007AFF;
    color: white;
}

.plat-text b {
    display: block;
    font-size: 14px;
    margin-bottom: 2px;
}

.plat-text span {
    font-size: 11px;
    opacity: 0.6;
}

/* =========================================
   iOS GUIDE STEPS
   ========================================= */
.guide-header {
    padding: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.guide-header h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

body.dark .guide-header {
    border-color: rgba(255, 255, 255, 0.1);
}

.guide-body {
    padding: 20px;
}

.ios-step {
    display: flex;
    gap: 15px;
    margin-bottom: 18px;
}

.step-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #007AFF, #5856D6);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.step-info b {
    display: block;
    font-size: 13px;
    color: #007AFF;
    margin-bottom: 3px;
}

.step-info p {
    font-size: 13px;
    line-height: 1.4;
    margin: 0;
}

/* =========================================
   CLOSE BUTTON
   ========================================= */
.btn-close-abs {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    transition: 0.2s;
}

.btn-close-abs:hover {
    background: rgba(0, 0, 0, 0.1);
}

body.dark .btn-close-abs {
    background: rgba(255, 255, 255, 0.1);
}

body.dark .btn-close-abs:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* =========================================
   SHARED BUTTON STYLES
   ========================================= */
.btn-text-only {
    background: none;
    border: none;
    color: #007AFF;
    cursor: pointer;
    font-size: 14px;
    padding: 10px;
}

.btn-text-only:hover {
    opacity: 0.7;
}