/* VDP Content Processor - Mobile-First Styles */

/* Reset & Base Styles */
* {
    box-sizing: border-box;
}

/* VDP Quality Guide Styles */
.vdp-quality-guide {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.guide-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    gap: 8px;
}

.guide-icon {
    font-size: 1.5rem;
}

.guide-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: #1e293b;
}

.field-priorities {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

.priority-group {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.priority-group--required {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 1px solid #fca5a5;
    color: #dc2626;
}

.priority-group--recommended {
    background: linear-gradient(135deg, #f0f9ff 0%, #dbeafe 100%);
    border: 1px solid #93c5fd;
    color: #2563eb;
}

.priority-group--optional {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border: 1px solid #d1d5db;
    color: #6b7280;
}

.priority-label {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.priority-fields {
    font-weight: 400;
}

.quality-tip {
    font-size: 0.875rem;
    color: #475569;
    font-style: italic;
    background: rgba(255, 255, 255, 0.5);
    padding: 10px;
    border-radius: 6px;
    border-left: 4px solid #60a5fa;
}

/* Field Priority Indicators */
.form-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 500;
    margin-bottom: 8px;
    color: #374151;
}

/* Dynamic Comment Input Styles */
.comments-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.comment-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-input-row .form-input {
    flex: 1;
}

.add-comment-btn,
.remove-comment-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    background: #ffffff;
    color: #6b7280;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.add-comment-btn:hover {
    border-color: #10b981;
    color: #10b981;
    background: #f0fdf4;
}

.remove-comment-btn:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: #fef2f2;
}

.add-comment-btn:active,
.remove-comment-btn:active {
    transform: scale(0.95);
}

.field-priority {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 8px;
}

.field-priority--required {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fca5a5;
}

.field-priority--recommended {
    background: #f0f9ff;
    color: #2563eb;
    border: 1px solid #93c5fd;
}

.field-priority--optional {
    background: #f9fafb;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.form-label--required {
    border-left: 4px solid #dc2626;
    padding-left: 12px;
    background: linear-gradient(90deg, #fef2f2 0%, transparent 100%);
}

.form-label--recommended {
    border-left: 4px solid #2563eb;
    padding-left: 12px;
    background: linear-gradient(90deg, #f0f9ff 0%, transparent 100%);
}

.form-label--optional {
    border-left: 4px solid #6b7280;
    padding-left: 12px;
    background: linear-gradient(90deg, #f9fafb 0%, transparent 100%);
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Mobile-first refinements */
@media (max-width: 480px) {
  .container { padding: 12px; }
  .platform-options { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .platform-option { padding: 12px 14px; border-radius: 12px; }
  .metadata-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .form-input, .form-select, .form-textarea, input, select, textarea { font-size: 16px; }
  .submit-btn { width: 100%; height: 48px; font-size: 16px; border-radius: 10px; }
  .form-actions.mobile-sticky { 
    position: sticky; bottom: 0; left: 0; right: 0; z-index: 10;
    padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, #fff 40%);
    border-top: 1px solid #e5e7eb;
  }
  .header__tools { display: none; }
}

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 20px 0;
    text-align: center;
}

/* Metrics Display - Fixed Top Position */
.metrics-display {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 20px;
    z-index: 100;
}

.metrics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.metrics-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.hook-gate-status {
    display: flex;
    align-items: center;
}

.gate-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid;
}

.gate-badge--pending {
    background: #fef3c7;
    color: #92400e;
    border-color: #f59e0b;
}

.gate-badge--pass {
    background: #d1fae5;
    color: #065f46;
    border-color: #10b981;
}

.gate-badge--fail {
    background: #fee2e2;
    color: #991b1b;
    border-color: #ef4444;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.metric-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 8px;
    border: 2px solid;
    transition: all 0.2s ease;
}

.metric-sufficient {
    background: #d1fae5;
    border-color: #10b981;
    color: #065f46;
}

.metric-close {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
}

.metric-insufficient {
    background: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
}

.metric-icon {
    font-size: 1.5rem;
    opacity: 0.8;
}

.metric-content {
    flex: 1;
}

.metric-value {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
}

.metric-label {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
}

.metric-status {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.metrics-actions {
    text-align: center;
}

.retry-density-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.retry-density-btn:hover {
    background: #2563eb;
}

.retry-density-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* Download/Validation Toggle */
.download-validation-toggle {
    margin-bottom: 16px;
}

.toggle-tabs {
    display: flex;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 12px;
}

.toggle-tab {
    flex: 1;
    padding: 8px 16px;
    background: #f9fafb;
    color: #6b7280;
    border: none;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toggle-tab--active {
    background: #3b82f6;
    color: white;
}

.tab-content {
    display: none;
}

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

.validation-btn {
    width: 100%;
    padding: 12px 20px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.validation-btn:hover {
    background: #059669;
}

.validation-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.validation-results {
    margin-top: 12px;
    padding: 12px;
    border-radius: 6px;
    font-size: 0.875rem;
}

.validation-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.validation-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.validation-error ul {
    margin: 8px 0 0 16px;
    padding: 0;
}

.validation-error li {
    margin: 4px 0;
}

/* Metadata Form Styling */
.metadata-form-section {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin: 16px 0;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-help {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 4px;
    line-height: 1.4;
}

/* Best Comments Styling */
.best-comments-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comment-input-group {
    position: relative;
}

.comment-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #fafbfc;
}

.comment-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: white;
}

.comment-input:not(:placeholder-shown) {
    background: white;
    border-color: #10b981;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .metadata-form-section {
        padding: 16px;
        margin: 12px 0;
    }

    .best-comments-container {
        gap: 8px;
    }
}

.header__title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 8px;
    color: #1f2937;
}

.header__subtitle {
    font-size: 1rem;
    color: #6b7280;
    margin: 0;
    font-weight: 400;
}

/* Main Content */
.main {
    padding: 40px 0 80px;
    flex: 1;
}

/* VDP Form */
.vdp-form {
    background: white;
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    margin-bottom: 32px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Platform Selector */
.platform-selector {
    border: none;
    margin: 0 0 32px;
    padding: 0;
}

.platform-selector__legend {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 16px;
    padding: 0;
}

.platform-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.platform-option {
    display: flex;
    align-items: center;
    padding: 20px;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    min-height: 44px; /* Touch target */
}

.platform-option:hover {
    border-color: #3b82f6;
    background: #f8fafc;
    transform: translateY(-1px);
}

.platform-option:focus-within {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

input[type="radio"]:checked + .platform-option {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.platform-option__icon {
    font-size: 1.5rem;
    margin-right: 12px;
    flex-shrink: 0;
}

.platform-option__name {
    font-weight: 600;
    font-size: 1.125rem;
    flex: 1;
}

.platform-option__desc {
    font-size: 0.875rem;
    opacity: 0.8;
    margin-left: auto;
}

/* Hide radio inputs */
input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Form Styles */
.platform-form {
    display: none;
}

.platform-form--active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #111827;
    margin-bottom: 8px;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.form-label__required {
    color: #dc2626;
    margin-left: 4px;
}

.form-input, .form-select {
    width: 100%;
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
    min-height: 44px; /* Touch target */
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input--url {
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.875rem;
}

.form-help {
    font-size: 0.8125rem;
    color: #6b7280;
    margin-top: 8px;
}

/* File Upload */
.file-upload-zone {
    position: relative;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 32px 20px;
    text-align: center;
    transition: all 0.2s ease;
    background: #fafafa;
    cursor: pointer;
}

.file-upload-zone:hover {
    border-color: #3b82f6;
    background: #f0f9ff;
}

.file-upload-zone.drag-over {
    border-color: #3b82f6;
    background: #dbeafe;
    transform: scale(1.02);
}

.file-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 10;
    top: 0;
    left: 0;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    pointer-events: all;
    width: 100%;
    height: 100%;
    justify-content: center;
}

.file-upload-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.file-upload-text {
    font-weight: 500;
    color: #374151;
    margin-bottom: 4px;
}

.file-upload-limit {
    font-size: 0.8125rem;
    color: #6b7280;
}

.file-upload-zone--selected {
    border-color: #10b981;
    background: #ecfdf5;
}

.file-upload-zone--selected .file-upload-text {
    color: #047857;
}

/* Metadata Template */
.metadata-helper {
    margin-top: 16px;
}

.metadata-template {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.metadata-template__summary {
    padding: 16px;
    background: #f9fafb;
    cursor: pointer;
    font-weight: 500;
    color: #374151;
    list-style: none;
}

.metadata-template__summary::-webkit-details-marker {
    display: none;
}

.metadata-template__summary::before {
    content: '▶';
    margin-right: 8px;
    transition: transform 0.2s ease;
}

.metadata-template[open] .metadata-template__summary::before {
    transform: rotate(90deg);
}

.metadata-template__content {
    padding: 20px;
    background: white;
}

.json-template {
    background: #1f2937;
    color: #f9fafb;
    padding: 16px;
    border-radius: 8px;
    font-size: 0.8125rem;
    line-height: 1.5;
    overflow-x: auto;
    margin: 12px 0;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
}

.copy-template-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: background 0.2s ease;
}

.copy-template-btn:hover {
    background: #2563eb;
}

/* Submit Button */
.form-actions {
    margin-top: 32px;
    text-align: center;
}

.submit-btn {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
    color: white;
    border: none;
    padding: 20px 40px;
    border-radius: 16px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 44px; /* Touch target */
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    box-shadow: none;
}

.submit-btn__icon {
    font-size: 1.25rem;
}

/* Progress Section */
.progress-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    margin-bottom: 32px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

.progress-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899, #f59e0b);
    background-size: 300% 100%;
    animation: progressGlow 3s ease-in-out infinite;
}

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

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.progress-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.progress-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.progress-platform {
    background: #3b82f6;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 500;
    text-transform: uppercase;
}

.progress-job-id {
    font-size: 0.75rem;
    color: #6b7280;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
}

/* Progress Bar */
.progress-bar {
    position: relative;
    background: #f3f4f6;
    border-radius: 12px;
    height: 24px;
    overflow: hidden;
    margin-bottom: 32px;
}

.progress-bar__fill {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    height: 100%;
    border-radius: 12px;
    transition: width 0.5s ease;
    position: relative;
}

.progress-bar__fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* VDP Bridge error banner */
.vdp-bridge-banner {
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fdba74;
    border-radius: 8px;
    padding: 10px 12px;
    margin: 8px 0 12px 0;
}
.vdp-bridge-actions a {
    color: #c2410c;
    text-decoration: underline;
}

.progress-bar__text {
    position: absolute;
    top: 50%;
    left: 16px;
    right: 16px;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    pointer-events: none;
}

/* Progress Steps */
.progress-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
}

.progress-step__icon {
    font-size: 1.125rem;
    width: 24px;
    text-align: center;
}

.progress-step__text {
    font-size: 0.875rem;
    color: #374151;
}

.progress-step--completed {
    color: #059669;
}

.progress-step--completed .progress-step__icon {
    color: #059669;
}

.progress-step--active {
    color: #3b82f6;
    font-weight: 500;
}

.progress-step--active .progress-step__icon {
    color: #3b82f6;
}

.progress-step--pending {
    color: #9ca3af;
}

/* Results Section */
.results-section {
    background: white;
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Success Results */
.success-container {
    text-align: center;
}

.success-header {
    margin-bottom: 24px;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    display: block;
}

.success-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #059669;
    margin: 0;
}

.success-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 24px 0;
    padding: 24px;
    background: #f0fdf4;
    border-radius: 16px;
    border: 1px solid #bbf7d0;
}

.metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.metric .label {
    font-weight: 500;
    color: #374151;
}

.metric .value {
    font-weight: 700;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
}

.metric .value.good {
    color: #059669;
}

.success-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.view-results-btn, .process-another-btn {
    padding: 16px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    text-align: center;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-results-btn {
    background: #3b82f6;
    color: white;
    border: 2px solid #3b82f6;
}

.view-results-btn:hover {
    background: #2563eb;
    border-color: #2563eb;
}

.process-another-btn {
    background: white;
    color: #3b82f6;
    border: 2px solid #3b82f6;
}

.process-another-btn:hover {
    background: #f0f9ff;
}

/* Error Results */
.error-container {
    border: 2px solid #fecaca;
    background: #fef2f2;
    border-radius: 16px;
    padding: 24px;
}

.error-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.error-icon {
    font-size: 1.5rem;
    color: #dc2626;
}

.error-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #dc2626;
    flex: 1;
}

.error-code {
    background: #dc2626;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
}

.error-message {
    color: #7f1d1d;
    margin-bottom: 20px;
    line-height: 1.6;
}

.error-fixes {
    margin-bottom: 20px;
}

.error-fixes h4 {
    color: #7f1d1d;
    margin: 0 0 12px;
    font-size: 1rem;
}

.error-fixes ul {
    color: #7f1d1d;
    padding-left: 20px;
    margin: 0;
}

.error-fixes li {
    margin-bottom: 8px;
}

.retry-btn {
    background: #dc2626;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.retry-btn:hover {
    background: #b91c1c;
}

/* VDP Extractor Selection (Phase 2) */
.extractor-selector {
    margin: 24px 0;
    padding: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
}

.extractor-selector__legend {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 16px;
    padding: 0 8px;
}

.extractor-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.extractor-option {
    position: relative;
}

.extractor-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.extractor-option__label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.2s ease;
}

.extractor-option input:checked + .extractor-option__label {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.extractor-icon {
    font-size: 1.5rem;
}

.extractor-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.extractor-name {
    font-weight: 600;
    color: #ffffff;
    font-size: 0.95rem;
}

.extractor-desc {
    font-size: 0.8rem;
    color: #d1d5db;
}

/* GitHub VDP JSON Display (Phase 2) */
.github-vdp-container {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(100, 116, 139, 0.3);
    border-radius: 8px;
    overflow: hidden;
}

.github-vdp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: rgba(30, 41, 59, 0.8);
    border-bottom: 1px solid rgba(100, 116, 139, 0.2);
}

.github-vdp-meta {
    display: flex;
    gap: 12px;
    align-items: center;
}

.content-key {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    font-size: 0.875rem;
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    padding: 4px 8px;
    border-radius: 4px;
}

.extractor-type {
    font-size: 0.8rem;
    background: rgba(168, 85, 247, 0.2);
    color: #a855f7;
    padding: 4px 8px;
    border-radius: 4px;
}

.github-badge {
    font-size: 0.75rem;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
}

.copy-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: rgba(59, 130, 246, 0.3);
}

.json-display {
    max-height: 400px;
    overflow-y: auto;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    font-size: 0.8rem;
    line-height: 1.4;
}

.json-code {
    color: #e2e8f0;
    background: transparent;
    margin: 0;
    padding: 16px;
    white-space: pre-wrap;
    word-break: break-word;
}

.github-vdp-actions {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: rgba(30, 41, 59, 0.4);
    border-top: 1px solid rgba(100, 116, 139, 0.2);
}

/* Footer */
.footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding: 20px 0;
    text-align: center;
}

.footer__text {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

.footer__link {
    color: #3b82f6;
    text-decoration: none;
}

.footer__link:hover {
    text-decoration: underline;
}

/* Responsive Design */

/* Tablet (768px+) */
@media (min-width: 768px) {
    .container {
        padding: 0 32px;
    }
    
    .platform-options {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 16px;
    }
    
    .platform-option {
        flex-direction: column;
        text-align: center;
        padding: 24px 16px;
        aspect-ratio: 1;
    }
    
    .platform-option__icon {
        margin-right: 0;
        margin-bottom: 8px;
        font-size: 2rem;
    }
    
    .platform-option__desc {
        margin-left: 0;
        margin-top: 4px;
    }
    
    .success-details {
        grid-template-columns: 1fr 1fr;
    }
    
    .success-actions {
        flex-direction: row;
        justify-content: center;
    }
    
    .progress-header {
        flex-wrap: nowrap;
    }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
    .vdp-form {
        padding: 48px;
    }
    
    .progress-section, .results-section {
        padding: 48px;
    }
    
    .success-details {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #111827;
        --bg-secondary: #1f2937;
        --text-primary: #f9fafb;
        --text-secondary: #d1d5db;
    }
}

/* Enhanced Progress Section Styles */
.progress-title-group {
    flex: 1;
}

.progress-subtitle {
    font-size: 0.9rem;
    color: #64748b;
    margin-top: 4px;
    font-weight: 400;
}

.progress-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-end;
}

.progress-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress-meta-label {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.progress-platform-badge {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.progress-job-container {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px 8px;
}

.progress-job-id {
    font-family: 'Monaco', monospace;
    font-size: 0.75rem;
    color: #374151;
    font-weight: 500;
}

.copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.copy-btn:hover {
    background-color: rgba(59, 130, 246, 0.1);
}

.progress-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 24px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.progress-stat {
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-stat-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-stat-info {
    flex: 1;
}

.progress-stat-label {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 2px;
}

.progress-stat-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
}

.progress-bar-container {
    margin: 24px 0;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.progress-bar__fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    border-radius: 6px;
    transition: width 0.3s ease;
    position: relative;
}

.progress-bar__glow {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100px); }
    100% { transform: translateX(400px); }
}

.progress-percentage {
    text-align: center;
    margin-top: 8px;
}

.progress-percentage span {
    font-size: 0.875rem;
    font-weight: 600;
    color: #3b82f6;
}

.progress-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    margin: 16px 0;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.progress-status-icon {
    font-size: 1.2rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.progress-status-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: #374151;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    margin: 24px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    overflow-x: auto;
    gap: 8px;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 80px;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.progress-step--active {
    opacity: 1;
}

.progress-step--completed {
    opacity: 1;
}

.progress-step-icon {
    font-size: 1.5rem;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.progress-step--active .progress-step-icon {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    animation: stepPulse 2s infinite;
}

@keyframes stepPulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2); }
    50% { box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.4); }
}

