/* Modal Styles */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

.modal-backdrop.hidden {
    display: none;
}

.modal-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 400px;
    overflow: hidden;
    animation: modalFadeIn 0.2s ease;
}

.modal-container.modal-lg {
    max-width: 600px;
    width: 90%;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #333;
}

.modal-content {
    padding: 20px;
}

.modal-input-group {
    margin-bottom: 15px;
}

.modal-input-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.modal-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: var(--border-radius-small);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: border-color var(--transition-fast);
    color: #333;
}

.modal-input:focus {
    border-color: var(--color-button-bg);
    outline: none;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* Code Container for JSON Display */
.code-container {
    background-color: #f5f5f5;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    padding: 0;
    position: relative;
    margin-bottom: 15px;
    max-height: 400px;
    overflow: auto;
}

/* Apply custom scrollbar to JSON display */
.code-container::-webkit-scrollbar {
    width: 8px;
}

.code-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 8px;
}

.code-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 8px;
}

.code-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Firefox scrollbar for JSON display */
.code-container {
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}

.code-content {
    margin: 0;
    padding: 15px;
    font-family: 'Menlo', 'Monaco', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.5;
    color: #333;
    tab-size: 4;
    white-space: pre-wrap;
    word-break: break-all;
}

/* JSON Editor */
.json-editor-container {
    margin-bottom: 15px;
    width: 100%;
}

.json-editor {
    width: 100%;
    height: 300px;
    padding: 15px;
    font-family: 'Menlo', 'Monaco', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.5;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background-color: #f5f5f5;
    resize: vertical;
    color: #333;
    overflow: auto;
}

/* Apply custom scrollbar to JSON editor */
.json-editor::-webkit-scrollbar {
    width: 8px;
}

.json-editor::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 8px;
}

.json-editor::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 8px;
}

.json-editor::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Firefox scrollbar for JSON editor */
.json-editor {
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}

.json-editor:focus {
    outline: none;
    border-color: var(--color-button-bg);
}

.json-validation {
    font-size: 13px;
    color: #f04747;
    margin-top: 8px;
    min-height: 20px;
}

/* File import button styles */
.file-upload-container {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
}

.file-upload-label {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 0;
}

.file-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--color-button-light-bg);
    border: none;
    border-radius: var(--border-radius-small);
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-primary);
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.file-upload-btn:hover {
    background-color: #e5e5e5;
}

.file-upload-input {
    display: none;
}

.file-upload-info {
    font-size: 12px;
    color: #888;
}

/* Text divider */
.text-divider {
    display: flex;
    align-items: center;
    margin: 15px 0;
    color: #888;
    font-size: 14px;
}

.text-divider::before,
.text-divider::after {
    content: '';
    flex-grow: 1;
    height: 1px;
    background-color: #ddd;
}

.text-divider::before {
    margin-right: 10px;
}

.text-divider::after {
    margin-left: 10px;
}