/**
 * StifLi Flex MCP - Custom Tools Styles
 */

.sflmcp-custom-tools-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sflmcp-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.sflmcp-header-actions h3 {
    margin: 0;
}

/* Modal Styles */
.sflmcp-modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(2px);
}

.sflmcp-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border: 1px solid #888;
    width: 60%;
    min-width: 600px;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
    border-radius: 6px;
    animation-name: slideIn;
    animation-duration: 0.3s;
}

@keyframes slideIn {
    from {transform: translateY(-50px); opacity: 0;}
    to {transform: translateY(0); opacity: 1;}
}

.sflmcp-modal-header {
    padding: 15px 20px;
    background-color: #f0f0f1;
    border-bottom: 1px solid #ddd;
    border-radius: 6px 6px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sflmcp-modal-header h2 {
    margin: 0;
    font-size: 18px;
    color: #1d2327;
}

.sflmcp-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.sflmcp-modal-close:hover,
.sflmcp-modal-close:focus {
    color: #d63638;
    text-decoration: none;
    cursor: pointer;
}

.sflmcp-modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.sflmcp-modal-footer {
    padding: 15px 20px;
    background-color: #f0f0f1;
    border-top: 1px solid #ddd;
    border-radius: 0 0 6px 6px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Form Styles */
.sflmcp-form-row {
    margin-bottom: 15px;
}

.sflmcp-form-row label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #2c3338;
}

.sflmcp-form-row input[type="text"],
.sflmcp-form-row input[type="url"],
.sflmcp-form-row textarea,
.sflmcp-form-row select {
    width: 100%;
    padding: 8px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
}

.sflmcp-form-group-inline {
    display: flex;
    gap: 15px;
}

/* Args Builder Table */
#sflmcp_args_builder {
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 10px;
    background: #f6f7f7;
}

#sflmcp_args_table th {
    font-size: 11px;
    background: #f0f0f1;
    padding: 8px;
}

#sflmcp_args_table input,
#sflmcp_args_table select {
    width: 100%;
    font-size: 12px;
}

.sflmcp-remove-arg {
    color: #d63638;
    cursor: pointer;
    text-align: center;
    font-weight: bold;
}

.sflmcp-advanced-toggle {
    margin: 10px 0;
    font-size: 12px;
}

.sflmcp-hidden {
    display: none;
}

/* Plugin Integrations tab */
.sflmcp-plugins-save-status {
    margin: 6px 0 12px;
}

.sflmcp-plugins-save-status.sflmcp-error {
    color: #b32d2e;
}

.sflmcp-plugin-card {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    margin: 12px 0;
    overflow: hidden;
}

.sflmcp-plugin-card summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    cursor: pointer;
}

.sflmcp-plugin-card summary::-webkit-details-marker {
    display: none;
}

.sflmcp-plugin-card .sflmcp-chevron {
    font-size: 14px;
    color: #646970;
    width: 14px;
    text-align: center;
}

.sflmcp-plugin-card .sflmcp-plugin-title {
    font-weight: 600;
}

.sflmcp-plugin-card .sflmcp-plugin-summary-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.sflmcp-plugin-card .sflmcp-plugin-summary-right {
    margin-left: auto;
    white-space: nowrap;
}

.sflmcp-plugin-card .sflmcp-plugin-group-checkbox {
    cursor: pointer;
    flex-shrink: 0;
}

.sflmcp-plugin-card .sflmcp-plugin-group-checkbox.sflmcp-partial {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background-color: #8a9baa;
    border: 1px solid #5f7a8e;
    border-radius: 2px;
    vertical-align: middle;
    background-image: linear-gradient(#fff, #fff);
    background-size: 55% 2px;
    background-position: center;
    background-repeat: no-repeat;
}

.sflmcp-plugin-card .sflmcp-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.sflmcp-plugin-card .sflmcp-badge {
    font-size: 11px;
    line-height: 1;
    padding: 4px 7px;
    border-radius: 999px;
    background: #eff1f2;
    color: #3c434a;
    font-weight: 600;
}

.sflmcp-plugin-card .sflmcp-badge-installed {
    background: #e8f4ff;
    color: #125e9c;
}

.sflmcp-plugin-card .sflmcp-badge-active {
    background: #e7f7eb;
    color: #1b5e20;
}

.sflmcp-plugin-card .sflmcp-badge-muted {
    background: #f6f7f7;
    color: #646970;
}

.sflmcp-plugin-card .sflmcp-badge-featured {
    background: #fff5d6;
    color: #8a5a00;
    border: 1px solid #e6c16a;
}

.sflmcp-plugin-action-btn {
    margin-left: 8px;
}

.sflmcp-plugin-body {
    border-top: 1px solid #dcdcde;
    padding: 14px;
}

.sflmcp-plugin-description {
    margin-top: 0;
}

.sflmcp-discover-wrap {
    margin-bottom: 16px;
}

.sflmcp-discover-btn {
    margin-bottom: 0;
}

.sflmcp-discover-status {
    margin-left: 10px;
}

.sflmcp-discover-status.sflmcp-success {
    color: #1b5e20;
}

.sflmcp-discover-status.sflmcp-error {
    color: #b32d2e;
}

.sflmcp-plugin-tools-table {
    border: 1px solid #dcdcde;
    border-radius: 6px;
    overflow: hidden;
}

.sflmcp-plugin-tool-row .sflmcp-tools-col-mode,
.sflmcp-plugin-tool-row .sflmcp-tools-col-tokens {
    text-align: right;
    white-space: nowrap;
}

.sflmcp-empty {
    padding: 10px 12px;
    color: #646970;
}

.sflmcp-plugins-advanced {
    margin-top: 22px;
    border: 1px solid #dcdcde;
    background: #fff;
    padding: 10px;
}

.sflmcp-plugins-advanced-summary {
    cursor: pointer;
    font-weight: 600;
}

.sflmcp-plugins-advanced-body {
    margin-top: 12px;
}