.progress-step--completed .progress-step-icon {
    background: #10b981;
    border-color: #10b981;
}

.progress-step-label {
    font-size: 0.75rem;
    text-align: center;
    font-weight: 500;
    color: #64748b;
}

.progress-step--active .progress-step-label {
    color: #3b82f6;
    font-weight: 600;
}

.progress-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
    flex-wrap: wrap;
}

.btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn--secondary {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.btn--secondary:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-1px);
}

.btn--outline {
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid #3b82f6;
    color: #3b82f6;
}

.btn--outline:hover {
    background: #3b82f6;
    color: white;
}

.btn-icon {
    font-size: 1rem;
}

.btn-text {
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .progress-section {
        padding: 24px;
    }
    
    .progress-header {
        flex-direction: column;
        gap: 16px;
    }
    
    .progress-meta {
        align-items: flex-start;
    }
    
    .progress-stats {
        grid-template-columns: 1fr;
    }
    
    .progress-steps {
        padding: 16px;
    }
}

/* Form Validation Styles */
.form-input--valid {
    border-color: #10b981;
    background-color: #f0fdf4;
}

.form-input--invalid {
    border-color: #ef4444;
    background-color: #fef2f2;
}

.validation-message {
    font-size: 0.8125rem;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.validation-message--valid {
    color: #059669;
}

.validation-message--invalid {
    color: #dc2626;
}

/* Copy Success Feedback Styles */
.copy-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: white !important;
    transform: scale(0.95);
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.job-stats__copy.copy-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border-color: #059669 !important;
}

