/* Tool-specific styles only - base styles are in tool-layout.css */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #0a0a0a;
    color: #e5e7eb;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: #141414;
    border-bottom: 1px solid #374151;
    z-index: 100;
}

    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

    margin-top: 60px;
    padding: 48px 24px;
    text-align: center;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    max-width: 720px;
    margin: 0 auto;
}

.tool-main {
    flex: 1;
    padding: 32px 24px 120px;
}

.tool-container {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group > label {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

.text-input {
    background-color: #141414;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.text-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.text-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.text-input::placeholder {
    color: #6b7280;
}

.textarea-input {
    resize: vertical;
    min-height: 120px;
    line-height: 1.5;
}

.select-input {
    background-color: #141414;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239ca3af' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

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

.select-input option {
    background-color: #1a1a1a;
}

.select-input option.pro-option {
    color: #fbbf24;
}

.format-hint {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
}

.validation-error {
    background-color: #7f1d1d;
    border: 1px solid #dc2626;
    color: #fca5a5;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.4;
}

.settings-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 24px;
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
}

.settings-title {
    font-size: 18px;
    font-weight: 500;
    color: #d1d5db;
    margin-bottom: 4px;
}

.options-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.setting-item > label,
.setting-content > label {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

.setting-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

input[type="range"].slider {
    width: 100%;
    height: 4px;
    background-color: #374151;
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
    display: block;
}

input[type="range"].slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background-color: #3b82f6;
    border-radius: 50%;
    cursor: pointer;
}

input[type="range"].slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background-color: #3b82f6;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

input[type="range"].slider:focus-visible::-webkit-slider-thumb {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.color-input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.color-input {
    -webkit-appearance: none;
    appearance: none;
    width: 40px;
    height: 40px;
    border: 1px solid #374151;
    border-radius: 6px;
    cursor: pointer;
    background: none;
    padding: 2px;
}

.color-input::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-input::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

.color-input::-moz-color-swatch {
    border: none;
    border-radius: 4px;
}

.color-value {
    font-size: 13px;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    color: #9ca3af;
}

.pro-feature {
    position: relative;
    opacity: 0.6;
}

.pro-feature.unlocked {
    opacity: 1;
}

.pro-badge {
    color: #0a0a0a;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}

.library-loading {
    font-size: 13px;
    color: #9ca3af;
    text-align: center;
    padding: 8px 0;
}

.library-loading.section-hidden {
    display: none;
}

.modal-hidden {
    display: none;
}

.button-primary {
    background-color: #3b82f6;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: background-color 150ms ease;
    text-align: center;
}

.button-secondary {
    background-color: #1a1a1a;
    color: #e5e7eb;
    border: 1px solid #374151;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 150ms ease;
    text-align: center;
}

.button-download {
    background-color: #059669;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: background-color 150ms ease;
    text-align: center;
    width: 100%;
}

.output-section {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.output-header h3 {
    font-size: 22px;
    font-weight: 600;
    line-height: 28px;
    color: #d1d5db;
}

.preview-panel {
    background-color: #1a1a1a;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    overflow: hidden;
}

.preview-canvas-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    overflow: hidden;
}

.preview-canvas-wrapper canvas {
    max-width: 100%;
    height: auto;
}

#barcode-svg {
    max-width: 100%;
    height: auto;
}

.barcode-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 16px;
    background-color: #1a1a1a;
    border-radius: 6px;
}

.info-item {
    font-size: 13px;
    color: #9ca3af;
}

.info-divider {
    font-size: 13px;
    color: #374151;
}

.download-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.batch-section {
    padding: 24px;
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-header h3 {
    font-size: 22px;
    font-weight: 600;
    color: #d1d5db;
}

.file-upload-zone {
    background-color: #0a0a0a;
    border: 2px dashed #374151;
    border-radius: 12px;
    padding: 32px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 150ms ease;
    position: relative;
    outline: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.upload-icon {
    font-size: 14px;
    font-weight: 600;
    opacity: 0.7;
    color: #6b7280;
    letter-spacing: 2px;
}

.upload-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.upload-primary {
    font-size: 15px;
    font-weight: 400;
    color: #e5e7eb;
}

.upload-secondary {
    font-size: 13px;
    font-weight: 400;
    color: #9ca3af;
}

.batch-progress {
    display: flex;
    align-items: center;
    gap: 16px;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background-color: #374151;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #3b82f6;
    border-radius: 2px;
    width: 0%;
    transition: width 200ms ease;
}

.progress-text {
    font-size: 13px;
    color: #9ca3af;
    flex-shrink: 0;
}

.batch-results {
    display: flex;
    flex-direction: column;
    gap: 16px;
    border-top: 1px solid #374151;
    padding-top: 20px;
}

.batch-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.batch-results-header h4 {
    font-size: 18px;
    font-weight: 500;
    color: #d1d5db;
}

.batch-results-count {
    font-size: 13px;
    color: #9ca3af;
}

.batch-results-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 320px;
    overflow-y: auto;
}

.batch-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background-color: #1a1a1a;
    border-radius: 6px;
}

.batch-result-index {
    font-size: 12px;
    color: #6b7280;
    width: 32px;
    flex-shrink: 0;
}

.batch-result-data {
    font-size: 13px;
    color: #e5e7eb;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 12px;
}

.batch-result-status {
    font-size: 12px;
    font-weight: 500;
    flex-shrink: 0;
}

.batch-result-status.done {
    color: #10b981;
}

.batch-result-status.error {
    color: #ef4444;
}

.batch-result-status.pending {
    color: #9ca3af;
}

.batch-download-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.batch-results-list::-webkit-scrollbar {
    width: 6px;
}

.batch-results-list::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 3px;
}

.batch-results-list::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 3px;
}

