/**
 * BaoBrain Admin Styles
 *
 * @package BaoBrain_Tracker
 */

/* Wrap */
.baobrain-admin-wrap {
    max-width: 800px;
    margin: 20px auto 0 0;
}

.baobrain-admin-wrap h1 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 23px;
    font-weight: 400;
    margin-bottom: 20px;
}

.baobrain-logo {
    width: 32px;
    height: 32px;
}

/* Cards */
.baobrain-card {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.baobrain-card h2 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 18px;
    font-weight: 600;
}

.baobrain-card h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 15px;
    font-weight: 600;
}

.baobrain-card .description {
    color: #646970;
    margin-bottom: 20px;
}

/* Connected state */
.baobrain-connected {
    border-left: 4px solid #00a32a;
}

.baobrain-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
    color: #00a32a;
}

.baobrain-status .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Badges */
.baobrain-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
}

.baobrain-badge-success {
    background: #d4edda;
    color: #155724;
}

.baobrain-badge-warning {
    background: #fff3cd;
    color: #856404;
}

.baobrain-badge-error {
    background: #f8d7da;
    color: #721c24;
}

/* Form table */
.baobrain-card .form-table {
    margin-top: 0;
}

.baobrain-card .form-table th {
    padding-left: 0;
    width: 180px;
}

.baobrain-card .form-table td {
    padding-left: 0;
}

.baobrain-card .form-table input[type="text"],
.baobrain-card .form-table input[type="password"] {
    width: 100%;
    max-width: 350px;
}

.baobrain-card .form-table code {
    background: #f0f0f1;
    padding: 4px 8px;
    border-radius: 3px;
}

.baobrain-card .form-table .required {
    color: #d63638;
}

/* Password toggle */
.baobrain-toggle-password {
    vertical-align: middle;
    margin-left: 4px;
    padding: 4px 8px;
}

.baobrain-toggle-password .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Actions */
.baobrain-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f1;
}

.baobrain-actions .button-hero {
    font-size: 15px;
    height: 46px;
    line-height: 44px;
    padding: 0 36px;
}

.baobrain-actions .button .dashicons {
    margin-left: 4px;
    font-size: 14px;
    width: 14px;
    height: 14px;
    vertical-align: text-top;
}

/* Status message */
.baobrain-status-message {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 4px;
    display: none;
}

.baobrain-status-message.success {
    display: block;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.baobrain-status-message.error {
    display: block;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.baobrain-status-message .dashicons {
    margin-right: 6px;
    vertical-align: text-top;
}

/* Help section */
.baobrain-help {
    background: #f9f9f9;
    border-color: #ddd;
}

.baobrain-help ol {
    margin: 0 0 16px 20px;
    padding: 0;
}

.baobrain-help ol li {
    margin-bottom: 8px;
    color: #50575e;
}

.baobrain-help a {
    text-decoration: none;
}

.baobrain-help a:hover {
    text-decoration: underline;
}

/* Responsive */
@media screen and (max-width: 782px) {
    .baobrain-admin-wrap {
        margin-right: 12px;
    }

    .baobrain-card {
        padding: 16px;
    }

    .baobrain-card .form-table th,
    .baobrain-card .form-table td {
        display: block;
        width: 100%;
        padding: 8px 0;
    }

    .baobrain-card .form-table th {
        padding-bottom: 4px;
    }

    .baobrain-card .form-table input[type="text"],
    .baobrain-card .form-table input[type="password"] {
        max-width: 100%;
    }

    .baobrain-actions {
        flex-direction: column;
    }

    .baobrain-actions .button {
        width: 100%;
        text-align: center;
    }
}
