/**
 * 场景模板管理样式
 */

/* 模板卡片容器 */
.template-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    padding: 1rem;
}

/* 模板卡片样式 */
.template-card {
    background: linear-gradient(to bottom right, #ffffff, #f7f9ff);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05), 
                0 1px 2px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid rgba(230, 230, 230, 0.7);
}

.template-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08), 
                0 3px 6px rgba(0, 0, 0, 0.04);
    border-color: rgba(var(--primary-color-rgb), 0.15);
}

.template-card-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.template-card-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-color);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 190px;
}

.template-card-body {
    padding: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    height: 100px;
    overflow-y: auto;
}

.template-card-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    background-color: rgba(0, 0, 0, 0.01);
}

/* 模板卡片操作按钮 */
.template-card-actions {
    display: flex;
    gap: 0.5rem;
}

.template-btn {
    border: none;
    background: none;
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.template-btn:hover {
    background-color: rgba(var(--primary-color-rgb), 0.1);
    color: var(--primary-color);
    transform: scale(1.1);
}

.template-btn-apply {
    color: var(--primary-color);
}

.template-btn-delete {
    color: var(--danger-color);
}

.template-btn-delete:hover {
    background-color: rgba(255, 59, 48, 0.1);
    color: var(--danger-color);
}

/* 时间戳样式 */
.template-timestamp {
    font-size: 0.75rem;
    color: #999;
}

/* 模板表单样式 */
#save-template-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 1.5rem;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

/* 无模板提示 */
#no-templates-message {
    padding: 3rem 1rem;
    color: #999;
}

#no-templates-message i {
    font-size: 2.5rem;
    opacity: 0.4;
    margin-bottom: 1rem;
}

/* 模态框样式增强 */
.modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background: linear-gradient(120deg, rgba(0, 98, 204, 0.03), rgba(77, 148, 255, 0.08));
    padding: 1.2rem 1.5rem;
}

.modal-title {
    font-weight: 600;
    display: flex;
    align-items: center;
}

.modal-title i {
    color: var(--primary-color);
}

.modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem 1.5rem;
}

/* 模板创建成功提示 */
.template-success-message {
    background-color: rgba(52, 199, 89, 0.1);
    color: var(--success-color);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.template-success-message i {
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

/* 加载动画 */
.templates-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.templates-loading .spinner-border {
    width: 2.5rem;
    height: 2.5rem;
    color: var(--primary-color);
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.template-card {
    animation: fadeIn 0.4s ease-out forwards;
}

.template-card:nth-child(2) { animation-delay: 0.05s; }
.template-card:nth-child(3) { animation-delay: 0.1s; }
.template-card:nth-child(4) { animation-delay: 0.15s; }
.template-card:nth-child(5) { animation-delay: 0.2s; }
