/* Modal 关闭按钮修复样式 */
.modal .close-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10001;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal .close-icon i {
    font-size: 18px;
    color: #ffffff;
    font-style: normal !important;
    transform: none !important;
}

/* 确保 MCG 图标字体正确显示 - 使用正确的关闭图标代码 */
.mcg-icon-close:before {
    content: "\e90e";
    font-family: 'mcg-icons';
    font-style: normal !important;
}

/* Gallery widget 特定样式 */
.gallery-widget .custom-modal > .modal .close-icon {
    top: 28px;
    right: 28px;
}

/* 修复模态框中的图片显示 - 全屏显示 */
.gallery-widget .custom-modal .modal {
    padding: 0 !important;
}

.gallery-widget .custom-modal .modal-dialog {
    width: 100vw;
    height: 100vh;
    max-width: none;
    margin: 0;
}

.gallery-widget .custom-modal .modal-content {
    width: 100%;
    height: 100vh;
    border-radius: 0;
    border: none;
    background-color: rgba(0, 0, 0, 0.95);
}

.gallery-widget .custom-modal .modal-body {
    padding: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 自定义画廊容器 */
.gallery-container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 画廊图片 */
.gallery-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: none;
    align-items: center;
    justify-content: center;
}

.gallery-slide.active {
    display: flex;
}

.gallery-slide .gallery-image {
    width: 90vw;
    height: 90vh;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* 左右箭头样式 */
.gallery-prev,
.gallery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10002;
    transition: all 0.3s;
    text-decoration: none;
}

.gallery-prev:hover,
.gallery-next:hover {
    background-color: rgba(255, 255, 255, 0.2);
    text-decoration: none;
}

.gallery-prev {
    left: 30px;
}

.gallery-next {
    right: 30px;
}

/* 细箭头 - 使用 border 绘制 */
.gallery-prev .arrow,
.gallery-next .arrow {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-top: 2px solid rgba(255, 255, 255, 0.5);
    border-right: 2px solid rgba(255, 255, 255, 0.5);
}

.gallery-prev .arrow {
    transform: rotate(-135deg);
    margin-right: -3px;
}

.gallery-next .arrow {
    transform: rotate(45deg);
    margin-left: -3px;
}

.gallery-prev:hover .arrow,
.gallery-next:hover .arrow {
    border-color: rgba(255, 255, 255, 0.9);
}

@media (max-width: 768px) {
    .gallery-prev,
    .gallery-next {
        width: 40px;
        height: 40px;
    }
    
    .gallery-prev {
        left: 15px;
    }
    
    .gallery-next {
        right: 15px;
    }
    
    .gallery-prev .arrow,
    .gallery-next .arrow {
        width: 10px;
        height: 10px;
    }
    
    .gallery-slide .gallery-image {
        width: 95vw;
        height: 95vh;
    }
}
