/* Nanonets Design System CSS */

/* CSS Variables for Nanonets Design System */
:root {
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Colors - Primary Blue */
    --primary-darkest: #13152A;
    --primary-darker: #1D2554;
    --primary-dark: #3A4DB2;
    --primary-blue: #546FFF;
    --primary-light: #BBC5FF;
    --primary-lighter: #EAEDFF;
    --primary-lightest: #F2F4FF;
    --primary-bg: #F8FAFF;
    
    /* Colors - Neutrals */
    --black: #1F2129;
    --grey-dark: #404558;
    --grey-medium: #676767;
    --grey-light: #F8F9FA;
    --white: #FFFFFF;
    
    /* Colors - Accents */
    --green: #18855E;
    --green-light: #41A451;
    --orange: #ED6E33;
    --red: #D02B2B;
    --yellow: #995C00;
    
    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 12px;
    --spacing-lg: 16px;
    --spacing-xl: 24px;
    --spacing-xxl: 32px;
    --spacing-xxxl: 48px;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: var(--font-family);
    background-color: var(--primary-bg);
    color: var(--black);
    line-height: 1.6;
}

/* Typography Classes */
.title-48 {
    font-size: 48px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: var(--spacing-md);
}

.title-36 {
    font-size: 36px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: var(--spacing-md);
}

.title-24 {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
    margin-bottom: var(--spacing-sm);
}

.title-20 {
    font-size: 20px;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: var(--spacing-sm);
}

.title-16 {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: var(--spacing-xs);
}

.body-big {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    margin-bottom: var(--spacing-sm);
}

.body-normal {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    margin-bottom: var(--spacing-sm);
}

.body-small {
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    margin-bottom: var(--spacing-xs);
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-xxl);
}

.header {
    text-align: center;
    margin-bottom: var(--spacing-xxxl);
}

.header .body-big {
    color: var(--grey-medium);
    max-width: 600px;
    margin: 0 auto;
}

.main-content {
    display: grid;
    gap: var(--spacing-xxl);
    margin-bottom: var(--spacing-xxxl);
}

/* Cards */
.upload-card, .results-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xxl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--primary-lighter);
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* File Upload Area */
.file-upload-area {
    border: 2px dashed var(--primary-light);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xxxl);
    text-align: center;
    background: var(--primary-lightest);
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: var(--spacing-xl);
}

.file-upload-area:hover {
    border-color: var(--primary-blue);
    background: var(--primary-lighter);
}

.file-upload-area.dragover {
    border-color: var(--primary-blue);
    background: var(--primary-lighter);
    transform: scale(1.02);
}

.upload-icon {
    margin-bottom: var(--spacing-lg);
}

.file-upload-area .body-big {
    color: var(--primary-dark);
    font-weight: 500;
    margin-bottom: var(--spacing-sm);
}

.file-upload-area .body-normal {
    color: var(--grey-medium);
    margin-bottom: var(--spacing-lg);
}

/* File Info */
.file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--primary-lightest);
    border: 1px solid var(--primary-light);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.file-details {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.file-name {
    font-weight: 500;
    color: var(--primary-dark);
}

.file-size {
    font-size: 12px;
    color: var(--grey-medium);
}

.btn-remove {
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-sm);
    border-radius: var(--radius-sm);
    transition: background-color 0.2s ease;
}

.btn-remove:hover {
    background: var(--primary-lighter);
}

/* Output Options */
.output-options {
    margin-bottom: var(--spacing-xl);
}

.output-options .title-20 {
    margin-bottom: var(--spacing-lg);
}

/* Form Sections */
.form-section {
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-xl);
    background: var(--white);
    border: 1px solid var(--primary-light);
    border-radius: var(--radius-lg);
}

.form-section h3 {
    margin-bottom: var(--spacing-sm);
    color: var(--primary-darkest);
}

.form-section p {
    margin-bottom: var(--spacing-lg);
    color: var(--grey-600);
}

/* Radio Groups */
.radio-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
}

.radio-option {
    display: flex;
    align-items: center;
    padding: var(--spacing-md);
    border: 1px solid var(--primary-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--white);
}

