/**
 * PWA Install Banner & Modal Styles V1.99L03
 * 
 * スマホのみ表示（画面幅768px未満）
 * 一般ユーザー用は青テーマ、回答者用は緑テーマ
 */

/* ==========================================
   バナー（画面下部固定）
   ========================================== */
.lab-pwa-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
    z-index: 9998;
    padding: 14px 16px 16px;
    display: none;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
}

.lab-pwa-banner.is-visible {
    display: block;
    transform: translateY(0);
}

.lab-pwa-banner-inner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.lab-pwa-banner-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: #3b82f6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
}

.lab-pwa-banner.is-responder .lab-pwa-banner-icon {
    background: #16a34a;
}

.lab-pwa-banner-body {
    flex: 1;
    min-width: 0;
}

.lab-pwa-banner-title {
    font-size: 14px;
    font-weight: bold;
    color: #1f2937;
    margin: 0 0 2px;
    line-height: 1.3;
}

.lab-pwa-banner-desc {
    font-size: 12px;
    color: #6b7280;
    margin: 0 0 10px;
    line-height: 1.4;
}

.lab-pwa-banner-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.lab-pwa-banner-btn {
    padding: 7px 14px;
    border-radius: 6px;
    border: none;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.lab-pwa-banner-btn-primary {
    background: #3b82f6;
    color: white;
}
.lab-pwa-banner.is-responder .lab-pwa-banner-btn-primary {
    background: #16a34a;
}

.lab-pwa-banner-btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.lab-pwa-banner-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    color: #9ca3af;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lab-pwa-banner-close:hover {
    color: #6b7280;
}

/* ==========================================
   モーダル（インストール手順案内）
   ========================================== */
.lab-pwa-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow-y: auto;
}

.lab-pwa-modal-overlay.is-visible {
    display: flex;
}

.lab-pwa-modal {
    background: white;
    border-radius: 12px;
    max-width: 420px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 24px 20px 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    animation: lab-pwa-modal-in 0.25s ease-out;
}

@keyframes lab-pwa-modal-in {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.lab-pwa-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    color: #6b7280;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lab-pwa-modal-title {
    font-size: 17px;
    font-weight: bold;
    color: #1f2937;
    margin: 0 0 6px;
    padding-right: 32px;
}

.lab-pwa-modal-subtitle {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 18px;
    line-height: 1.5;
}

.lab-pwa-step {
    display: flex;
    gap: 12px;
    padding: 12px;
    margin-bottom: 10px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.lab-pwa-step-num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: #3b82f6;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.lab-pwa-modal.is-responder .lab-pwa-step-num {
    background: #16a34a;
}

.lab-pwa-step-body {
    flex: 1;
    min-width: 0;
}

.lab-pwa-step-text {
    font-size: 13.5px;
    color: #1f2937;
    line-height: 1.5;
    margin: 0;
}

.lab-pwa-step-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    margin: 0 3px;
    font-size: 14px;
}

.lab-pwa-step-illust {
    display: block;
    width: 100%;
    max-width: 280px;
    margin: 8px auto 0;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #ffffff;
}

.lab-pwa-modal-note {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.5;
    background: #fef3c7;
    border-left: 3px solid #eab308;
    padding: 10px 12px;
    border-radius: 4px;
    margin-top: 14px;
}

.lab-pwa-modal-action {
    margin-top: 16px;
    text-align: center;
}

.lab-pwa-modal-action-btn {
    padding: 10px 24px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
}

.lab-pwa-modal.is-responder .lab-pwa-modal-action-btn {
    background: #16a34a;
}

/* ==========================================
   コンテキスト誘導（質問投稿完了など）
   ========================================== */
.lab-pwa-context-hint {
    background: #f0f9ff;
    border-left: 3px solid #3b82f6;
    padding: 10px 14px;
    border-radius: 6px;
    margin: 16px 0;
    font-size: 13.5px;
    line-height: 1.5;
}

.lab-pwa-context-hint-link {
    color: #3b82f6;
    text-decoration: underline;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    font-size: inherit;
    font-family: inherit;
    font-weight: bold;
}

/* ==========================================
   メニュー項目内のPWA起動ボタン
   ========================================== */
.lab-pwa-menu-item-trigger {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: inherit;
    cursor: pointer;
    color: inherit;
    font: inherit;
}
