/* AI Scrape Protect - Admin Styles */

.aisp-wrap {
    max-width: 900px;
}

.aisp-version {
    color: #646970;
    margin-top: -8px;
}

/* Feedback notice */
.aisp-feedback {
    margin: 12px 0;
}

/* Cards */
.aisp-card {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 20px 24px;
    margin-top: 20px;
}

.aisp-card h2 {
    margin-top: 0;
    padding-top: 0;
    font-size: 1.1em;
}

/* Toggle rows */
.aisp-toggle-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f1;
}

.aisp-toggle-row:last-of-type {
    border-bottom: none;
}

.aisp-toggle-primary {
    font-weight: 600;
    font-size: 1.05em;
    padding-bottom: 12px;
    margin-bottom: 4px;
}

.aisp-toggle-sub {
    padding-left: 32px;
}

.aisp-toggle-label {
    flex: 1;
}

/* Switch */
.aisp-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.aisp-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.aisp-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #c3c4c7;
    border-radius: 24px;
    transition: background-color 0.2s;
}

.aisp-slider::before {
    position: absolute;
    content: '';
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}

.aisp-switch input:checked + .aisp-slider {
    background-color: #2271b1;
}

.aisp-switch input:checked + .aisp-slider::before {
    transform: translateX(20px);
}

/* Actions */
.aisp-actions {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f1;
}

/* Tabs */
.aisp-tab-nav {
    display: flex;
    gap: 2px;
    border-bottom: 2px solid #c3c4c7;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.aisp-tab-btn {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 13px;
    color: #646970;
    margin-bottom: -2px;
    border-radius: 4px 4px 0 0;
    transition: color 0.15s;
}

.aisp-tab-btn:hover {
    color: #2271b1;
}

.aisp-tab-btn.active {
    color: #1d2327;
    border-bottom-color: #2271b1;
    font-weight: 600;
}

.aisp-tab-panel {
    display: none;
}

.aisp-tab-panel.active {
    display: block;
}

/* Group toggle */
.aisp-group-toggle-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0 16px;
    border-bottom: 2px solid #f0f0f1;
    margin-bottom: 8px;
    font-weight: 600;
}

/* Bot rows */
.aisp-bot-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid #f6f7f7;
}

.aisp-bot-row:last-child {
    border-bottom: none;
}

.aisp-bot-always-allowed {
    opacity: 0.7;
}

.aisp-bot-info {
    flex: 1;
    min-width: 0;
}

.aisp-bot-info strong {
    display: block;
    margin-bottom: 2px;
}

.aisp-bot-company {
    display: inline-block;
    font-size: 11px;
    color: #646970;
    background: #f6f7f7;
    border-radius: 3px;
    padding: 1px 6px;
    margin-bottom: 4px;
}

.aisp-user-agent {
    display: inline-block;
    font-size: 11px;
    color: #1d2327;
    background: #f0f0f1;
    border-radius: 3px;
    padding: 1px 6px;
    margin: 2px 0 4px;
}

.aisp-bot-info .description {
    margin: 4px 0 0;
    font-size: 12px;
    color: #646970;
}

.aisp-always-allowed-badge {
    font-size: 11px;
    background: #edfaef;
    color: #1a7a1a;
    border: 1px solid #b8e6b8;
    border-radius: 3px;
    padding: 2px 8px;
    white-space: nowrap;
    flex-shrink: 0;
    align-self: center;
}

/* Custom bots tab */
.aisp-custom-add-row {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    align-items: center;
}

.aisp-custom-bot-row {
    justify-content: space-between;
    align-items: center;
}

.aisp-no-custom-bots {
    color: #646970;
    font-style: italic;
}

/* Admin bar icon */
#wp-admin-bar-ai-scrape-protect-icon .aisp-admin-bar-icon {
    height: 18px;
    width: 18px;
    vertical-align: middle;
    margin-top: -2px;
}

/* Notice */
.aisp-notice {
    margin-top: 16px;
}

/* Promo block */
.aisp-promo {
    margin-top: 20px;
    border: none;
    background: linear-gradient(135deg, #0a3d6b 0%, #1a1a2e 100%);
    padding: 0;
    overflow: hidden;
}

.aisp-promo-inner {
    display: flex;
    align-items: center;
    gap: 0;
}

.aisp-promo-text {
    flex: 1;
    padding: 20px 24px;
}

.aisp-promo-text p {
    margin: 0 0 8px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    line-height: 1.6;
}

.aisp-promo-text p:last-child {
    margin-bottom: 0;
}

.aisp-promo-text a {
    color: #29abe2;
    font-weight: 600;
    text-decoration: none;
}

.aisp-promo-text a:hover {
    color: #fff;
    text-decoration: none;
}

.aisp-promo-logo {
    flex-shrink: 0;
    padding: 20px 24px;
    border-left: 1px solid rgba(255,255,255,0.08);
}

.aisp-promo-logo img {
    height: auto;
    width: auto;
    max-height: 40px;
    max-width: 200px;
    display: block;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.aisp-promo-logo img:hover {
    opacity: 1;
}