.radio-option:hover {
    border-color: var(--primary-blue);
    background: var(--primary-lightest);
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 18px;
    height: 18px;
    border: 2px solid var(--primary-light);
    border-radius: 50%;
    margin-right: var(--spacing-sm);
    position: relative;
    transition: all 0.2s ease;
}

.radio-option input[type="radio"]:checked + .radio-custom {
    border-color: var(--primary-blue);
    background: var(--primary-blue);
}

.radio-option input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: var(--white);
    border-radius: 50%;
}

.radio-label {
    font-weight: 500;
    color: var(--primary-darkest);
    cursor: pointer;
}

/* Format Parameters */
.format-params {
    background: var(--primary-lightest);
    border: 1px solid var(--primary-light);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.param-group {
    margin-bottom: var(--spacing-lg);
}

.param-group:last-child {
    margin-bottom: 0;
}

.param-group .title-16 {
    color: var(--primary-dark);
    margin-bottom: var(--spacing-xs);
}

.param-group .body-small {
    color: var(--grey-medium);
    margin-bottom: var(--spacing-md);
}

.param-input, .param-textarea {
    width: 100%;
    padding: var(--spacing-md);
    border: 1px solid var(--primary-light);
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: 14px;
    line-height: 1.5;
    background: var(--white);
    transition: border-color 0.2s ease;
}

.param-input:focus, .param-textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(84, 111, 255, 0.1);
}

.param-input::placeholder, .param-textarea::placeholder {
    color: var(--grey-medium);
}

/* Make JSON schema placeholder lighter so users know it's an example, not pre-filled */
#jsonSchema::placeholder {
    color: #B0B0B0;
    opacity: 0.7;
    font-style: italic;
}

/* Make specified fields placeholder lighter so users know it's an example, not pre-filled */
#specifiedFields::placeholder {
    color: #B0B0B0;
    opacity: 0.7;
    font-style: italic;
}

.param-textarea {
    resize: vertical;
    min-height: 120px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-xl);
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px;
}

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

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

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-blue);
    border: 1px solid var(--primary-light);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--primary-lightest);
    border-color: var(--primary-blue);
}

/* Spinner */
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Results Section */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-xl);
    flex-wrap: wrap;
    gap: var(--spacing-lg);
}