.copy-job-id-btn.copy-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border-color: #059669 !important;
}

/* Auto-filled Editable Fields Styles */
.auto-filled-editable {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 2px solid #e2e8f0;
    position: relative;
}

.auto-filled-editable:hover {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.auto-filled-editable:focus {
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    outline: none;
}

.auto-filled-editable::before {
    content: "✏️";
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.6;
    pointer-events: none;
    font-size: 14px;
}

.auto-filled-editable:focus::before {
    opacity: 0;
}

.validation-message--valid::before {
    content: '✓';
    font-weight: bold;
}

.validation-message--invalid::before {
    content: '✗';
    font-weight: bold;
}

/* Loading States */
.submit-btn--loading {
    background: #9ca3af !important;
    cursor: wait !important;
    pointer-events: none;
}

.submit-btn--loading .submit-btn__icon {
    animation: spin 1s linear infinite;
}

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

/* File Upload States */
.file-upload-zone--error {
    border-color: #ef4444;
    background: #fef2f2;
}

.file-upload-zone--error .file-upload-text {
    color: #dc2626;
}

/* Quality Indicators & Badges */
.hook-gate-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.875rem;
    margin: 16px 0;
    border: 2px solid;
}

.hook-gate-badge.pass {
    background: #f0fdf4;
    border-color: #10b981;
    color: #047857;
}

