/* Remote Database Optimizer Styles v3.2 */
.rdo-container {
    max-width: 900px;
    margin: 20px auto;
    padding: 30px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.rdo-container h2 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 30px;
}

.rdo-container h3, .rdo-container h4 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.rdo-warning-box {
    background-color: #fffbe6;
    border: 1px solid #ffe58f;
    border-left: 5px solid #ffc107;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 6px;
}

.rdo-warning-box h3 {
    color: #856404;
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 15px;
}

.rdo-warning-box ul { margin: 0; padding-left: 20px; }
.rdo-warning-box li { margin-bottom: 8px; }

.rdo-instructions {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 6px;
}

/* --- CORRECTED Inline Form Styling --- */
.rdo-add-site-form {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 30px;
    border: 1px solid #e9ecef;
}

.rdo-add-site-form form {
    display: flex;
    flex-wrap: nowrap; /* Prevents wrapping on most screen sizes */
    flex-direction: row;
    gap: 0;
}

/* This handles wrapping gracefully on very small mobile screens */
@media (max-width: 600px) {
    .rdo-add-site-form form {
        flex-wrap: wrap;
    }
    .rdo-add-site-form input, .rdo-add-site-form button {
        flex-basis: 100%;
        border-radius: 6px !important;
        border: 1px solid #ccc !important;
        margin-bottom: 10px;
    }
}

.rdo-add-site-form input {
    flex-grow: 1;
    min-width: 200px;
    padding: 12px;
    border: 1px solid #ccc;
    border-right: none;
    font-size: 14px;
    margin: 0;
}

.rdo-add-site-form input:focus {
    outline: 2px solid #4632da !important;
    outline-offset: -1px;
    z-index: 2;
}

.rdo-add-site-form input:first-of-type {
    border-radius: 6px 0 0 6px;
}

.rdo-add-site-form button {
    padding: 12px 25px;
    background-color: #4632da;
    color: white;
    border: none;
    border-radius: 0 6px 6px 0;
    font-size: 14px;
    cursor: pointer;
    margin: 0;
    white-space: nowrap;
}

#rdo-form-feedback { margin-top: 15px; font-weight: 500; }

/* Connected Sites List */
.rdo-sites-list { margin-top: 30px; }
.rdo-site-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 15px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.rdo-site-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}
.rdo-site-url { font-size: 16px; font-weight: bold; word-break: break-all; }
.rdo-site-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* --- CORRECTED Button Styling --- */
.rdo-task-btn {
    padding: 8px 12px;
    border: 1px solid #2271b1;
    background-color: #2271b1; /* WordPress Admin Blue */
    color: #fff; /* White text */
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
}

.rdo-task-btn:hover {
    background-color: #1d6199;
    border-color: #1d6199;
}

.rdo-delete-btn {
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.rdo-delete-btn:hover {
    background-color: #f4c2c7;
}

.rdo-task-btn:disabled, .rdo-delete-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.rdo-site-feedback {
    margin-top: 15px;
    padding: 12px;
    border-radius: 5px;
    display: none;
}
.rdo-site-feedback.success { background-color: #d4edda; color: #155724; }
.rdo-site-feedback.error { background-color: #f8d7da; color: #721c24; }