/* AutoNarky.com Custom Styles */

/* Utility Classes */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Custom Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Custom Components */
.report-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.report-table th,
.report-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.report-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.report-table tr:last-child td {
    border-bottom: none;
}

/* Tool Cards */
.tool-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.tool-card:hover::before {
    left: 100%;
}

.tool-card:hover {
    transform: translateY(-8px);
}

/* Rating Stars */
.rating-stars {
    display: inline-flex;
    align-items: center;
}

.rating-star {
    color: #fbbf24;
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.rating-star.empty {
    color: #d1d5db;
}

/* Search Suggestions */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 100;
    max-height: 300px;
    overflow-y: auto;
}

.search-suggestion {
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f3f4f6;
}

.search-suggestion:hover,
.search-suggestion.active {
    background-color: #f9fafb;
}

.search-suggestion:last-child {
    border-bottom: none;
}

/* Loading States */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Feature Highlights */
.feature-highlight {
    position: relative;
    background: linear-gradient(135deg, #0ea5e9, #3b82f6);
    border-radius: 16px;
    padding: 24px;
    color: white;
    overflow: hidden;
}

.feature-highlight::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Comparison Table */
.comparison-table {
    overflow-x: auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
    padding: 16px;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}

.comparison-table th {
    background: #f9fafb;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.comparison-table .tool-name {
    font-weight: 600;
    color: #1f2937;
    background: #f9fafb;
    position: sticky;
    left: 0;
    z-index: 5;
}

.comparison-check {
    color: #10b981;
    font-size: 20px;
}

.comparison-cross {
    color: #ef4444;
    font-size: 20px;
}

/* Newsletter Form */
.newsletter-form {
    position: relative;
}

.newsletter-loading {
    position: absolute;
    top: 50%;
    right: 60px;
    transform: translateY(-50%);
    display: none;
}

.newsletter-form.loading .newsletter-loading {
    display: block;
}

.newsletter-form.loading button {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Success Messages */
.success-message {
    background: #ecfdf5;
    border: 1px solid #10b981;
    color: #065f46;
    padding: 12px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
}

.error-message {
    background: #fef2f2;
    border: 1px solid #ef4444;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .comparison-table {
        font-size: 14px;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 8px;
    }
    
    .tool-card {
        margin-bottom: 16px;
    }
    
    .search-suggestions {
        font-size: 14px;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .tool-card,
    .comparison-table {
        break-inside: avoid;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .tool-card {
        border: 2px solid #000;
    }
    
    .search-suggestion:hover {
        background-color: #000;
        color: #fff;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .tool-card,
    .animate-fade-in-up,
    .loading-skeleton,
    .feature-highlight::before {
        animation: none;
        transition: none;
    }
    
    .tool-card:hover {
        transform: none;
    }
}