/* JSON to TOON Converter - Custom Styles */

.code-editor-wrapper {
    position: relative;
    display: flex;
    background-color: #1f2937; /* gray-800 */
    border-radius: 0.5rem;
    overflow: hidden;
    min-height: 250px;
    max-height: 400px;
}

.line-numbers {
    background-color: #111827; /* gray-900 */
    color: #6b7280; /* gray-500 */
    padding: 1rem 0.75rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.875rem; /* text-sm */
    line-height: 1.75;
    text-align: right;
    user-select: none;
    min-width: 3rem;
    overflow: hidden;
    white-space: pre;
    border-right: 1px solid #374151; /* gray-700 */
}

.code-editor-wrapper textarea {
    flex: 1;
    background-color: transparent;
    color: #e5e7eb; /* gray-200 */
    padding: 1rem;
    padding-right: 3.5rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.875rem; /* text-sm */
    line-height: 1.75;
    border: none;
    outline: none;
    resize: none;
    overflow-y: auto;
    white-space: pre;
    word-wrap: normal;
    overflow-wrap: normal;
}

.code-editor-wrapper textarea::placeholder {
    color: #6b7280; /* gray-500 */
}

.code-editor-wrapper textarea:focus {
    outline: none;
}

.code-editor-wrapper:focus-within {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5); /* blue-500 with opacity */
}

.copy-button {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.5rem;
    color: #9ca3af; /* gray-400 */
    background-color: #374151; /* gray-700 */
    border-radius: 0.375rem;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-button:hover {
    color: #e5e7eb; /* gray-200 */
    background-color: #4b5563; /* gray-600 */
}

.copy-button:active {
    transform: scale(0.95);
}

.copy-button svg {
    display: block;
}

.code-editor-wrapper.error {
    border-color: #ef4444; /* red-500 */
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.1);
}

.code-editor-wrapper.success {
    border-color: #10b981; /* green-500 */
    box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.1);
}

.validation-message {
    margin-top: 0.5rem;
    font-size: 0.875rem; /* text-sm */
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.validation-message.error {
    color: #ef4444; /* red-500 */
}

.validation-message.success {
    color: #10b981; /* green-500 */
}

.validation-message.hidden {
    display: none;
}

.line-numbers .error-line {
    background-color: rgba(239, 68, 68, 0.2);
    color: #ef4444; /* red-500 */
    font-weight: 700;
    display: inline-block;
    width: 100%;
    padding: 0 0.25rem;
    margin: 0 -0.25rem;
}

