/* MCP API Explorer specific CSS */

/* Stepper component */
.mcp-stepper {
    margin-bottom: 2rem;
}

.stepper-nav {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.stepper-nav::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    z-index: 1;
}

.step-button {
    flex: 1;
    text-align: center;
    padding: 1rem 0.5rem;
    font-weight: 600;
    color: var(--text-light);
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.step-button.active {
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
}

.step-button:hover:not(.active) {
    color: var(--text-color);
    background-color: var(--light-color);
}

.step-content {
    display: none;
    padding: 1rem 0;
}

.step-content.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

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

/* Step actions */
.step-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

/* Form styling */
.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.form-check input[type="checkbox"] {
    margin-right: 0.5rem;
}

.form-check small {
    display: block;
    margin-left: 1.5rem;
    color: var(--text-light);
    font-size: 0.85rem;
}

small {
    display: block;
    color: var(--text-light);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Messages section */
.messages-container {
    margin-bottom: 1.5rem;
}

.messages-list {
    margin-bottom: 1rem;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    background-color: var(--light-color);
}

.message-item {
    margin-bottom: 1rem;
    border-radius: var(--radius-sm);
    padding: 1rem;
    position: relative;
}

.message-item:last-child {
    margin-bottom: 0;
}

.message-item.system {
    background-color: rgba(52, 53, 65, 0.05);
    border-left: 3px solid #343541;
}

.message-item.user {
    background-color: rgba(16, 163, 127, 0.05);
    border-left: 3px solid var(--primary-color);
}

.message-item.assistant {
    background-color: rgba(110, 123, 242, 0.05);
    border-left: 3px solid var(--secondary-color);
}

.message-role {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.message-content {
    width: 100%;
    min-height: 60px;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    resize: vertical;
}

.remove-message {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-light);
    cursor: pointer;
    transition: color 0.2s ease;
}

.remove-message:hover {
    color: #dc2626;
}

.message-controls {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
}

/* Context section */
.context-container {
    margin-bottom: 1.5rem;
}

.context-list {
    margin-bottom: 1rem;
}

.context-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1rem;
    background-color: var(--light-color);
    position: relative;
}

.context-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.context-item-title {
    font-weight: 600;
    color: var(--text-color);
}

.context-item-controls {
    display: flex;
    gap: 0.5rem;
}

.context-type-select {
    margin-bottom: 1rem;
}

.content-input {
    width: 100%;
    min-height: 80px;
}

/* Response section */
.response-container {
    margin-top: 2rem;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--light-color);
}

.response-container h4 {
    margin-bottom: 1rem;
}

.response-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.tab-button {
    padding: 0.5rem 1rem;
    background: none;
    border: none;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
}

.tab-button.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.tab-button:hover:not(.active) {
    color: var(--text-color);
}

.response-tab-content {
    display: none;
}

.response-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.response-area {
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.code-preview {
    font-family: monospace;
    white-space: pre-wrap;
    word-break: break-word;
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid #e9ecef;
    max-height: 300px;
    overflow-y: auto;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
}

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

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

.btn-secondary:hover {
    background-color: var(--light-color);
}

.request-summary {
    margin-bottom: 1.5rem;
}

.request-summary h4 {
    margin-bottom: 0.5rem;
}

/* MCP Documentation section */
.mcp-docs {
    margin-top: 3rem;
    padding: 1.5rem;
    background-color: rgba(110, 123, 242, 0.05);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--secondary-color);
}

.mcp-docs h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.mcp-docs p {
    margin-bottom: 1rem;
}

.mcp-docs a {
    color: var(--secondary-color);
    font-weight: 500;
    text-decoration: none;
}

.mcp-docs a:hover {
    text-decoration: underline;
}

/* Loading indicator */
.loading {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    border: 3px solid rgba(16, 163, 127, 0.2);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

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

.hidden {
    display: none !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .stepper-nav {
        flex-direction: column;
        border-bottom: none;
    }
    
    .step-button {
        text-align: left;
        padding: 0.75rem;
        border-left: 3px solid transparent;
        border-bottom: 1px solid var(--border-color);
    }
    
    .step-button.active {
        border-left: 3px solid var(--primary-color);
        border-bottom: 1px solid var(--border-color);
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .step-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .response-tabs {
        flex-wrap: wrap;
    }
    
    .message-controls {
        flex-wrap: wrap;
    }
}