/* ============ JCAATs 常見問題（product_jcaats.php、jcaats_subscription.php 共用） ============ */

/* QA專區 modal */
#jcaatsQaModal .modal-header {
    background-color: #98BB3D;
    color: #FFFFFF;
}
#jcaatsQaModal .modal-header .close {
    color: #FFFFFF;
    opacity: 0.9;
    text-shadow: none;
}
/* 區塊名稱與所在頁面上下排列，右側箭頭跨兩列 */
#jcaatsQaModal .qa-modal-link {
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: 0.75rem;
    align-items: center;
    padding: 1rem 1.25rem;
}
#jcaatsQaModal .qa-modal-link::after {
    content: "\203A";
    grid-column: 2;
    grid-row: 1 / span 2;
    color: #198754;
    font-size: 1.5rem;
    line-height: 1;
}
#jcaatsQaModal .qa-modal-title {
    color: #222;
    font-size: 1.1rem;
    font-weight: bold;
}
#jcaatsQaModal .qa-modal-page {
    color: #6c757d;
    font-size: 0.875rem;
}

/* 常見問題清單：導入與應用（產品頁）、安裝與技術（訂閱頁） */
.qa-list {
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075);
}
.qa-list .qa-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
}
.qa-list .qa-toggle[aria-expanded="true"] {
    background-color: #f0fff4;
}
.qa-list .qa-icon {
    flex-shrink: 0;
    margin-right: 0.5rem;
}
.qa-list .qa-question {
    flex: 1;
    margin: 0;
    font-size: 1.05rem;
    font-weight: bold;
    line-height: 1.6;
    color: #222;
}
.qa-list .qa-chevron {
    flex-shrink: 0;
    width: 0.6rem;
    height: 0.6rem;
    margin: -0.3rem 0.25rem 0 0.75rem;
    border-right: 2px solid #198754;
    border-bottom: 2px solid #198754;
    transform: rotate(45deg);
    transition: transform 0.2s ease, margin 0.2s ease;
}
.qa-list .qa-toggle[aria-expanded="true"] .qa-chevron {
    margin-top: 0.3rem;
    transform: rotate(-135deg);
}
.qa-list .qa-answer {
    border-left: 6px solid #198754;
    font-size: 1rem;
    line-height: 1.8;
}
.qa-list .qa-answer ul {
    padding-left: 1.5rem;
}
.qa-flow {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    background-color: #f0fff4;
    color: #198754;
    font-weight: bold;
}

/* 中英文訂閱頁：由對應 FAQ 開啟 Key Viewer 下載視窗 */
.jcaats-key-viewer-trigger {
    font-weight: 700;
}
.jcaats-key-viewer-modal .modal-dialog {
    max-width: 900px;
}
.jcaats-key-viewer-modal .modal-content {
    border: 0;
    border-radius: 18px;
    box-shadow: 0 16px 60px rgba(0, 0, 0, 0.2);
}
.jcaats-key-viewer-modal .modal-body {
    padding: 2.5rem 1.5rem 1.5rem;
}
.jcaats-key-viewer-modal .jcaats-viewer-close {
    position: absolute;
    top: 0.6rem;
    right: 0.9rem;
    z-index: 2;
    padding: 0.25rem;
    color: #34516c;
    font-size: 1.75rem;
    opacity: 0.85;
}
.jcaats-viewer-panel {
    position: relative;
    overflow: hidden;
    padding: 2.5rem;
    border-radius: 16px;
    background: linear-gradient(135deg, #f5f7ff 0%, #e1edff 100%);
    box-shadow: 0 10px 20px rgba(0, 77, 204, 0.07);
    text-align: center;
}
.jcaats-viewer-panel::before {
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(0, 119, 204, 0.05);
    transform: translate(30%, -30%);
    content: "";
    pointer-events: none;
}
.jcaats-viewer-panel .jcaats-viewer-heading {
    position: relative;
    margin: 0;
    color: #004080;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.5;
}
.jcaats-viewer-heading::after {
    display: block;
    width: 80px;
    height: 3px;
    margin: 1rem auto 1.75rem;
    border-radius: 3px;
    background: #0077cc;
    content: "";
}
.jcaats-viewer-panel .jcaats-viewer-intro {
    margin: 0 0 2rem;
    color: #444;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.8;
}
.jcaats-viewer-tools {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}
.jcaats-key-viewer-modal .jcaats-viewer-tool {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    min-width: 180px;
    min-height: 70px;
    padding: 14px 24px;
    border-radius: 50px;
    background: #0078d7;
    box-shadow: 0 5px 15px rgba(0, 119, 204, 0.3);
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
}
.jcaats-viewer-tool small {
    font-size: 0.75rem;
    font-weight: 400;
}
.jcaats-key-viewer-modal .jcaats-viewer-arm { background: #555; }
.jcaats-key-viewer-modal .jcaats-viewer-intel { background: #ff9800; }
.jcaats-key-viewer-modal .jcaats-viewer-tool:hover {
    color: #fff;
    text-decoration: underline;
    box-shadow: 0 7px 16px rgba(0, 100, 170, 0.3);
}
.jcaats-key-viewer-modal .jcaats-viewer-tool:focus,
.jcaats-key-viewer-modal .jcaats-viewer-close:focus {
    outline: 3px solid #004786;
    outline-offset: 3px;
}
.jcaats-viewer-manuals {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e5e9ee;
    text-align: center;
}
.jcaats-viewer-manuals h3 {
    margin: 0 0 1rem;
    color: #2d485c;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.5;
}
.jcaats-viewer-manual-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}
.jcaats-viewer-manual-links a {
    max-width: 100%;
    white-space: normal;
}
@media (max-width: 575.98px) {
    .jcaats-key-viewer-modal .modal-dialog { margin: 0.5rem; }
    .jcaats-key-viewer-modal .modal-body { padding: 2.25rem 1rem 1rem; }
    .jcaats-viewer-panel { padding: 2rem 1rem; }
    .jcaats-viewer-tools { flex-direction: column; align-items: center; }
    .jcaats-key-viewer-modal .jcaats-viewer-tool { width: 200px; max-width: 100%; }
    .jcaats-viewer-manual-links { flex-direction: column; }
}
