/* =============================================
   点图获取坐标工具 - 样式
   ============================================= */

/* 地图供应商标签栏 */
.ctgc-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.ctgc-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 18px;
    border: 1.5px solid #d9d9d9;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    background: #fafafa;
    transition: border-color 0.18s, background 0.18s, color 0.18s, box-shadow 0.18s, transform 0.15s;
    user-select: none;
    outline: none;
}

.ctgc-tab:hover {
    border-color: #4096ff;
    background: #e8f4ff;
    color: #1677ff;
    transform: scale(1.02);
}

.ctgc-tab.active {
    border-color: #1677ff;
    background: #e6f4ff;
    color: #1677ff;
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(22, 119, 255, 0.15);
}

/* 供应商颜色圆点 */
.ctgc-tab-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
}

.ctgc-dot-tencent { background: #1677ff; }
.ctgc-dot-baidu   { background: #e02e2e; }
.ctgc-dot-gaode   { background: #00b05a; }

/* 提示信息栏 */
.ctgc-tip-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 8px 12px;
    background: #f0f7ff;
    border: 1px solid #cce0ff;
    border-radius: 8px;
    margin-bottom: 8px;
    min-height: 38px;
}

.ctgc-tip {
    flex: 1;
    font-size: 12.5px;
    color: #444;
    line-height: 1.5;
    min-width: 200px;
}

.ctgc-tip strong {
    color: #1677ff;
}

.ctgc-tip-hidden {
    display: none;
}

.ctgc-tip-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.ctgc-action-btn {
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 16px;
    white-space: nowrap;
    transition: transform 0.15s;
}

.ctgc-action-btn:hover {
    transform: scale(1.02);
}

/* iframe 地图容器 */
.ctgc-frame-wrap {
    position: relative;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    border: 1.5px solid #e0e0e0;
    background: #f5f7fa;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.ctgc-frame {
    display: block;
    width: 100%;
    height: 600px;
    border: none;
    background: #fff;
    transition: opacity 0.3s;
}

/* 加载状态 */
.ctgc-loading {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 14px;
    color: #888;
    background: #f5f7fa;
    z-index: 10;
    pointer-events: none;
    transition: opacity 0.4s;
}

.ctgc-loading.ctgc-loaded {
    opacity: 0;
    pointer-events: none;
}

.ctgc-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e0e8ff;
    border-top-color: #4096ff;
    border-radius: 50%;
    animation: ctgcSpin 0.7s linear infinite;
}

@keyframes ctgcSpin {
    to { transform: rotate(360deg); }
}

/* 被拦截时的替代提示 */
.ctgc-blocked {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 48px 32px;
    text-align: center;
    background: #f5f7fa;
    min-height: 300px;
}

.ctgc-blocked-icon { font-size: 48px; }

.ctgc-blocked-title {
    font-size: 17px;
    font-weight: 600;
    color: #333;
}

.ctgc-blocked-desc {
    font-size: 13px;
    color: #777;
    max-width: 380px;
    line-height: 1.6;
}

.ctgc-blocked-btn {
    margin-top: 6px;
    transition: transform 0.15s;
}

.ctgc-blocked-btn:hover {
    transform: scale(1.02);
}

/* 坐标系说明卡片网格 */
.ctgc-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}

@media (max-width: 680px) {
    .ctgc-info-grid {
        grid-template-columns: 1fr;
    }
}

.ctgc-info-card {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1.5px solid #e8e8e8;
    background: #fafafa;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: border-color 0.18s, box-shadow 0.18s;
}

.ctgc-info-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ctgc-card-tencent { border-top: 3px solid #1677ff; }
.ctgc-card-baidu   { border-top: 3px solid #e02e2e; }
.ctgc-card-gaode   { border-top: 3px solid #00b05a; }

.ctgc-info-header {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13.5px;
    color: #222;
}

.ctgc-coord-badge {
    margin-left: auto;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    background: #e6f4ff;
    color: #1677ff;
    border: 1px solid #b5d8ff;
}

.ctgc-badge-baidu {
    background: #fff0f0;
    color: #e02e2e;
    border-color: #ffa9a9;
}

.ctgc-badge-gaode {
    background: #f0fff6;
    color: #00a050;
    border-color: #a8edc4;
}

.ctgc-info-body {
    font-size: 12px;
    color: #666;
    line-height: 1.55;
    flex: 1;
}

.ctgc-info-link {
    font-size: 12px;
    color: #1677ff;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.15s;
}

.ctgc-info-link:hover {
    opacity: 0.75;
    text-decoration: underline;
}

/* 坐标系使用小贴士 */
.ctgc-coord-tips {
    background: #fafafa;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 4px;
}

.ctgc-tips-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.ctgc-tips-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px 16px;
}

@media (max-width: 600px) {
    .ctgc-tips-grid {
        grid-template-columns: 1fr;
    }
}

.ctgc-tips-item {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    font-size: 12px;
    color: #555;
    line-height: 1.55;
}

.ctgc-tips-dot {
    flex-shrink: 0;
    font-size: 14px;
    line-height: 1.4;
}

/* 通用隐藏辅助类（代替 jQuery .show()/.hide()） */
.ctgc-hidden {
    display: none !important;
}

/* 剪贴板辅助元素（代替内联 style 定位） */
.ctgc-clipboard-helper {
    position: fixed;
    top: -9999px;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* Toast 通知 */
.ctgc-toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 9px 22px;
    background: #333;
    color: #fff;
    border-radius: 20px;
    font-size: 13px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    z-index: 9999;
    transition: opacity 0.25s, transform 0.25s;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.ctgc-toast.ctgc-toast-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
