/**
 * 安规证书管理 - 样式文件
 */

/* 证书列表页面 */
.column-cert_type {
    width: 100px;
}

.column-cert_file {
    width: 200px;
}

.column-expire_date {
    width: 120px;
}

.column-status {
    width: 100px;
}

/* 证书 Meta Box */
#certificate_details .form-table th {
    width: 150px;
}

#certificate_details .form-table td {
    padding: 15px 10px;
}

/* 上传按钮样式 */
#upload_cert_btn {
    margin-top: 5px;
}

#cert_file_display {
    font-weight: 500;
    color: #333;
}

/* 产品编辑页面 - 证书选择 */
#product-certificate-selector {
    max-height: 300px;
    overflow-y: auto;
}

#product-certificate-selector label {
    transition: background-color 0.2s ease;
    cursor: pointer;
}

#product-certificate-selector label:hover {
    background-color: #f9f9f9;
}

#product-certificate-selector input[type="checkbox"] {
    margin-top: 4px;
}

/* 证书搜索框 */
#cert-search {
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 6px 10px;
    font-size: 13px;
}

/* ========================================
 * 前端 - Safety Standard 图标样式
 * ======================================== */

.safety-cert-icons {
    display: inline-flex !important;
    gap: 12px !important;
    align-items: center;
    justify-content: center;
    padding: 0 2px;
}

.safety-cert-icons .cert-icon-link {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, opacity 0.15s ease;
    opacity: 0.9;
    line-height: 1;
    margin: 0;
}

.safety-cert-icons .cert-icon-link:hover {
    transform: scale(1.08);
    opacity: 1;
}

/* 安全证书图片样式 */
.safety-cert-icons .cert-icon-link img {
    display: block !important;
    width: auto !important;
    height: auto !important;
    max-width: 28px;
    max-height: 28px;
    object-fit: contain;
    vertical-align: middle;
}

/* 无文件的灰色图标 */
.safety-cert-icons .cert-icon-link.disabled {
    cursor: default;
    pointer-events: none;
    opacity: 0.35;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .safety-cert-icons {
        gap: 8px !important;
    }
    
    .safety-cert-icons .cert-icon-link img {
        max-width: 22px;
        max-height: 22px;
    }
}

/* 后台列表状态样式 */
.status-active {
    color: #46b450;
}

.status-expired {
    color: #f56e28;
}

.status-revoked {
    color: #dc3232;
}
