/* Database List Widget Styles */
.unlockafe-database-list {
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.db-list-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.db-tables-section,
.db-fields-section,
.db-api-keys-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
}

.db-tables-section h3,
.db-fields-section h3,
.db-api-keys-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    border-bottom: 2px solid #3b82f6;
    padding-bottom: 10px;
}

.db-tables-ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.db-table-item {
    padding: 12px 15px;
    margin-bottom: 8px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.db-table-item:hover {
    background: #f3f4f6;
    border-color: #3b82f6;
    transform: translateX(5px);
}

.db-table-item strong {
    color: #111827;
    font-weight: 600;
}

.field-count {
    color: #6b7280;
    font-size: 12px;
    background: #e5e7eb;
    padding: 4px 8px;
    border-radius: 4px;
}

.fields-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.fields-table th,
.fields-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.fields-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #111827;
}

.fields-table td {
    color: #374151;
}

.fields-table tr:hover {
    background: #f9fafb;
}

.generate-api-key-btn {
    background: #3b82f6;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    margin-bottom: 15px;
    transition: background 0.2s ease;
}

.generate-api-key-btn:hover {
    background: #2563eb;
}

.api-keys-container {
    margin-top: 15px;
}

.api-key-item {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
}

.api-key-item strong {
    display: block;
    color: #111827;
    margin-bottom: 5px;
}

.api-key-value {
    font-family: 'Courier New', monospace;
    background: #1f2937;
    color: #10b981;
    padding: 8px 12px;
    border-radius: 4px;
    word-break: break-all;
    font-size: 12px;
    margin-top: 8px;
}

.copy-api-key-btn {
    background: #10b981;
    color: #ffffff;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: background 0.2s ease;
}

.copy-api-key-btn:hover {
    background: #059669;
}

.delete-api-key-btn {
    background: #ef4444;
    color: #ffffff;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    padding: 0;
}

.delete-api-key-btn:hover {
    background: #dc2626;
}

.loading-message,
.error {
    color: #6b7280;
    font-style: italic;
    padding: 20px;
    text-align: center;
}

.error {
    color: #ef4444;
}

.db-api-docs-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    grid-column: 1 / -1;
}

.db-api-docs-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    border-bottom: 2px solid #3b82f6;
    padding-bottom: 10px;
}

.api-docs-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.api-endpoint {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 15px;
}

.api-endpoint h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #3b82f6;
    font-size: 16px;
}

.api-endpoint p {
    margin: 8px 0;
    color: #374151;
    font-size: 14px;
}

.api-endpoint ul {
    margin: 8px 0;
    padding-left: 20px;
    color: #374151;
    font-size: 14px;
}

.api-endpoint ul li {
    margin: 4px 0;
}

.api-code {
    background: #1f2937;
    color: #10b981;
    padding: 12px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    overflow-x: auto;
    margin: 10px 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}