.results-meta {
    display: flex;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

.meta-item {
    background: var(--primary-lightest);
    color: var(--primary-dark);
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 500;
}

.results-content {
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* Tabs */
.content-tabs {
    display: flex;
    border-bottom: 1px solid var(--primary-lighter);
    margin-bottom: var(--spacing-xl);
}

.tab-btn {
    background: none;
    border: none;
    padding: var(--spacing-md) var(--spacing-lg);
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 500;
    color: var(--grey-medium);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: var(--primary-blue);
}

.tab-btn.active {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
}

.tab-content {
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.tab-pane {
    display: none;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

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

/* Content Display */
.preview-content {
    background: var(--grey-light);
    border: 1px solid var(--primary-lighter);
    border-radius: var(--radius-md);
    padding: var(--spacing-xl);
    max-height: 500px;
    overflow-y: auto;
    overflow-x: auto;
    font-family: var(--font-family);
    line-height: 1.6;
    width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    hyphens: auto;
    word-break: break-word;
}

/* Fix for pre elements inside preview content */
.preview-content pre {
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    margin: 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
}

/* Specific styling for JSON preview */
.preview-content .json-preview {
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    background: var(--primary-darkest);
    color: var(--primary-light);
    padding: var(--spacing-md);
    border-radius: var(--radius-sm);
    max-width: 100% !important;
    overflow-x: auto !important;
}

/* Fix for long URLs and text in preview content */
.preview-content h1, .preview-content h2, .preview-content h3,
.preview-content p, .preview-content div, .preview-content span {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    max-width: 100% !important;
}

/* Force break for very long words/URLs */
.preview-content * {
    max-width: 100% !important;
    word-break: break-all !important;
    overflow-wrap: anywhere !important;
}

.raw-content {
    background: var(--primary-darkest);
    color: var(--primary-light);
    border-radius: var(--radius-md);
    padding: var(--spacing-xl);
    max-height: 500px;
    overflow-y: auto;
    overflow-x: auto;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    line-height: 1.5;
    width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    hyphens: auto;
    word-break: break-word;
}

.download-options {
    display: flex;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

/* Supported Formats */
.supported-formats {
    text-align: center;
    margin-top: var(--spacing-xxxl);
}

.supported-formats .title-20 {
    margin-bottom: var(--spacing-lg);
}

.format-tags {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.format-tag {
    background: var(--primary-lightest);
    color: var(--primary-dark);
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 500;
    border: 1px solid var(--primary-light);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: var(--spacing-lg);
    }
    
    .title-48 {
        font-size: 32px;
    }
    
    .upload-card, .results-card {
        padding: var(--spacing-lg);
    }
    
    .radio-group {
        grid-template-columns: 1fr;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .content-tabs {
        overflow-x: auto;
    }
    
    .download-options {
        flex-direction: column;
    }
    
    .format-params {
        padding: var(--spacing-lg);
    }
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Success/Error States */
.success {
    border-color: var(--green);
    background: rgba(24, 133, 94, 0.1);
}

.error {
    border-color: var(--red);
    background: rgba(208, 43, 43, 0.1);
}

/* API Key Input Styles */
.api-key-group {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

.api-key-input {
    flex: 1;
    padding: 16px 50px 16px 16px;
    border: 2px solid var(--grey-light);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 1.4;
    background: var(--white);
    transition: all 0.2s ease;
    width: 100%;
}

.api-key-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(84, 111, 255, 0.1);
}

.api-key-input::placeholder {
    color: var(--grey);
}

.btn-toggle-visibility {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-toggle-visibility:hover {
    background: var(--grey-lightest);
}

.btn-toggle-visibility svg {
    transition: all 0.2s ease;
}

.api-key-note {
    margin-top: var(--spacing-xs);
    color: var(--grey);
}

.api-key-note small {
    font-size: 12px;
    line-height: 1.4;
} 

/* Format Tags */
.format-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.format-tag {
    background-color: var(--primary-lighter);
    color: var(--primary-dark);
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Free Badge */
.free-badge {
    margin: var(--spacing-sm) 0;
}

.badge-free {
    background: linear-gradient(135deg, var(--green), var(--green-light));
    color: var(--white);
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    display: inline-block;
}

/* API Key Section Enhancements */
.api-key-info {
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-md);
    background-color: var(--primary-bg);
    border: 1px solid var(--primary-light);
    border-radius: var(--radius-md);
}

.api-key-link {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.api-key-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Button Layout for Extract and cURL */
.btn + .btn {
    margin-left: var(--spacing-md);
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-xl);
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    padding: var(--spacing-xl);
    border-bottom: 1px solid var(--grey-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
    border-radius: var(--radius-sm);
    transition: background-color 0.2s ease;
}

.modal-close:hover {
    background-color: var(--grey-light);
}

.modal-body {
    padding: var(--spacing-xl);
}

/* cURL Command Styles */
.curl-command-container {
    position: relative;
    margin: var(--spacing-lg) 0;
}

.curl-command {
    background-color: var(--primary-darkest);
    color: var(--white);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.5;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.btn-copy {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.btn-copy:hover {
    background: var(--primary-dark);
}

.curl-notes {
    margin-top: var(--spacing-lg);
    padding: var(--spacing-md);
    background-color: var(--primary-bg);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-blue);
}

.curl-notes code {
    background-color: var(--grey-light);
    padding: 2px 4px;
    border-radius: var(--radius-sm);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
} 

/* CSV Table Styles */
.csv-table-title {
    color: var(--primary-dark);
    font-size: 16px;
    font-weight: 600;
    margin: var(--spacing-lg) 0 var(--spacing-md) 0;
    padding-bottom: var(--spacing-xs);
    border-bottom: 2px solid var(--primary-light);
}

.csv-table-title:first-child {
    margin-top: 0;
}

.csv-table-container {
    margin-bottom: var(--spacing-xl);
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--primary-lighter);
    background: var(--white);
}

.csv-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-family);
    font-size: 14px;
    line-height: 1.4;
}

.csv-table thead {
    background: var(--primary-lightest);
    border-bottom: 2px solid var(--primary-light);
}

.csv-table th {
    padding: var(--spacing-md) var(--spacing-lg);
    text-align: left;
    font-weight: 600;
    color: var(--primary-dark);
    border-right: 1px solid var(--primary-lighter);
    white-space: nowrap;
}

.csv-table th:last-child {
    border-right: none;
}

.csv-table tbody tr {
    border-bottom: 1px solid var(--primary-lighter);
    transition: background-color 0.2s ease;
}

.csv-table tbody tr:hover {
    background: var(--primary-bg);
}

.csv-table tbody tr:last-child {
    border-bottom: none;
}

.csv-table td {
    padding: var(--spacing-md) var(--spacing-lg);
    border-right: 1px solid var(--primary-lighter);
    color: var(--black);
    vertical-align: top;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 200px;
}

.csv-table td:last-child {
    border-right: none;
}

/* Responsive CSV Tables */
@media (max-width: 768px) {
    .csv-table-container {
        margin: var(--spacing-md) -var(--spacing-lg);
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .csv-table {
        font-size: 12px;
    }
    
    .csv-table th,
    .csv-table td {
        padding: var(--spacing-sm) var(--spacing-md);
        max-width: 150px;
    }
}

/* CSV Fallback Styles */
.csv-fallback {
    background: var(--grey-light);
    border: 1px solid var(--primary-lighter);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    line-height: 1.5;
    color: var(--black);
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Alternating row colors for better readability */
.csv-table tbody tr:nth-child(even) {
    background: var(--primary-bg);
}

.csv-table tbody tr:nth-child(even):hover {
    background: var(--primary-lightest);
}

/* CSV table in dark containers */
.preview-content .csv-table-container {
    margin: var(--spacing-md) 0;
}

.preview-content .csv-table-title {
    color: var(--primary-darkest);
    background: none;
    margin: var(--spacing-lg) 0 var(--spacing-sm) 0;
} 

/* Rate Limit Error Styling */
.rate-limit-error {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 1px solid #856404;
    border-radius: 8px;
    padding: 20px;
    margin: 10px 0;
    color: #856404;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.rate-limit-error h4 {
    margin: 0 0 12px 0;
    color: #721c24;
    font-size: 18px;
    font-weight: 600;
}

.rate-limit-error h5 {
    margin: 16px 0 8px 0;
    color: #155724;
    font-size: 16px;
    font-weight: 600;
}

.rate-limit-details {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    padding: 12px;
    margin: 12px 0;
    border-left: 4px solid #ffc107;
}

.rate-limit-details p {
    margin: 4px 0;
    font-size: 14px;
}

.upgrade-section {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 1px solid #155724;
    border-radius: 6px;
    padding: 16px;
    margin: 16px 0;
    color: #155724;
}

.upgrade-section p {
    margin: 6px 0;
    font-size: 14px;
}

.upgrade-instruction {
    background: #546FFF;
    color: white;
    padding: 12px;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    margin: 16px 0 0 0;
    animation: pulse 2s infinite;
}

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

/* Enhanced error notification styling */
.error-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 500px;
    background: white;
    border: 1px solid #dc3545;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* API Key section highlight when shown dynamically */
#apiKeySection.highlight {
    animation: highlightSection 2s ease-out;
    border: 2px solid #546FFF;
    border-radius: 8px;
    background: rgba(84, 111, 255, 0.05);
}

@keyframes highlightSection {
    0% {
        border-color: #546FFF;
        box-shadow: 0 0 0 4px rgba(84, 111, 255, 0.3);
    }
    50% {
        border-color: #546FFF;
        box-shadow: 0 0 0 8px rgba(84, 111, 255, 0.2);
    }
    100% {
        border-color: #546FFF;
        box-shadow: 0 0 0 0 rgba(84, 111, 255, 0);
    }
} 

/* Rate Limit Notice */
.rate-limit-notice {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 1px solid #856404;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    color: #856404;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.notice-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.notice-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.notice-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
}

.notice-text strong {
    color: #721c24;
    font-weight: 600;
} 