/* AI Bot Tester Plugin Styles */

.ai-bot-tester-wrapper {
    --primary-color: #011E49;
    --primary-hover: #012a5e;
    --success-color: #62FA22;
    --error-color: #ef4444;
    --warning-color: #FF7F41;
    --cta-color: #FF7F41;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #011E49;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);

    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    background: #ffffff;
    padding: 2rem 0.5rem;
    margin: 0;
}

.ai-bot-tester-wrapper * {
    box-sizing: border-box;
}

.ai-bot-tester-wrapper .ai-bot-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem 0;
}

/* Card */
.ai-bot-tester-wrapper .ai-bot-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    margin-bottom: 2rem;
    overflow: hidden;
}

/* Input Section */
.ai-bot-tester-wrapper .ai-bot-input-section {
    margin-bottom: 2rem;
}

.ai-bot-tester-wrapper .ai-bot-input-section label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.ai-bot-tester-wrapper .ai-bot-input-group {
    display: flex;
    gap: 1rem;
}

.ai-bot-tester-wrapper .ai-bot-url-input {
    flex: 1;
    padding: 0.875rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
}

.ai-bot-tester-wrapper .ai-bot-url-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(1, 30, 73, 0.1);
}

/* Button */
.ai-bot-tester-wrapper .ai-bot-btn-primary {
    padding: 0.875rem 2rem;
    background: var(--cta-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    min-width: 120px;
}

.ai-bot-tester-wrapper .ai-bot-btn-primary:hover:not(:disabled) {
    background: #e66f37;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.ai-bot-tester-wrapper .ai-bot-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Spinner */
.ai-bot-tester-wrapper .ai-bot-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: ai-bot-spin 0.8s linear infinite;
}

@keyframes ai-bot-spin {
    to { transform: rotate(360deg); }
}

/* Progress Bar */
.ai-bot-tester-wrapper .ai-bot-progress-container {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--bg-color);
    border-radius: 8px;
    border-left: 4px solid var(--cta-color);
}

.ai-bot-tester-wrapper .ai-bot-progress-bar-wrapper {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.ai-bot-tester-wrapper .ai-bot-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--cta-color), var(--warning-color));
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.ai-bot-tester-wrapper .ai-bot-progress-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-align: center;
}

/* Results Container */
.ai-bot-tester-wrapper .ai-bot-results-container {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.ai-bot-tester-wrapper .ai-bot-results-container h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.ai-bot-tester-wrapper .ai-bot-tested-url {
    background: var(--bg-color);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    word-break: break-all;
    max-width: 100%;
    overflow: hidden;
}

/* Results Grid */
.ai-bot-tester-wrapper .ai-bot-results-grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.ai-bot-tester-wrapper .ai-bot-result-item {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    transition: all 0.2s;
    max-width: 100%;
    overflow: hidden;
}

.ai-bot-tester-wrapper .ai-bot-result-item:hover {
    box-shadow: var(--shadow-sm);
}

.ai-bot-tester-wrapper .ai-bot-result-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.ai-bot-tester-wrapper .ai-bot-result-right {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: stretch;
    max-width: 100%;
    overflow: hidden;
}

.ai-bot-tester-wrapper .ai-bot-result-status-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    align-self: flex-end;
}

.ai-bot-tester-wrapper .ai-bot-result-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    min-width: 95px;
    text-align: right;
}

.ai-bot-tester-wrapper .ai-bot-result-icon {
    font-size: 1.5rem;
}

.ai-bot-tester-wrapper .ai-bot-result-info h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.125rem;
    margin-top: 0;
}

.ai-bot-tester-wrapper .ai-bot-result-info p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

.ai-bot-tester-wrapper .ai-bot-result-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    flex-wrap: wrap;
}

.ai-bot-tester-wrapper .ai-bot-result-status > span {
    white-space: nowrap;
}

.ai-bot-tester-wrapper .ai-bot-status-success {
    color: var(--success-color);
}

.ai-bot-tester-wrapper .ai-bot-status-error {
    color: var(--error-color);
}

.ai-bot-tester-wrapper .ai-bot-status-grey {
    color: #94a3b8;
}

.ai-bot-tester-wrapper .ai-bot-status-code {
    font-size: 0.875rem;
    padding: 0.25rem 0.75rem;
    background: var(--card-bg);
    border-radius: 4px;
    color: var(--text-secondary);
}

/* Summary */
.ai-bot-tester-wrapper .ai-bot-summary {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    max-width: 100%;
    overflow: hidden;
}

.ai-bot-tester-wrapper .ai-bot-summary h4 {
    margin-bottom: 0.75rem;
    margin-top: 0;
    color: var(--text-primary);
}

