/* Custom styles for SEO tail */

/* Reset and base styles */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

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

/* Custom scrollbar for history */
.history-scrollbar::-webkit-scrollbar {
    width: 8px;
}

.history-scrollbar::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.history-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.history-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Focus states - clean blue ring */
input:focus,
textarea:focus,
select:focus,
button:focus {
    outline: none;
}

/* Smooth transitions */
button,
a,
.transition-colors {
    transition: all 0.2s ease-in-out;
}

/* Typography enhancements */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.025em;
}

p {
    line-height: 1.6;
}

/* Form input states */
input[type="password"]:focus,
input[type="text"]:focus,
textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Button states */
button:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

button:not(:disabled):active {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.6;
}

/* Card hover effects - subtle */
.hover\:border-blue-300:hover {
    box-shadow: 0 1px 3px 0 rgba(59, 130, 246, 0.1);
}

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

[x-show] {
    animation: fadeIn 0.3s ease-out;
}

/* Loading spinner effect */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Progress bar shimmer animation */
@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.animate-shimmer {
    animation: shimmer 2s infinite;
}

/* RTL support for Arabic */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .flex {
    flex-direction: row-reverse;
}

/* Ensure consistent spacing */
.space-y-3 > * + * {
    margin-top: 0.75rem;
}

.space-y-6 > * + * {
    margin-top: 1.5rem;
}

/* Clean borders - no harsh lines */
.border-slate-200 {
    border-color: #e2e8f0;
}

.border-slate-300 {
    border-color: #cbd5e1;
}

/* Background colors - soft and clean */
.bg-blue-50 {
    background-color: #eff6ff;
}

.bg-blue-100 {
    background-color: #dbeafe;
}

.bg-slate-50 {
    background-color: #f8fafc;
}

/* Text colors - readable and accessible */
.text-slate-600 {
    color: #475569;
}

.text-slate-700 {
    color: #334155;
}

.text-slate-900 {
    color: #0f172a;
}

/* Subtle shadows */
.shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .fixed.top-4.right-4 {
        top: 1rem;
        right: 1rem;
    }
}

/* Print styles */
@media print {
    .fixed,
    button {
        display: none;
    }
}

/* Markdown/Prose styling for AI Response */
.prose {
    color: #0f172a;
}

.prose a {
    color: #3b82f6;
    text-decoration: underline;
    text-decoration-color: #93c5fd;
    text-underline-offset: 2px;
    transition: color 0.2s;
}

.prose a:hover {
    color: #2563eb;
    text-decoration-color: #3b82f6;
}

.prose strong {
    color: #0f172a;
    font-weight: 600;
}

.prose em {
    font-style: italic;
}

.prose p {
    margin-bottom: 1em;
}

.prose p:last-child {
    margin-bottom: 0;
}

.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
    color: #0f172a;
    font-weight: 600;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    line-height: 1.3;
}

.prose h1 { font-size: 1.5em; }
.prose h2 { font-size: 1.3em; }
.prose h3 { font-size: 1.15em; }

.prose ul, .prose ol {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    padding-left: 1.5em;
}

.prose ul {
    list-style-type: disc;
}

.prose ol {
    list-style-type: decimal;
}

.prose li {
    margin-bottom: 0.25em;
}

.prose code {
    background-color: rgba(15, 23, 42, 0.05);
    padding: 0.125em 0.375em;
    border-radius: 0.25em;
    font-size: 0.9em;
    font-family: 'Courier New', Courier, monospace;
}

.prose pre {
    background-color: rgba(15, 23, 42, 0.05);
    padding: 1em;
    border-radius: 0.5em;
    overflow-x: auto;
    margin: 1em 0;
}

.prose pre code {
    background-color: transparent;
    padding: 0;
}

.prose blockquote {
    border-left: 3px solid #cbd5e1;
    padding-left: 1em;
    margin-left: 0;
    font-style: italic;
    color: #475569;
}

.prose hr {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 1.5em 0;
}