.batch-results-list::-webkit-scrollbar-thumb:hover {
    background: #4b5563;
}

.pro-cta-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.pro-cta-text {
    font-size: 14px;
    color: #d1d5db;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 24px;
}

.modal-overlay.modal-hidden {
    display: none;
}

.modal-overlay.modal-visible {
    display: flex;
}

.modal {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 12px;
    padding: 0;
    max-width: 480px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    padding: 24px 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 22px;
    font-weight: 600;
    color: #ffffff;
}

.modal-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #e5e7eb;
}

.modal-content {
    padding: 24px;
}

.pro-features-list {
    margin-bottom: 24px;
}

.pro-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
}

.feature-check {
    width: 20px;
    height: 20px;
    background-color: #059669;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.feature-text {
    font-size: 15px;
    color: #e5e7eb;
}

.modal-cta {
    width: 100%;
    display: block;
}

.footer {
    background-color: #0a0a0a;
    border-top: 1px solid #374151;
    padding: 32px 24px;
    text-align: center;
    margin-top: auto;
}

.footer p {
    font-size: 14px;
    color: #6b7280;
}

.error-message {
    background-color: #7f1d1d;
    border: 1px solid #dc2626;
    color: #fca5a5;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    margin-top: 8px;
}

.success-message {
    background-color: #064e3b;
    border: 1px solid #059669;
    color: #6ee7b7;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    margin-top: 8px;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #374151;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

@media (max-width: 768px) {
        padding: 32px 16px;
    }

        font-size: 28px;
        line-height: 36px;
    }

        font-size: 14px;
    }

    .tool-main {
        padding: 24px 16px 100px;
    }

    .tool-container {
        gap: 32px;
    }

    .settings-group {
        padding: 16px;
    }

    .output-section {
        padding: 16px;
    }

    .batch-section {
        padding: 16px;
    }

    .preview-panel {
        padding: 16px;
        min-height: 120px;
    }

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

    .info-divider {
        display: none;
    }

    .download-actions {
        flex-direction: column;
    }

    .button-primary,
    .button-secondary,
    .button-download {
        width: 100%;
    }

    .pro-cta-content {
        flex-direction: column;
        gap: 10px;
    }

        padding: 0 16px;
    }

    .file-upload-zone {
        padding: 24px 16px;
    }
}

@media (max-width: 480px) {
    .batch-result-item {
        flex-wrap: wrap;
    }
}