/* DHX 行程攻略分享海报 - 按钮与弹层样式 */

/* === 按钮 === */
.dhx-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 32px auto;
    padding: 12px 28px;
    background: linear-gradient(135deg, #0d9488, #059669);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(13, 148, 136, .25);
    transition: transform .15s, box-shadow .15s;
    display: flex;
    width: fit-content;
}
.dhx-share-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(13, 148, 136, .35);
}
.dhx-share-btn:active {
    transform: translateY(0);
}
.dhx-share-icon {
    font-size: 18px;
}

/* === 弹层 === */
.dhx-share-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dhx-share-modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .72);
    backdrop-filter: blur(4px);
}
.dhx-share-modal-content {
    position: relative;
    background: #fff;
    border-radius: 18px;
    padding: 24px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .4);
}

.dhx-share-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.dhx-share-modal-tip {
    font-size: 13px;
    color: #6b7280;
}
.dhx-share-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #f3f4f6;
    color: #374151;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background .15s;
}
.dhx-share-modal-close:hover {
    background: #e5e7eb;
}

.dhx-share-modal-poster-wrap {
    width: 375px;
    max-width: 100%;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .12);
}
/* canvas 仅作离屏绘制，展示用 img（只有 img 长按才弹系统"保存图片"菜单） */
.dhx-share-modal-poster-wrap canvas {
    display: none !important;
}
.dhx-share-modal-poster-wrap img {
    display: block;
    width: 100%;
    height: auto;
    -webkit-touch-callout: default;
    touch-callout: default;
    border-radius: 12px;
}

/* === 底部操作按钮：下载海报（绿色主按钮）/ 复制链接 / 关闭 === */
.dhx-share-modal-footer {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}
.dhx-share-act {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 8px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}
.dhx-share-act:hover {
    background: #f9fafb;
}
.dhx-share-act-primary {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
    font-weight: 600;
}
.dhx-share-act-primary:hover {
    background: #15803d;
    border-color: #15803d;
}

@media (max-width: 640px) {
    .dhx-share-modal-content {
        padding: 16px;
    }
    .dhx-share-modal-footer {
        flex-direction: column;
        gap: 8px;
    }
    .dhx-share-act {
        padding: 12px 0;
        font-size: 15px;
    }
}

/* === 按钮插入位置 === */
#dhx-share-container {
    text-align: center;
    margin: 24px 0;
}