/*
 * Resume Cards Styling - Tailwind-Compatible
 * Beautiful card-based design for resume listings
 */

/* Grid Container for Resume Cards */
.ollama-results-grid,
#ollamaResultsGrid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

@media (max-width: 768px) {
    .ollama-results-grid,
    #ollamaResultsGrid {
        grid-template-columns: 1fr;
    }
}

/* Resume Card Base */
.resume-card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    position: relative;
}

.resume-card:hover {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(-4px);
    border-color: #3b82f6;
}

/* Card Header */
.resume-card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1.25rem;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.resume-card-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.resume-card-email {
    font-size: 0.875rem;
    opacity: 0.95;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.95);
}

.resume-card-email svg {
    flex-shrink: 0;
}

/* Score/Extraction Badge */
.resume-card-score,
.resume-card-extraction-badge {
    padding: 0.625rem 1rem;
    border-radius: 0.625rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-align: center;
    color: white;
    min-width: 90px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.resume-card-score {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.resume-card-score:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 10px -1px rgba(16, 185, 129, 0.4);
}

.resume-card-extraction-badge {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    padding: 0.5rem 0.875rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    line-height: 1.3;
}

.resume-card-extraction-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 10px -1px rgba(245, 158, 11, 0.4);
}

/* Info Section */
.resume-card-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.resume-card-info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #4b5563;
    font-weight: 500;
}

.resume-card-info-item svg {
    color: #6b7280;
    flex-shrink: 0;
}

/* Card Section */
.resume-card-section {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f3f4f6;
}

.resume-card-section:last-child {
    border-bottom: none;
}

.resume-card-section-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: #1f2937;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* Skills Tags */
.resume-card-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.skill-tag {
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-block;
}

/* Default skill tag - Light gray */
.skill-tag-default {
    background: #e5e7eb;
    color: #374151;
    border: 1px solid #d1d5db;
}

.skill-tag-default:hover {
    background: #d1d5db;
    transform: scale(1.05);
}

/* Matched skill tag - Purple/Blue gradient with animation */
.skill-tag-matched {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    color: white;
    font-weight: 600;
    border: 2px solid #7c3aed;
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.4);
    animation: pulse-purple 2s ease-in-out infinite;
}

.skill-tag-matched:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.5);
}

@keyframes pulse-purple {
    0%, 100% {
        box-shadow: 0 0 12px rgba(139, 92, 246, 0.4);
    }
    50% {
        box-shadow: 0 0 20px rgba(139, 92, 246, 0.6);
    }
}

/* Legacy matched skill support */
.skill-tag.matched,
.skill-tag[style*="background: #10b981"] {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%) !important;
    color: white !important;
    font-weight: 600 !important;
    border: 2px solid #7c3aed !important;
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.4) !important;
    animation: pulse-purple 2s ease-in-out infinite;
}

/* Location Tag - Use gray like other tags */
.location-tag {
    background: #e5e7eb;
    color: #374151;
    border: 1px solid #d1d5db;
}

.location-tag:hover {
    background: #d1d5db;
}

/* Domain Tag - Use gray like other tags */
.domain-tag {
    background: #e5e7eb;
    color: #374151;
    border: 1px solid #d1d5db;
}

.domain-tag:hover {
    background: #d1d5db;
}

/* Experience Keyword Tag - Use gray like other tags */
.experience-keyword-tag {
    background: #e5e7eb;
    color: #374151;
    border: 1px solid #d1d5db;
}

.experience-keyword-tag:hover {
    background: #d1d5db;
}

/* Companies */
.resume-card-companies {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.company-item {
    background: #f3f4f6;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: #374151;
    font-weight: 500;
    border-left: 3px solid #3b82f6;
    transition: all 0.2s ease;
}

.company-item:hover {
    background: #e5e7eb;
    transform: translateX(4px);
}

/* Action Buttons in Card */
.resume-card-actions {
    padding: 1rem 1.25rem;
    background: #ffffff;
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    border-top: 1px solid #e5e7eb;
    flex-wrap: wrap;
}

.resume-card-btn {
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1.5px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 110px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.resume-card-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.2);
}

.resume-card-btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border-color: #2563eb;
}

.resume-card-btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.resume-card-btn-secondary {
    background: white;
    color: #1f2937;
    border-color: #d1d5db;
}

.resume-card-btn-secondary:hover {
    background: #f9fafb;
    border-color: #6b7280;
    color: #111827;
}

.resume-card-btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border-color: #dc2626;
}

.resume-card-btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

/* Button Icons */
.resume-card-btn svg {
    width: 16px;
    height: 16px;
}

/* Card Footer */
.resume-card-footer {
    background: #fafafa;
}

.resume-card-date {
    padding: 0.75rem 1.25rem;
    color: #6b7280;
    font-size: 0.8125rem;
    border-bottom: 1px solid #e5e7eb;
    text-align: center;
}

/* Status Section (Simple text at bottom) */
.resume-card-status {
    padding: 0.5rem 1.25rem;
    text-align: center;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    font-size: 0.75rem;
    color: #6b7280;
}

/* Overall Impression Highlight */
.resume-card-section[style*="background: #f0f9ff"] {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 50%, #dbeafe 100%) !important;
    border-left: 4px solid #3b82f6 !important;
    animation: subtle-shine 3s ease-in-out infinite;
}

@keyframes subtle-shine {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Career Highlights */
.resume-card-section ul {
    list-style-type: none;
    padding-left: 0;
}

.resume-card-section ul li {
    position: relative;
    padding-left: 1.5rem;
    margin: 0.5rem 0;
    line-height: 1.6;
}

.resume-card-section ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: 700;
}

/* Personal Details Links */
.resume-card-section a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.resume-card-section a:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 640px) {
    .resume-card-header {
        flex-direction: column;
        gap: 1rem;
    }

    .resume-card-score,
    .resume-card-extraction-badge {
        align-self: flex-start;
    }

    .resume-card-info {
        grid-template-columns: 1fr;
    }

    .resume-card-actions {
        flex-direction: column;
    }

    .resume-card-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Loading State for Cards */
.resume-card.loading {
    opacity: 0.6;
    pointer-events: none;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 0.8;
    }
}

/* Empty State */
.empty-state-card {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 0.75rem;
    border: 2px dashed #d1d5db;
}

.empty-state-card svg {
    margin: 0 auto 1rem;
    color: #9ca3af;
}

.empty-state-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.empty-state-card p {
    color: #6b7280;
    font-size: 0.875rem;
}