.hook-gate-badge.fail {
    background: #fef2f2;
    border-color: #ef4444;
    color: #dc2626;
}

.legacy-badge {
    background: #fef3c7;
    color: #d97706;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 12px;
}

.quality-indicators {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
}

.quality-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.quality-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 12px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.quality-metric:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.metric-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.metric-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.metric-label {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Enhanced success details */
.success-details .metric .value.warning {
    color: #d97706;
    font-weight: 600;
}

.success-details .metric .value.good {
    color: #059669;
    font-weight: 600;
}

/* Mobile responsive quality grid */
@media (max-width: 640px) {
    .quality-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .quality-metric {
        padding: 8px;
    }
    
    .hook-gate-badge {
        padding: 8px 12px;
        font-size: 0.8125rem;
    }
}

/* Ingest Complete Styles */
.ingest-complete-container {
    background: linear-gradient(145deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #3b82f6;
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.2);
}

.ingest-header {
    margin-bottom: 24px;
}

.ingest-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 16px;
}

.ingest-title {
    color: #1e40af;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.ingest-details {
    text-align: left;
    margin: 24px 0;
}

.ingest-info {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.info-item:last-child {
    border-bottom: none;
}

.info-item .label {
    font-weight: 500;
    color: #374151;
}

.info-item .value {
    font-family: 'Monaco', 'Menlo', monospace;
    color: #1f2937;
}

.status-queued {
    color: #059669;
    font-weight: 600;
}

.ingest-message {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    color: #065f46;
}

.ingest-message p {
    margin: 8px 0;
}

.gcs-info {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
}

.gcs-uri {
    background: rgba(0, 0, 0, 0.1);
    padding: 8px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.875rem;
    word-break: break-all;
    display: block;
    margin-top: 8px;
}

.ingest-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
    flex-wrap: wrap;
}

