/* 图片展示模式样式 */

/* 优惠券编辑表单中的图片选择样式 */
.image-selection-container {
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 15px;
    background-color: #f8f9fa;
}

.image-upload-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e1e5e9;
}

.image-preview {
    text-align: center;
    padding: 10px;
    background-color: white;
    border-radius: 4px;
    border: 1px solid #ddd;
    margin-top: 10px;
}

.image-preview img {
    display: block;
    margin: 0 auto;
    max-width: 200px;
    max-height: 150px;
    object-fit: contain;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 前台优惠券图片展示样式 */
.image-section {
    margin-top: 15px;
}

.coupon-image-container {
    position: relative;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f8f9fa;
    border: 1px solid #e1e5e9;
    transition: all 0.3s ease;
}

.coupon-image-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.coupon-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.coupon-image-container:hover .coupon-image {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.coupon-image-container:hover .image-overlay {
    opacity: 1;
}

.image-overlay-text {
    color: white;
    font-size: 16px;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.image-description {
    margin-top: 10px;
    padding: 8px 12px;
    background-color: #f8f9fa;
    border-radius: 4px;
    font-size: 14px;
    color: #6c757d;
    text-align: center;
    border: 1px solid #e9ecef;
}

/* 管理后台中的显示模式标签样式 */
.badge.image {
    background: #e3f2fd;
    color: #1976d2;
}

/* 图片选择下拉框样式优化 */
#imageSelect {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: white;
}

#imageSelect:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

/* 文件上传输入框样式 */
#newImageUpload {
    width: 100%;
    padding: 8px;
    border: 2px dashed #ddd;
    border-radius: 4px;
    background-color: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

#newImageUpload:hover {
    border-color: #007bff;
}

#newImageUpload:focus {
    outline: none;
    border-color: #007bff;
}

/* 字段提示样式 */
.field-hint {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
    font-style: italic;
}

/* 响应式设计 */
@media (max-width: 768px) {
    /* 管理后台响应式 */
    .image-selection-container {
        padding: 10px;
    }
    
    .image-preview img {
        max-width: 150px;
        max-height: 100px;
    }
    
    #imageSelect {
        font-size: 14px;
    }
    
    /* 前台响应式 */
    .coupon-image {
        height: 150px;
    }
    
    .image-overlay-text {
        font-size: 14px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}