/* 
 * VetRecap - Professional Medical/Hospital Theme
 * Clean, clinical design with medical blues and professional typography
 */

:root {
    /* Primary Colors - Medical Blue */
    --primary: #0066CC;
    --primary-dark: #004C99;
    --primary-light: #3399FF;
    --primary-bg: #F0F7FF;
    
    /* Secondary - Clinical Teal */
    --secondary: #00838F;
    --secondary-light: #4FB3BF;
    
    /* Neutral Colors - Clean & Clinical */
    --bg: #F5F7FA;
    --card-bg: #FFFFFF;
    --text: #1A2B3C;
    --text-light: #4A5B6C;
    --text-muted: #7A8B9C;
    --border: #E0E6ED;
    --border-light: #F0F3F6;
    
    /* Status Colors */
    --success: #00A854;
    --warning: #F5A623;
    --error: #D93025;
    
    /* Shadows - Subtle & Professional */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
    
    /* Transitions */
    --transition: all 0.2s ease;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* App Container */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header - Professional Medical Style */
.header {
    background: linear-gradient(135deg, #0066CC 0%, #004080 100%);
    padding: 1rem 2rem;
    color: white;
    box-shadow: var(--shadow-md);
    border-bottom: 3px solid var(--secondary);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Header logo is a link; keep it visually identical to the non-link version */
.logo {
    color: inherit;
    text-decoration: none;
}

.logo:hover {
    text-decoration: none;
}

.logo:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.85);
    outline-offset: 4px;
    border-radius: 8px;
}

.logo-icon {
    width: 42px;
    height: 42px;
}

.logo-icon svg {
    width: 100%;
    height: 100%;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-ai {
    color: #7DD3FC;
    font-weight: 600;
}

.tagline {
    font-size: 0.875rem;
    opacity: 0.9;
    font-weight: 400;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2.5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Footer - Professional */
.footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    padding: 1.5rem 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.footer strong {
    color: var(--text-light);
}

.footer > p:first-child a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.footer > p:first-child a:hover {
    text-decoration: underline;
}

.footer-disclaimer {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
    color: var(--text-muted);
}

.footer-links {
    margin-top: 0.75rem;
    font-size: 0.75rem;
}

.footer-links a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-note {
    margin-top: 0.25rem;
    font-size: 0.75rem;
}

.footer-version {
    margin-top: 0.75rem;
    font-size: 0.65rem;
    color: var(--text-muted);
    opacity: 0.7;
}

/* Buttons - Clean Medical Style */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 102, 204, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background: #006874;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-bg);
}

.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Cards - Clean Clinical Look */
.upload-card,
.processing-card,
.results-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}

.card-header {
    text-align: center;
    margin-bottom: 2rem;
}

.card-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.card-header p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Upload Page */
.upload-container {
    max-width: 800px;
    margin: 0 auto;
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem 0;
}

.hero-section h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-section .highlight {
    color: var(--primary);
}

.hero-section p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Hero Illustration */
.hero-illustration {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

.hero-illustration img {
    width: 100%;
    max-width: 680px;
    height: auto;
}

/* Dropzone - Professional Upload Area */
.dropzone {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg);
    position: relative;
}

.dropzone:hover {
    border-color: var(--primary);
    background: var(--primary-bg);
}

.dropzone.dragover {
    border-color: var(--primary);
    background: var(--primary-bg);
    border-style: solid;
}

.dropzone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.dropzone-active {
    display: none;
}

.dropzone.dragover .dropzone-content {
    display: none;
}

.dropzone.dragover .dropzone-active {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.dropzone-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.dropzone-icon svg {
    width: 100%;
    height: 100%;
}

.dropzone h3 {
    color: var(--text);
    font-weight: 600;
    font-size: 1.1rem;
}

.dropzone p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* File Info */
.file-info {
    margin-top: 1.5rem;
}

.file-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--primary-bg);
    border-radius: 8px;
    border: 1px solid rgba(0, 102, 204, 0.2);
}

.file-icon {
    width: 40px;
    height: 40px;
    color: var(--primary);
}

.file-icon svg {
    width: 100%;
    height: 100%;
}

.file-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.file-name {
    font-weight: 600;
    color: var(--text);
    word-break: break-all;
}

