/**
 * Prime SEO - LLMs.txt Editor Styles
 *
 * @package Prime_SEO
 * @since   1.3.0
 */

/* ==========================================================================
   Base Card Styles
   ========================================================================== */

.prime-llms-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.prime-llms-body {
    padding: 24px;
}

/* ==========================================================================
   Notice Styles
   ========================================================================== */

.prime-llms-notice {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.prime-llms-notice.warning {
    background: #fef3c7;
    border: 1px solid #fde68a;
    color: #92400e;
}

.prime-llms-notice.success {
    background: #d1fae5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.prime-llms-notice.info {
    background: #dbeafe;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.prime-llms-notice .dashicons {
    flex-shrink: 0;
    margin-top: 2px;
}

/* ==========================================================================
   Textarea Styles
   ========================================================================== */

.prime-llms-textarea {
    width: 100%;
    min-height: 350px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    line-height: 1.6;
    padding: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    resize: vertical;
}

.prime-llms-textarea:focus {
    outline: none;
    border-color: #6366f1;
    background: #fff;
}

.prime-llms-textarea.readonly {
    background: #f1f5f9;
    color: #475569;
}

/* render_content uses smaller height */
.prime-llms-card .prime-llms-textarea {
    min-height: 300px;
}

/* ==========================================================================
   Button Styles
   ========================================================================== */

.prime-llms-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.prime-llms-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    border: none;
}

.prime-llms-btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
}

.prime-llms-btn-primary:hover {
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    color: #fff;
}

.prime-llms-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.prime-llms-btn-secondary {
    background: #fff;
    border: 2px solid #e2e8f0;
    color: #334155;
}

.prime-llms-btn-secondary:hover {
    border-color: #6366f1;
    color: #6366f1;
}

.prime-llms-btn-success {
    background: #10b981;
    color: #fff;
}

.prime-llms-btn-success:hover {
    background: #059669;
    color: #fff;
}

/* ==========================================================================
   Divider & Misc
   ========================================================================== */

.prime-llms-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 24px 0;
}

.prime-llms-copied {
    position: fixed;
    top: 100px;
    right: 20px;
    background: #10b981;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    display: none;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   Info Box
   ========================================================================== */

.prime-llms-info-box {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.prime-llms-info-box h4 {
    margin: 0 0 8px;
    font-size: 14px;
    color: #0369a1;
}

.prime-llms-info-box p {
    margin: 0;
    font-size: 13px;
    color: #0c4a6e;
}

.prime-llms-info-box code {
    background: #e0f2fe;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

/* ==========================================================================
   AI Card (Bots Manager, LLMs-Full Generator)
   ========================================================================== */

.prime-ai-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    margin-top: 24px;
}

.prime-ai-header {
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.prime-ai-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.prime-ai-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prime-ai-icon .dashicons {
    font-size: 22px;
    width: 22px;
    height: 22px;
    color: #fff;
}

.prime-ai-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 4px;
}

.prime-ai-header p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

.prime-ai-body {
    padding: 24px;
}

/* ==========================================================================
   Presets
   ========================================================================== */

.prime-ai-presets {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.prime-ai-preset {
    padding: 10px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.prime-ai-preset:hover {
    border-color: #6366f1;
    color: #6366f1;
}

.prime-ai-preset.active {
    border-color: #6366f1;
    background: #eef2ff;
    color: #6366f1;
}

.prime-ai-preset .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* ==========================================================================
   Bots Grid
   ========================================================================== */

.prime-ai-bots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.prime-ai-bot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.15s;
}

.prime-ai-bot:hover {
    border-color: #cbd5e1;
}

.prime-ai-bot.blocked {
    background: #fef2f2;
    border-color: #fecaca;
}

.prime-ai-bot-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.prime-ai-bot-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.prime-ai-bot-logo.openai {
    background: #10a37f;
}

.prime-ai-bot-logo.anthropic {
    background: #d97706;
}

.prime-ai-bot-logo.google {
    background: #4285f4;
}

.prime-ai-bot-logo.perplexity {
    background: #20808d;
}

.prime-ai-bot-logo.apple {
    background: #333;
}

.prime-ai-bot-logo.other {
    background: #6b7280;
}

.prime-ai-bot-details {
    min-width: 0;
}

.prime-ai-bot-name {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.prime-ai-bot-meta {
    font-size: 11px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.prime-ai-bot-type {
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 10px;
}

.prime-ai-bot-type.training {
    background: #fef3c7;
    color: #92400e;
}

.prime-ai-bot-type.search {
    background: #d1fae5;
    color: #065f46;
}

/* ==========================================================================
   Toggle Switch
   ========================================================================== */

.prime-ai-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.prime-ai-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

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

.prime-ai-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.2s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.prime-ai-toggle input:checked + .prime-ai-toggle-slider {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.prime-ai-toggle input:checked + .prime-ai-toggle-slider:before {
    transform: translateX(20px);
}

/* ==========================================================================
   Footer & Stats
   ========================================================================== */

.prime-ai-footer {
    padding: 16px 24px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.prime-ai-stats {
    font-size: 13px;
    color: #64748b;
}

.prime-ai-stats strong {
    color: #10b981;
}

.prime-ai-stats .blocked-count {
    color: #ef4444;
}

/* ==========================================================================
   LLMs-Full Options
   ========================================================================== */

.prime-llms-full-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
}

.prime-llms-full-option:hover {
    border-color: #10b981;
}

.prime-llms-full-option input {
    width: 18px;
    height: 18px;
    accent-color: #10b981;
}

.prime-llms-full-option input:checked + .dashicons {
    color: #10b981;
}

.prime-llms-full-option .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #94a3b8;
    transition: color 0.15s;
}

/* ==========================================================================
   Content Sections Options
   ========================================================================== */

.prime-llms-section-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
}

.prime-llms-section-option:hover {
    border-color: #8b5cf6;
    background: #faf5ff;
}

.prime-llms-section-option:has(input:checked) {
    border-color: #8b5cf6;
    background: #faf5ff;
}

.prime-llms-section-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #8b5cf6;
    flex-shrink: 0;
}

.prime-llms-section-option > .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #94a3b8;
    transition: color 0.15s;
    flex-shrink: 0;
}

.prime-llms-section-option:has(input:checked) > .dashicons {
    color: #8b5cf6;
}

.prime-llms-section-info {
    flex: 1;
    min-width: 0;
}

.prime-llms-section-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
}

.prime-llms-section-desc {
    display: block;
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
}

.prime-llms-section-max {
    width: 50px;
    padding: 4px 6px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 12px;
    text-align: center;
    background: #fff;
    flex-shrink: 0;
}

.prime-llms-section-max:focus {
    outline: none;
    border-color: #8b5cf6;
}

.prime-llms-section-option:has(input[type="checkbox"]:not(:checked)) .prime-llms-section-max {
    opacity: 0.5;
    pointer-events: none;
}

/* ==========================================================================
   AI Visibility Score Card
   ========================================================================== */

.prime-ai-score-card {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
    border-radius: 16px;
    padding: 28px;
    color: #fff;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.prime-ai-score-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.prime-ai-score-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.prime-ai-score-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.prime-ai-score-title h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: #fff;
}

.prime-ai-score-title .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
    opacity: 0.9;
}