.copy-job-id-btn {
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.copy-job-id-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

/* Responsive styles for ingest complete */
@media (max-width: 640px) {
    .ingest-complete-container {
        padding: 20px;
    }
    
    .ingest-actions {
        flex-direction: column;
    }
    
    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .gcs-uri {
        font-size: 0.75rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .progress-bar__fill::after {
        animation: none;
    }
    
    .quality-metric:hover {
        transform: none;
    }
    
    .copy-job-id-btn:hover {
        transform: none;
    }
}

/* User Input Section Styles */
.user-input-section {
    margin-top: 1.5rem;
    padding: 1.5rem;
    border: 2px solid #6366f1;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8fafc 0%, rgba(99, 102, 241, 0.05) 100%);
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #6366f1;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auto-filled-section {
    margin-top: 1.5rem;
    opacity: 0.85;
}

.auto-filled-section .section-title {
    color: #6b7280;
    font-size: 1rem;
}

/* Metadata Display Styles */
.metadata-display {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    margin: 12px 0;
}

.metadata-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.metadata-item {
    display: flex;
    flex-direction: column;
}

.metadata-label {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metadata-item .form-input {
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    color: #374151;
    font-weight: 500;
}

.metadata-item .form-input:read-only {
    background-color: #f9fafb;
    color: #6b7280;
    cursor: not-allowed;
}

.metadata-item .form-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Extraction Status Styles */
.extraction-status {
    margin-top: 8px;
    font-size: 14px;
}

.status-loading {
    color: #059669;
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-success {
    color: #059669;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-error {
    color: #dc2626;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-info {
    color: #2563eb;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

/* Lightweight skeleton loader */
.skeleton {
    position: relative;
    overflow: hidden;
}
.skeleton .form-input,
.skeleton .metadata-item input,
.skeleton .metadata-item .form-input {
    color: transparent;
    background: #f3f4f6;
}
.skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.6) 50%, rgba(255,255,255,0) 100%);
    animation: shimmer 1.2s infinite;
}
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Manual Input Field Styles */
.metadata-item .form-input::placeholder {
    color: #9ca3af;
    font-style: italic;
}

.metadata-item .form-input:not(:read-only):hover {
    border-color: #9ca3af;
}

/* Auto-filled vs Manual Input Visual Distinction */
.metadata-item.auto-filled .form-input {
    background-color: #f0fdf4;
    border-color: #22c55e;
}

.metadata-item.manual-input .form-input {
    background-color: #fef3c7;
    border-color: #f59e0b;
}

/* Remove old extraction button styles */
.url-extraction-container {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.extract-metadata-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.extract-metadata-btn:hover {
    background: #2563eb;
}

.extract-metadata-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* Platform Detection Notice Styles */
.platform-detection-notice {
    margin-top: 8px;
    animation: slideInFromTop 0.3s ease-out, fadeOut 0.3s ease-in 2.7s forwards;
}

.platform-detection-notice__content {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.platform-detection-notice__icon {
    font-size: 16px;
}

.platform-detection-notice__text {
    flex: 1;
}

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

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