.file-size {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.file-remove {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-remove:hover {
    background: rgba(217, 48, 37, 0.1);
    color: var(--error);
}

/* Upload Info - Specs */
.upload-info {
    margin: 1.5rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    background: var(--bg);
    border-radius: 6px;
    border: 1px solid var(--border);
}

.info-item svg {
    width: 18px;
    height: 18px;
    color: var(--secondary);
}

/* Upload Button */
.btn-upload {
    width: 100%;
    margin-top: 1rem;
    padding: 1rem;
    font-size: 1rem;
}

/* Model Selection */
.model-selection {
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    background: var(--bg);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.model-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}

.model-label svg {
    color: var(--primary);
}

.model-select {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--card-bg);
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234A5B6C' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
}

.model-select:hover {
    border-color: var(--primary);
}

.model-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.15);
}

/* Analyze Options */
.analyze-options {
    margin-top: 1.25rem;
}

.analyze-options-title {
    text-align: center;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.75rem;
}

.analyze-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.btn-analyze {
    width: 100%;
    padding: 1rem;
    font-size: 0.95rem;
}

.analyze-options-note {
    margin-top: 0.75rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Upload Error */
.upload-error {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(217, 48, 37, 0.08);
    border-radius: 8px;
    color: var(--error);
    border: 1px solid rgba(217, 48, 37, 0.2);
}

.upload-error svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Alerts */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.alert-warning {
    background: rgba(245, 166, 35, 0.1);
    border: 1px solid rgba(245, 166, 35, 0.3);
}

.alert-warning strong {
    color: #B8860B;
}

.alert-error {
    background: rgba(217, 48, 37, 0.08);
    border: 1px solid rgba(217, 48, 37, 0.2);
}

.alert-error strong {
    color: var(--error);
}

.alert-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.alert-icon svg {
    width: 100%;
    height: 100%;
}

.alert p {
    margin-top: 0.25rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Features - Professional Grid */
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.feature {
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.feature:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.feature-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1.25rem;
    color: var(--primary);
    background: var(--primary-bg);
    border-radius: 12px;
    padding: 12px;
}

.feature-icon svg {
    width: 100%;
    height: 100%;
}

.feature h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.feature p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Trust Badges */
.trust-section {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.trust-badge svg {
    width: 18px;
    height: 18px;
    color: var(--secondary);
}

/* ══════════════════════════════════════════════════════════════════════
   How It Works Section (Homepage SEO Content)
   ══════════════════════════════════════════════════════════════════════ */

.how-it-works-section {
    margin-top: 3rem;
    text-align: center;
}

.how-it-works-section h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.75rem;
}

.how-it-works-intro {
    color: var(--text-light);
    font-size: 1rem;
    max-width: 650px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.how-it-works-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    text-align: center;
}

.how-step {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.how-step:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.how-step-number {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
}

.how-step h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.how-step p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ══════════════════════════════════════════════════════════════════════
   FAQ Section (Homepage SEO Content)
   ══════════════════════════════════════════════════════════════════════ */

.faq-section {
    margin-top: 2.5rem;
}

.faq-section h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary-dark);
    text-align: center;
    margin-bottom: 1.5rem;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-item {
    background: var(--card-bg);
    border-radius: 10px;
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover {
    border-color: var(--primary);
}

.faq-item[open] {
    border-color: rgba(0, 102, 204, 0.25);
    box-shadow: var(--shadow-sm);
}

.faq-question {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    list-style: none;
    user-select: none;
    transition: var(--transition);
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question::marker {
    display: none;
    content: '';
}

.faq-question::after {
    content: '';
    margin-left: auto;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%234A5B6C' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.3s ease;
}

.faq-item[open] .faq-question::after {
    transform: rotate(180deg);
}

.faq-question:hover {
    color: var(--primary);
}

.faq-answer {
    padding: 0 1.5rem 1.25rem;
    animation: fadeSlideIn 0.3s ease;
}

.faq-answer p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.7;
    margin: 0;
}

/* Data Handling Expando Section */
.data-handling-section {
    margin-top: 2rem;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: var(--transition);
}

.data-handling-section:hover {
    border-color: var(--primary);
}

.data-handling-section[open] {
    border-color: rgba(0, 102, 204, 0.25);
    box-shadow: var(--shadow-sm);
}

.data-handling-toggle {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    font-size: 0.875rem;
    font-weight: 500;
    list-style: none;
    user-select: none;
    transition: var(--transition);
}

.data-handling-toggle::-webkit-details-marker {
    display: none;
}

.data-handling-toggle::marker {
    display: none;
    content: '';
}

.data-handling-toggle:hover {
    color: var(--primary);
}

.data-handling-toggle svg:first-child {
    color: var(--secondary);
    flex-shrink: 0;
}

.data-handling-toggle span {
    flex: 1;
}

.data-handling-chevron {
    flex-shrink: 0;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.data-handling-section[open] .data-handling-chevron {
    transform: rotate(180deg);
}

.data-handling-content {
    padding: 0 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    animation: fadeSlideIn 0.3s ease;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.data-handling-item {
    padding: 1.25rem;
    background: var(--bg);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.data-handling-item h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.925rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.625rem;
}

.data-handling-item h4 svg {
    color: var(--primary);
    flex-shrink: 0;
}

.data-handling-item p {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.65;
    margin: 0;
}

/* Processing Page */
.processing-container {
    max-width: 600px;
    margin: 0 auto;
}

.timer-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
}

.timer-ring {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-bg {
    fill: none;
    stroke: var(--border);
    stroke-width: 8;
}

.progress-ring-circle {
    fill: none;
    stroke: var(--primary);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.3s ease;
}

.timer-content {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timer-value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.timer-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.timer-note {
    margin-top: 1rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Progress Section */
.progress-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.progress-bar-container {
    flex: 1;
    height: 10px;
    background: var(--border);
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 5px;
    transition: width 0.3s ease;
}

.progress-text {
    font-weight: 600;
    color: var(--primary);
    min-width: 45px;
}

/* Steps */
.steps-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.step {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg);
    border-radius: 8px;
    transition: var(--transition);
    border: 1px solid transparent;
}

.step.active {
    background: var(--primary-bg);
    border-color: rgba(0, 102, 204, 0.2);
}

.step.complete {
    background: rgba(0, 168, 84, 0.08);
    border-color: rgba(0, 168, 84, 0.2);
}

.step-icon {
    width: 24px;
    height: 24px;
}

.step-icon svg {
    width: 100%;
    height: 100%;
}

.step-pending .step-icon {
    color: var(--text-muted);
}

.step-active .step-icon {
    color: var(--primary);
    animation: spin 1s linear infinite;
}

.step-complete .step-icon {
    color: var(--success);
}

.step-content {
    display: flex;
    flex-direction: column;
}

.step-title {
    font-weight: 600;
    color: var(--text);
}

.step-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.step.active .step-title {
    color: var(--primary-dark);
}

.step.complete .step-title {
    color: var(--success);
}

/* Status Message */
.status-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--primary-bg);
    border-radius: 8px;
    color: var(--primary-dark);
    font-weight: 500;
}

/* Error Section */
.error-section {
    text-align: center;
}

.error-section .btn {
    margin-top: 1rem;
}

/* Results Page */
.results-container {
    max-width: 900px;
    margin: 0 auto;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.results-title h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.results-title .file-name {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.results-meta {
    display: flex;
    gap: 1rem;
}

.meta-item {
    background: var(--primary-bg);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    color: var(--primary-dark);
    font-size: 0.85rem;
    font-weight: 500;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--bg);
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
}

.tab:hover {
    color: var(--text);
}

.tab.active {
    background: var(--card-bg);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.tab-icon {
    width: 18px;
    height: 18px;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.summary-actions {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.summary-actions .btn {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
}

/* Markdown Content */
.summary-content {
    background: var(--bg);
    border-radius: 8px;
    padding: 2rem;
    max-height: 600px;
    overflow-y: auto;
}

.markdown-body {
    font-size: 0.95rem;
    line-height: 1.7;
}

.markdown-body h1 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
    color: var(--primary-dark);
}

.markdown-body h2 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--primary);
}

.markdown-body h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.markdown-body p {
    margin-bottom: 1rem;
}

.markdown-body ul, .markdown-body ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.markdown-body li {
    margin-bottom: 0.5rem;
}

.markdown-body strong {
    font-weight: 600;
    color: var(--text);
}

.markdown-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.markdown-body th,
.markdown-body td {
    padding: 0.75rem;
    border: 1px solid var(--border);
    text-align: left;
}

.markdown-body th {
    background: var(--primary-bg);
    font-weight: 600;
}

.markdown-body code {
    background: var(--border-light);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-size: 0.9em;
}

.markdown-body pre {
    background: var(--text);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
}

.markdown-body pre code {
    background: transparent;
    padding: 0;
}

/* Results Footer */
.results-footer {
    margin-top: 2rem;
    text-align: center;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text);
    color: white;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-icon {
    color: var(--success);
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .main-content {
        padding: 1.5rem 1rem;
    }
    
    .upload-card,
    .processing-card,
    .results-card {
        padding: 1.5rem;
    }
    
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    .upload-info {
        flex-direction: column;
        align-items: stretch;
    }

    .analyze-buttons {
        grid-template-columns: 1fr;
    }
    
    .trust-section {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .how-it-works-steps {
        grid-template-columns: 1fr;
    }

    .faq-question {
        font-size: 0.9rem;
        padding: 0.875rem 1.25rem;
    }
    
    .results-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .summary-actions {
        flex-direction: column;
    }
    
    .summary-content {
        padding: 1rem;
    }
}

/* Scrollbar */
.summary-content::-webkit-scrollbar {
    width: 6px;
}

.summary-content::-webkit-scrollbar-track {
    background: var(--border-light);
    border-radius: 3px;
}

.summary-content::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.summary-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Icon helpers for step states */
.step .step-pending,
.step .step-active,
.step .step-complete {
    display: none;
}

.step:not(.active):not(.complete) .step-pending {
    display: block;
}

.step.active .step-active {
    display: block;
}

.step.complete .step-complete {
    display: block;
}

/* ══════════════════════════════════════════════════════════════════════
   Queue Page Styles
   ══════════════════════════════════════════════════════════════════════ */

.queue-container {
    max-width: 600px;
    margin: 0 auto;
}

.queue-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}

/* Animated spinner ring */
.queue-visual {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0 2rem;
}

.queue-icon-ring {
    position: relative;
    width: 160px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.queue-spinner {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.queue-spinner-track {
    fill: none;
    stroke: var(--border);
    stroke-width: 6;
}

.queue-spinner-fill {
    fill: none;
    stroke: var(--primary);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 264;
    stroke-dashoffset: 66;
    animation: queue-spin 2.5s linear infinite;
}

@keyframes queue-spin {
    0%   { stroke-dashoffset: 264; transform: rotate(0deg);   }
    50%  { stroke-dashoffset: 66;  }
    100% { stroke-dashoffset: 264; transform: rotate(360deg); }
}

.queue-position-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
}

.queue-position-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.queue-position-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Status row */
.queue-status {
    text-align: center;
    margin-bottom: 1.5rem;
}

.queue-status-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.05rem;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.queue-status-icon {
    font-size: 1.25rem;
}

.queue-estimate {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Warning box */
.queue-warning {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: rgba(245, 166, 35, 0.1);
    border: 1px solid rgba(245, 166, 35, 0.3);
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.queue-warning-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.queue-warning-text {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* CTA / email link */
.queue-cta {
    text-align: center;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.queue-cta > p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.queue-email-btn {
    font-size: 0.85rem;
    padding: 0.625rem 1.25rem;
}

/* ══════════════════════════════════════════════════════════════════════
   Daily Limit Error (shown on index page)
   ══════════════════════════════════════════════════════════════════════ */

.upload-error.daily-limit {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    background: rgba(217, 48, 37, 0.06);
    border: 2px solid rgba(217, 48, 37, 0.25);
    padding: 1.25rem 1.5rem;
}

.upload-error.daily-limit .error-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--error);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.upload-error.daily-limit .error-message {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
}

.upload-error.daily-limit .error-email {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
}

.upload-error.daily-limit .error-email:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .queue-card {
        padding: 1.5rem;
    }

    .queue-icon-ring {
        width: 130px;
        height: 130px;
    }

    .queue-position-number {
        font-size: 2.5rem;
    }
}