.prime-ai-score-refresh {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s;
}

.prime-ai-score-refresh:hover {
    background: rgba(255, 255, 255, 0.25);
}

.prime-ai-score-main {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 28px;
}

.prime-ai-score-circle {
    position: relative;
    width: 140px;
    height: 140px;
    flex-shrink: 0;
}

.prime-ai-score-circle svg {
    transform: rotate(-90deg);
    width: 140px;
    height: 140px;
}

.prime-ai-score-circle .score-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.15);
    stroke-width: 10;
}

.prime-ai-score-circle .score-fg {
    fill: none;
    stroke-width: 10;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease, stroke 0.3s;
}

.prime-ai-score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.prime-ai-score-value .number {
    font-size: 42px;
    font-weight: 700;
    line-height: 1;
}

.prime-ai-score-value .grade {
    font-size: 14px;
    opacity: 0.8;
    margin-top: 4px;
}

.prime-ai-score-checks {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.prime-ai-check {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    transition: background 0.15s;
}

.prime-ai-check:hover {
    background: rgba(255, 255, 255, 0.12);
}

.prime-ai-check-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.prime-ai-check-icon.pass {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.prime-ai-check-icon.warning {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.prime-ai-check-icon.fail {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.prime-ai-check-icon.info {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
}

.prime-ai-check-icon .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.prime-ai-check-info {
    min-width: 0;
}

.prime-ai-check-label {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.prime-ai-check-points {
    font-size: 11px;
    opacity: 0.7;
}

.prime-ai-score-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
}

.prime-ai-score-loading .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    animation: spin 1s linear infinite;
    opacity: 0.7;
}

/* ==========================================================================
   Spin Animation
   ========================================================================== */

.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   AI Generator Card (PRO)
   ========================================================================== */

.prime-card-pro {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.prime-card-pro .prime-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
}

.prime-card-pro .prime-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.prime-card-pro .prime-card-icon .dashicons {
    font-size: 22px;
    width: 22px;
    height: 22px;
}

.prime-card-pro .prime-card-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.prime-card-pro .prime-card-header p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

.prime-card-pro .prime-card-title {
    flex: 1;
}

.prime-card-pro .prime-card-body {
    padding: 24px;
}

.prime-pro-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

.prime-field {
    margin-bottom: 20px;
}

.prime-field:last-child {
    margin-bottom: 0;
}

.prime-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.prime-field input[type="text"],
.prime-field input[type="password"],
.prime-field select {
    width: 100%;
    max-width: 400px;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.prime-field input:focus,
.prime-field select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.prime-field .description {
    font-size: 12px;
    color: #64748b;
    margin-top: 6px;
}

.prime-field-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.prime-field-row input {
    flex: 1;
}

.prime-field-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 8px;
}

.prime-field-actions .button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.prime-field-actions .button .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* API Key input with toggle */
.prime-api-key-input {
    display: flex;
    max-width: 450px;
}

.prime-api-key-input input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px 0 0 8px;
    border-right: none;
    font-size: 14px;
    font-family: monospace;
}

.prime-api-key-input input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

#prime-seo-toggle-key {
    padding: 0 14px;
    border: 1px solid #e2e8f0;
    border-radius: 0 8px 8px 0;
    background: #f8fafc;
    color: #6366f1;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

#prime-seo-toggle-key:hover {
    background: #eef2ff;
    border-color: #6366f1;
}
