/* Claude AI Cards CSS - Template Cards, Model Cards, History Cards */

/* Grid Layouts */
.templates-grid,
.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-4);
}

.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-4);
}

/* Base Card Styles */
.template-card,
.model-card,
.history-item {
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 140px;
    overflow: hidden;
}

.template-card::before,
.model-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(238, 119, 35, 0.05), transparent);
    transition: left var(--transition-slow);
}

.template-card:hover::before,
.model-card:hover::before {
    left: 100%;
}

.template-card:hover,
.model-card:hover,
.history-item:hover {
    border-color: var(--orange-300);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.template-card.selected,
.model-card.selected {
    border-color: var(--orange-400);
    background: var(--orange-50);
    box-shadow: var(--shadow-lg);
}

/* Card Headers */
.template-card-header,
.model-card-header {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.template-card-icon,
.model-card-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border-radius: var(--radius-lg);
    flex-shrink: 0;
    color: var(--gray-600);
    border: 1px solid var(--gray-200);
}

.template-card.selected .template-card-icon,
.model-card.selected .model-card-icon {
    background: var(--orange-500);
    color: white;
    border-color: var(--orange-500);
}

.template-card-info,
.model-card-info {
    flex: 1;
    min-width: 0;
}

.template-card-title,
.model-card-title {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--gray-900);
    margin-bottom: var(--space-1);
    line-height: var(--leading-tight);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.template-card-meta,
.model-card-meta {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
    margin-top: var(--space-2);
}

/* Badges */
.template-badge,
.provider-badge {
    background: var(--blue-50);
    color: var(--blue-700);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    border: 1px solid var(--blue-200);
}

.speed-badge {
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    display: flex;
    align-items: center;
    gap: var(--space-1);
    border: 1px solid;
}

.speed-badge.fast {
    background: var(--success-50);
    color: var(--success-700);
    border-color: var(--success-200);
}

.speed-badge.medium {
    background: var(--warning-50);
    color: var(--warning-700);
    border-color: var(--warning-200);
}

.speed-badge.slow {
    background: var(--error-50);
    color: var(--error-700);
    border-color: var(--error-200);
}

/* Card Content */
.template-card-description,
.model-card-description {
    color: var(--gray-700);
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-4);
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Card Footers */
.template-card-footer,
.model-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: var(--space-4);
    border-top: 1px solid var(--gray-100);
}

.template-stats,
.model-features {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    font-size: var(--text-xs);
    color: var(--gray-500);
}

.template-stats span,
.model-features span {
    background: var(--gray-100);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    font-weight: var(--font-medium);
}

/* History Cards */
.history-item {
    border: 1px solid var(--gray-200);
    padding: var(--space-5);
    min-height: auto;
}

.history-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-4);
    font-size: var(--text-xs);
    color: var(--gray-600);
    flex-wrap: wrap;
    gap: var(--space-2);
}

.history-meta-left {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
    align-items: center;
}

.history-model {
    background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
    color: white;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-lg);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    white-space: nowrap;
}

.category-badge {
    background: linear-gradient(135deg, var(--orange-500), var(--orange-600));
    color: white;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-lg);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    white-space: nowrap;
}

.template-name {
    background: var(--gray-600);
    color: white;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-lg);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    white-space: nowrap;
}

.history-date {
    font-style: italic;
    font-size: var(--text-xs);
    color: var(--gray-500);
    margin-left: auto;
}

.history-preview {
    color: var(--gray-800);
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-4);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.history-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--gray-100);
}

.history-stats {
    display: flex;
    gap: var(--space-3);
    font-size: var(--text-xs);
    color: var(--gray-600);
    align-items: center;
    flex-wrap: wrap;
}

.stat-badge {
    background: var(--gray-100);
    color: var(--gray-700);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-md);
    font-weight: var(--font-medium);
    display: flex;
    align-items: center;
    gap: var(--space-1);
    border: 1px solid var(--gray-200);
}

/* Empty State */
.history-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--space-16) var(--space-8);
    color: var(--gray-500);
}

.empty-icon {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-6);
    opacity: 0.6;
}

.history-empty h3 {
    color: var(--gray-700);
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    margin-bottom: var(--space-3);
}

.history-empty p {
    color: var(--gray-600);
    font-size: var(--text-base);
    max-width: 400px;