/* redmine_gallery/assets/stylesheets/gallery.css */

.galleries-card {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.gallery-card {
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    padding: 5px;
    background-color: #FFF;
    overflow: hidden;
}

.gallery-card:hover {
    border-color: #bbb;
}

.gallery-cover {
    position: relative;
    height: 180px;
    background: #f5f5f5;
    overflow: hidden;
}
/* 半透明主海报样式 */
.gallery-cover-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* opacity: 0.6; /* 半透明效果 */ */
}

/* 渐变放在父容器 .gallery-cover 上，而不是 img 上 */
.gallery-cover::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    /* background: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.2)); */
    background: linear-gradient(to top, rgb(255 255 255 / 60%), rgba(0, 0, 0, 0.2));
    pointer-events: none;
    z-index: 1; /* 渐变在图片上方 */
}

.gallery-cover-bg:hover {
    /* opacity: 0.8; /* 半透明效果 */ */
    opacity: 1; /* 半透明效果 */
}

.cover-label {
    position: absolute;
    bottom: 5px;
    /* top: 5px; */
    right: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    z-index: 2;
}

.cover-label a {
    color: #fff;
}
/* 默认封面样式 */
.gallery-default-cover {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
}
.default-cover-icon {
    font-size: 36px;
    margin-bottom: 8px;
}
/* 叠加缩略图容器样式 */
.gallery-overlay-thumbs {
    position: absolute;
    bottom: 10px;
    left: 10px;
    display: flex;
    gap: 8px;
    z-index: 2;
}
.overlay-thumb {
    width: 60px;
    height: 60px;
    border: 2px solid #fff;
    border-radius: 3px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.overlay-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-info {
    padding: 10px;
    text-align: center;
    border: 1px solid #e0e0e0;
    margin-top: 5px;
}
.gallery-image-info a:hover {
	text-decoration: none;
	background-color: #d0d0d0;
	color: black;
}

.gallery-image-info a {
	text-decoration: none!important;
	border-bottom-style: dotted;
	border-bottom-width: thin;
}

.gallery-info h3 {
	text-overflow: ellipsis;
	overflow: hidden;
	white-space: nowrap;
	padding: 0;
	margin: 0;
}

.gallery-meta {
    color: #999;
    font-size: 12px;
    margin: 0;
}

/* 全局图库样式补充 */
.gallery-cover-img {
    transition: transform 0.3s ease;
}

.gallery-cover-img:hover {
    transform: scale(1.05);
}

.gallery-image-img {
    transition: opacity 0.3s ease;
    display: block; /* 推荐方案1 */
    max-width: 100%;
    height: auto;
}

.gallery-image-img:hover {
    opacity: 0.9;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .gallery-images-list {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .galleries-card {
        grid-template-columns: 1fr !important;
    }

    .form-control {
        width: 100% !important;
    }
}

/* 扩展图标 */
.icon-shape-handles { background-image:  url(../images/shape_handles.png); }
.icon-photo { background-image:  url(../images/photo.png); }
.icon-galleries { background-image:  url(../images/photos.png); }

span.stars {
  display: inline-block;
  width: 65px; /* 5颗星，每颗13px */
  height: 13px;
  background: url(../images/stars.png) no-repeat 0px 50%;
  /* vertical-align: middle; */
}

span.stars-5 { background-position:   0px 50%; }
span.stars-4 { background-position: -13px 50%; }
span.stars-3 { background-position: -26px 50%; }
span.stars-2 { background-position: -39px 50%; }
span.stars-1 { background-position: -52px 50%; }
span.stars-0 { background-position: -65px 50%; }
