/* ================================================================
   菜刀客在线工具页 · image-extractor.html 私有样式
   需在 /css/common.css 之后加载。
   ================================================================ */

/* ---- 模式卡片选中态 ---- */
select.form-control {
    cursor: pointer;
}

/* ---- HTML 源码输入 ---- */
#htmlInput {
    min-height: 320px;
    font-family: Consolas, Menlo, "Courier New", monospace;
    font-size: 12px;
    line-height: 1.5;
    resize: vertical;
}

/* ---- 选项列表 ---- */
.opt-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.opt-check {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
}

.opt-check input {
    accent-color: #667eea;
}

select.form-control {
    cursor: pointer;
}

/* ---- 结果工具栏 ---- */
.filter-select {
    padding: 5px 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 12px;
    background: white;
    color: #374151;
    cursor: pointer;
    outline: none;
}

.filter-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

/* ---- 图片网格 ---- */
.img-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.img-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s, transform 0.2s;
}

.img-card:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.img-link {
    display: block;
    aspect-ratio: 4 / 3;
    background: #eef0f4;
    overflow: hidden;
}

.img-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.img-card.broken .img-link img {
    opacity: 0.35;
    filter: grayscale(1);
}

.img-meta {
    padding: 6px 8px;
    border-top: 1px solid #f3f4f6;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.img-name {
    font-size: 12px;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.img-sub {
    display: flex;
    align-items: center;
    gap: 6px;
}

.img-type {
    font-size: 11px;
    font-weight: 600;
    color: #667eea;
    background: #eef2ff;
    padding: 1px 6px;
    border-radius: 4px;
}

.img-src {
    font-size: 11px;
    color: #9ca3af;
    background: #f3f4f6;
    padding: 1px 6px;
    border-radius: 4px;
}

.btn-copy-mini {
    margin-left: auto;
    padding: 2px 8px;
    font-size: 11px;
}

/* ---- 源码获取指引 ---- */
.guide-box {
    border: 1px solid #c7d2fe;
    border-left: 4px solid #667eea;
    background: #eef2ff;
    border-radius: 8px;
    padding: 12px 14px;
}

.guide-title {
    font-size: 13px;
    font-weight: 600;
    color: #4338ca;
    margin-bottom: 8px;
}

.guide-steps {
    margin: 0;
    padding-left: 18px;
    font-size: 12px;
    line-height: 1.8;
    color: #374151;
}

.guide-steps li {
    margin-bottom: 2px;
}

.guide-steps b {
    color: #4338ca;
    font-weight: 600;
}

/* ---- 空态 ---- */
.img-grid .empty-state {
    grid-column: 1 / -1;
    margin: 30px 10px;
}

@media (max-width: 600px) {
    .panel-actions {
        flex-wrap: wrap;
    }
}