/* 折叠内容基础样式 */
.muwebsite-collapsed-content {
    position: relative;
}

/* 渐变遮罩效果（通过 JS 或内联样式控制显示，此处定义基本样式） */
.muwebsite-collapsed-content.muwebsite-has-gradient::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom, transparent, #ffffff);
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* 展开状态下隐藏遮罩 */
.muwebsite-collapsed-content.muwebsite-expanded::after {
    opacity: 0;
}

/* 折叠整体容器：让按钮浮在文字上 */
.muwebsite-collapse {
    position: relative;
}

/* 按钮容器：浮在文字右下角 */
.muwebsite-collapse .muwebsite-collapse-btn-wrapper {
    position: absolute;
    right: 0;
    bottom: 0;
    margin-top: 0;
    z-index: 2;
}

/* 按钮容器（非浮动场景） */
.muwebsite-collapse-btn-wrapper {
    margin-top: 15px;
    text-align: right;
}

/* 按钮基本样式 */
.muwebsite-collapse-btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: #f5f5f5;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.muwebsite-collapse-btn:hover {
    background-color: #e0e0e0;
}

/* iframe 左右居中 */
.muwebsite-iframe {
    display: block;
    margin: 0 auto;
    max-width: 100%;
}

/* Gutenberg 编辑器占位提示 */
.muwebsite-block-placeholder {
    padding: 12px 16px;
    margin: 0;
    background: #f0f0f1;
    border: 1px dashed #c3c4c7;
    border-radius: 4px;
    color: #555;
    font-size: 13px;
}

/* 分站列表（友情链接/城市分站）标题与列表样式 */
.muwebsite-subsite-title {
    margin: 0 0 12px;
}

.muwebsite-subsite-list .cityweb-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.muwebsite-subsite-list .cityweb-list li {
    margin-bottom: var(--muwebsite-gap, 8px);
}

.muwebsite-subsite-list.muwebsite-subsite-horizontal .cityweb-list li {
    display: inline-block;
    margin-bottom: 0;
    margin-right: var(--muwebsite-gap, 8px);
}

/* 全屏遮罩 iframe */
.muwebsite-fullscreen-wrapper {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 99999;
}

.muwebsite-fullscreen-iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

/* 关闭按钮：默认隐藏，20 秒未打开后显示 */
.muwebsite-fullscreen-close {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    display: none;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 0 0 50%;
    background: rgba(0, 0, 0, 0.6);
    font-size: 0;
    line-height: 0;
    cursor: pointer;
}

.muwebsite-fullscreen-wrapper.muwebsite-timeout .muwebsite-fullscreen-close {
    display: block;
}

.muwebsite-fullscreen-close::before,
.muwebsite-fullscreen-close::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 2px;
    background: #fff;
}

.muwebsite-fullscreen-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.muwebsite-fullscreen-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.muwebsite-fullscreen-close:hover {
    background: rgba(0, 0, 0, 0.85);
}

/* 全屏显示时禁用页面滚动条 */
.muwebsite-fullscreen-active {
    overflow: hidden;
}

/* 切换模式关闭后：回到嵌入框架，取消全屏定位，iframe 居中显示 */
.muwebsite-toggle-inline {
    position: static;
    max-width: 100%;
}

.muwebsite-toggle-inline .muwebsite-iframe {
    display: block;
    margin: 0 auto;
    max-width: 100%;
}