.ai-bot-tester-wrapper .ai-bot-summary-stats {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.ai-bot-tester-wrapper .ai-bot-summary-stats div {
    margin-bottom: 0.5rem;
}

.ai-bot-tester-wrapper .ai-bot-blocked-bots {
    margin-top: 1rem;
}

.ai-bot-tester-wrapper .ai-bot-blocked-bots h5 {
    margin-bottom: 0.5rem;
    margin-top: 0;
    color: var(--error-color);
}

.ai-bot-tester-wrapper .ai-bot-blocked-bots ul {
    list-style: none;
    padding-left: 1rem;
    margin: 0;
}

.ai-bot-tester-wrapper .ai-bot-blocked-bots li::before {
    content: "• ";
    color: var(--error-color);
    font-weight: bold;
    margin-right: 0.5rem;
}

.ai-bot-tester-wrapper .ai-bot-success-message {
    color: var(--success-color);
    font-weight: 600;
}

/* Error Container */
.ai-bot-tester-wrapper .ai-bot-error-container {
    margin-top: 2rem;
}

.ai-bot-tester-wrapper .ai-bot-error-message {
    background: #fee2e2;
    border: 2px solid var(--error-color);
    color: #991b1b;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
}

/* Info Section */
.ai-bot-tester-wrapper .ai-bot-info-section {
    background: var(--bg-color);
    border-left: 4px solid var(--primary-color);
    padding: 1rem 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    max-width: 100%;
    overflow: hidden;
}

.ai-bot-tester-wrapper .ai-bot-info-section h4 {
    margin: 0 0 0.75rem 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ai-bot-tester-wrapper .ai-bot-bots-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ai-bot-tester-wrapper .ai-bot-bot-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.ai-bot-tester-wrapper .ai-bot-bot-name {
    font-weight: 600;
}

.ai-bot-tester-wrapper .ai-bot-bot-provider {
    color: var(--text-secondary);
    font-size: 0.8125rem;
}

.ai-bot-tester-wrapper .ai-bot-bot-separator {
    color: var(--border-color);
}

/* Traffic Light Status - Yellow Warning */
.ai-bot-tester-wrapper .ai-bot-status-warning {
    color: #d97706;  /* Orange/Yellow for warnings */
}

/* Details Toggle Button */
.ai-bot-tester-wrapper .ai-bot-details-toggle {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    margin-left: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s;
    text-decoration: underline;
}

.ai-bot-tester-wrapper .ai-bot-details-toggle:hover {
    background: var(--card-bg);
    text-decoration: none;
}

/* robots.txt Hint Text */
.ai-bot-tester-wrapper .ai-bot-robots-hint {
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Details Content */
/* ROLLBACK: To add grey box back, uncomment background/border in .ai-bot-details-inner */
.ai-bot-tester-wrapper .ai-bot-details-content {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--border-color);
    animation: ai-bot-slide-down 0.3s ease-out;
    max-width: 100%;
    overflow: hidden;
}

@keyframes ai-bot-slide-down {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ai-bot-tester-wrapper .ai-bot-details-inner {
    /* Grey box removed - only text now */
    /* background: var(--card-bg); */
    /* border: 1px solid var(--border-color); */
    /* border-radius: 8px; */
    padding: 0.5rem 0;
}

.ai-bot-tester-wrapper .ai-bot-detail-title {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.ai-bot-tester-wrapper .ai-bot-detail-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
}

.ai-bot-tester-wrapper .ai-bot-detail-list li {
    padding: 0.375rem 0;
    border-bottom: 1px solid var(--border-color);
}

.ai-bot-tester-wrapper .ai-bot-detail-list li:last-child {
    border-bottom: none;
}

.ai-bot-tester-wrapper .ai-bot-detail-list code {
    background: var(--bg-color);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: 'Courier New', monospace;
}

.ai-bot-tester-wrapper .ai-bot-detail-note {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 1rem;
    padding: 0.75rem;
    background: var(--bg-color);
    border-radius: 6px;
    border-left: 3px solid var(--warning-color);
}

/* Wildcards Section */
.ai-bot-tester-wrapper .ai-bot-wildcards {
    margin-top: 1.5rem;
}

.ai-bot-tester-wrapper .ai-bot-wildcards h5 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--warning-color);
}

.ai-bot-tester-wrapper .ai-bot-wildcards ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ai-bot-tester-wrapper .ai-bot-wildcards li {
    padding: 0.5rem 0.75rem;
    background: #fff3cd;
    border-left: 3px solid var(--warning-color);
    margin-bottom: 0.5rem;
    border-radius: 4px;
}

.ai-bot-tester-wrapper .ai-bot-wildcards code {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: var(--text-primary);
}

/* Browser Warning Box - Dezentes Design */
.ai-bot-tester-wrapper .ai-bot-browser-warning {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    border-left: 4px solid;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    line-height: 1.5;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.ai-bot-tester-wrapper .ai-bot-browser-warning.bot-blocked {
    border-left-color: var(--warning-color);
}

.ai-bot-tester-wrapper .ai-bot-browser-warning.url-not-found {
    border-left-color: var(--error-color);
}

.ai-bot-tester-wrapper .ai-bot-browser-warning.waf-blocked {
    border-left-color: #6c757d;
}

.ai-bot-tester-wrapper .ai-bot-browser-warning.server-error {
    border-left-color: var(--error-color);
}

.ai-bot-tester-wrapper .ai-bot-browser-warning .warning-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.ai-bot-tester-wrapper .ai-bot-browser-warning .warning-text {
    color: var(--text-primary);
    flex: 1;
}

.ai-bot-tester-wrapper .ai-bot-browser-warning .warning-text strong {
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ai-bot-tester-wrapper .ai-bot-card {
        padding: 1.5rem;
    }

    .ai-bot-tester-wrapper .ai-bot-input-group {
        flex-direction: column;
    }

    .ai-bot-tester-wrapper .ai-bot-btn-primary {
        width: 100%;
    }

    .ai-bot-tester-wrapper .ai-bot-result-item {
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 1rem;
    }

    .ai-bot-tester-wrapper .ai-bot-result-right {
        width: 100%;
        align-items: flex-start;
    }

    .ai-bot-tester-wrapper .ai-bot-result-status-group {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .ai-bot-tester-wrapper .ai-bot-result-label {
        text-align: left;
        min-width: auto;
    }

    .ai-bot-tester-wrapper .ai-bot-result-status {
        width: 100%;
    }

    .ai-bot-tester-wrapper .ai-bot-robots-hint {
        margin-top: 0.25rem;
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .ai-bot-tester-wrapper .ai-bot-card {
        padding: 1rem;
    }
}
