/**
 * Admin styles for the plugin.
 *
 * @link       https://github.com/noteflow-ai
 * @since      1.0.0
 *
 * @package    AI_Chat_Bedrock
 * @subpackage AI_Chat_Bedrock/admin/css
 */

/* Admin settings tabs */
.ai-chat-bedrock-tabs {
    margin-top: 20px;
}

.ai-chat-bedrock-tabs .nav-tab-wrapper {
    margin-bottom: 20px;
}

/* Form styling */
.ai-chat-bedrock-form .form-table th {
    width: 200px;
}

.ai-chat-bedrock-form .form-table td {
    vertical-align: top;
}

.ai-chat-bedrock-form .description {
    font-style: italic;
    color: #666;
}

/* Range input with value display */
.ai-chat-bedrock-form input[type="range"] {
    vertical-align: middle;
    width: 200px;
}

.ai-chat-bedrock-form input[type="range"] + output {
    margin-left: 10px;
    vertical-align: middle;
}

/* Test chat interface */
.ai-chat-bedrock-test-chat {
    max-width: 800px;
    margin-top: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}

.ai-chat-bedrock-test-chat-header {
    background-color: #f9f9f9;
    padding: 10px 15px;
    border-bottom: 1px solid #ddd;
}

.ai-chat-bedrock-test-chat-messages {
    height: 400px;
    overflow-y: auto;
    padding: 15px;
    background-color: #fff;
}

.ai-chat-bedrock-test-chat-input {
    display: flex;
    border-top: 1px solid #ddd;
    padding: 10px;
    background-color: #f9f9f9;
}

.ai-chat-bedrock-test-chat-input textarea {
    flex: 1;
    min-height: 60px;
    margin-right: 10px;
    resize: vertical;
}

.ai-chat-bedrock-test-chat-input button {
    align-self: flex-end;
}

.ai-chat-bedrock-message {
    margin-bottom: 15px;
    clear: both;
}

.ai-chat-bedrock-message-user {
    float: right;
    background-color: #e3f2fd;
    border-radius: 15px 15px 0 15px;
    padding: 10px 15px;
    max-width: 70%;
}

.ai-chat-bedrock-message-assistant {
    float: left;
    background-color: #f1f1f1;
    border-radius: 15px 15px 15px 0;
    padding: 10px 15px;
    max-width: 70%;
}

/* Clearfix for messages */
.ai-chat-bedrock-message:after {
    content: "";
    display: table;
    clear: both;
}

/* Loading indicator */
.ai-chat-bedrock-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #2271b1;
    animation: ai-chat-bedrock-spin 1s ease-in-out infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes ai-chat-bedrock-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive adjustments */
@media screen and (max-width: 782px) {
    .ai-chat-bedrock-form .form-table th {
        width: 100%;
        display: block;
    }
    
    .ai-chat-bedrock-form .form-table td {
        display: block;
        padding-left: 0;
    }
    
    .ai-chat-bedrock-form input[type="range"] {
        width: 100%;
        max-width: 300px;
    }
}
/* MCP Test Page Styles */
.ai-chat-bedrock-test-chat {
    max-width: 800px;
    margin: 20px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}

.ai-chat-bedrock-test-chat-header {
    background-color: #f5f5f5;
    padding: 10px 15px;
    border-bottom: 1px solid #ddd;
}

.ai-chat-bedrock-test-chat-header h4 {
    margin: 0;
}

.ai-chat-bedrock-test-chat-messages {
    height: 400px;
    padding: 15px;
    overflow-y: auto;
    background-color: #fff;
}

.ai-chat-bedrock-test-chat-input {
    display: flex;
    padding: 10px;
    background-color: #f5f5f5;
    border-top: 1px solid #ddd;
}

.ai-chat-bedrock-test-chat-input textarea {
    flex: 1;
    min-height: 60px;
    margin-right: 10px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.ai-chat-bedrock-message {
    margin-bottom: 15px;
}

.ai-chat-bedrock-message-user,
.ai-chat-bedrock-message-assistant {
    padding: 10px 15px;
    border-radius: 5px;
    max-width: 80%;
}

.ai-chat-bedrock-message-user {
    background-color: #e3f2fd;
    margin-left: auto;
    text-align: right;
}

.ai-chat-bedrock-message-assistant {
    background-color: #f5f5f5;
    margin-right: auto;
}

.ai-chat-bedrock-loading {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #ddd;
    border-radius: 50%;
    border-top-color: #666;
    animation: ai-chat-bedrock-spin 1s linear infinite;
    margin-right: 5px;
}

@keyframes ai-chat-bedrock-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Tool usage styling */
.ai-chat-bedrock-tool-indicator {
    margin-top: 10px;
    padding: 8px;
    background-color: #f0f0f0;
    border-radius: 5px;
    font-size: 0.9em;
}

.ai-chat-bedrock-tool-name {
    font-weight: bold;
    color: #555;
}

.ai-chat-bedrock-tool-loading {
    display: inline-block;
    margin-left: 10px;
}

.ai-chat-bedrock-tool-result {
    font-size: 0.9em;
}

.ai-chat-bedrock-tool-success {
    color: #28a745;
}

.ai-chat-bedrock-tool-error {
    color: #dc3545;
}
