/* ChoiceEngine Decision Templates Styles */

.template-selection-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.template-selection-section h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #2d3748;
    font-size: 1.25rem;
}

.template-selection-section .helper-text {
    color: #718096;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.templates-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.templates-loading {
    padding: 1rem;
    text-align: center;
    color: #718096;
    font-style: italic;
}

.template-error {
    padding: 1rem;
    text-align: center;
    color: #e53e3e;
    font-style: italic;
}

.template-category {
    margin-bottom: 1rem;
}

.template-category h4 {
    margin: 0 0 0.75rem 0;
    color: #4a5568;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.template-category h4 i {
    color: #4a6cf7;
}

.template-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

.template-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.template-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border-color: #cbd5e0;
}

.template-card.selected {
    border-color: #4a6cf7;
    background-color: #ebf4ff;
    position: relative;
}

.template-card.selected::after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    color: #4a6cf7;
    font-size: 0.875rem;
}

.template-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: #ebf4ff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4a6cf7;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.template-info {
    flex: 1;
}

.template-info h5 {
    margin: 0 0 0.25rem 0;
    color: #2d3748;
    font-size: 0.9375rem;
}

.template-info p {
    margin: 0;
    color: #718096;
    font-size: 0.8125rem;
    line-height: 1.4;
}

.template-note {
    text-align: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
    color: #718096;
    font-size: 0.85rem;
    font-style: italic;
}

/* Animation for template cards */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

/* Responsive styles */
@media (max-width: 768px) {
    .template-cards {
        grid-template-columns: 1fr;
    }
}
