/* Ayzeo GEO + SEO Plugin Admin Styles */

/* Main Layout */
.ayzeo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

.ayzeo-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ayzeo-logo img {
    vertical-align: middle;
}

.ayzeo-logo h1 {
    margin: 0;
    color: #23282d;
    font-size: 24px;
    font-weight: 600;
}

.ayzeo-header-actions .button {
    margin-left: 10px;
}

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

.ayzeo-card h2 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #1d2327;
    font-size: 18px;
    font-weight: 600;
}

.ayzeo-card h3 {
    margin-bottom: 10px;
    color: #1d2327;
    font-size: 16px;
    font-weight: 500;
}

/* Dashboard Content */
.ayzeo-dashboard-content {
    display: grid;
    gap: 20px;
}

.ayzeo-quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.ayzeo-recent-results {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 1024px) {
    .ayzeo-quick-actions,
    .ayzeo-recent-results {
        grid-template-columns: 1fr;
    }
}

/* Forms */
.ayzeo-action-form {
    margin-top: 15px;
}

.ayzeo-action-form .form-group {
    margin-bottom: 15px;
}

.ayzeo-action-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #1d2327;
}

.ayzeo-action-form .regular-text {
    width: 100%;
    max-width: 400px;
}

.ayzeo-action-form .description {
    margin-top: 5px;
    color: #646970;
    font-size: 13px;
}

/* Loading States */
.ayzeo-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    color: #646970;
    font-style: italic;
}

.ayzeo-loading .spinner {
    float: none;
    margin: 0;
}

/* Results */
.ayzeo-result {
    margin-top: 20px;
    padding: 15px;
    background: #f6f7f7;
    border-left: 4px solid #00a32a;
    border-radius: 0 4px 4px 0;
}

.ayzeo-results-list {
    margin-top: 15px;
}

.ayzeo-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f1;
}

.ayzeo-result-item:last-child {
    border-bottom: none;
}

.result-info {
    flex: 1;
}

.result-url,
.result-query {
    margin-bottom: 5px;
}

.result-meta {
    display: flex;
    gap: 15px;
    color: #646970;
    font-size: 13px;
}

.result-meta .score {
    font-weight: 600;
    color: #00a32a;
}

.result-meta .status {
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 600;
}

.status-completed {
    background: #d4edda;
    color: #155724;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-failed {
    background: #f8d7da;
    color: #721c24;
}

.result-actions {
    display: flex;
    gap: 8px;
}

.no-results {
    text-align: center;
    color: #646970;
    font-style: italic;
    padding: 20px;
}

/* Modals */
.ayzeo-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ayzeo-modal-content {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    max-width: 95vw;
    max-height: 95vh;
    width: 1200px;
    min-height: 700px;
    overflow: hidden;
}

.ayzeo-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #ddd;
    background: #f9f9f9;
}

.ayzeo-modal-header h3 {
    margin: 0;
    color: #1d2327;
}

.ayzeo-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #646970;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ayzeo-modal-close:hover {
    color: #d63638;
}

.ayzeo-modal-body {
    padding: 20px;
    max-height: 80vh;
    overflow-y: auto;
}

.ayzeo-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #ddd;
    background: #f9f9f9;
    text-align: right;
}

/* Tabs */
.ayzeo-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.ayzeo-tab-button {
    padding: 10px 15px;
    background: none;
    border: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    color: #646970;
}

.ayzeo-tab-button:hover {
    color: #1d2327;
}

.ayzeo-tab-button.active {
    color: #0073aa;
    border-bottom-color: #0073aa;
}

.tab-panel {
    display: none;
}

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

.tab-panel textarea {
    width: 100%;
    height: 500px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    margin-bottom: 10px;
}

.tab-panel iframe {
    width: 100%;
    height: 500px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Rendered content styling */
.ayzeo-rendered-content {
    max-height: 500px;
    overflow-y: auto;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
    line-height: 1.6;
}

.ayzeo-rendered-content h1,
.ayzeo-rendered-content h2,
.ayzeo-rendered-content h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #1d2327;
}

.ayzeo-rendered-content h1 {
    font-size: 20px;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 5px;
}

.ayzeo-rendered-content h2 {
    font-size: 18px;
    color: #0073aa;
}

.ayzeo-rendered-content h3 {
    font-size: 16px;
    color: #135e96;
}

.ayzeo-rendered-content p {
    margin-bottom: 10px;
}

.ayzeo-rendered-content ul,
.ayzeo-rendered-content ol {
    margin: 10px 0;
    padding-left: 20px;
}

.ayzeo-rendered-content li {
    margin-bottom: 5px;
}

.ayzeo-rendered-content a {
    color: #0073aa;
    text-decoration: none;
}

.ayzeo-rendered-content a:hover {
    text-decoration: underline;
}

.ayzeo-rendered-content strong {
    font-weight: 600;
}

.ayzeo-rendered-content code {
    background: #f1f1f1;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
}

.ayzeo-rendered-content blockquote {
    border-left: 4px solid #0073aa;
    margin: 10px 0;
    padding: 10px 15px;
    background: #f0f6fc;
    font-style: italic;
}

.no-content {
    color: #646970;
    font-style: italic;
    text-align: center;
    padding: 20px;
    margin: 0;
}

/* Settings Page */
.ayzeo-settings-content {
    max-width: 800px;
}

.ayzeo-token-field {
    position: relative;
}

.ayzeo-token-field #ayzeo_api_token {
    margin-right: 10px;
}

.ayzeo-status-message {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 4px;
    display: none;
}

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

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

.ayzeo-form-actions {
    margin-top: 20px;
}

/* Project Info Display */
.ayzeo-project-info {
    background: #f0f6fc;
    border: 1px solid #0969da;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 20px;
}

.ayzeo-project-info h3 {
    margin-top: 0;
    margin-bottom: 12px;
    color: #0969da;
    font-size: 16px;
    font-weight: 600;
}

.ayzeo-project-info .form-table {
    margin-bottom: 0;
}

.ayzeo-project-info .form-table th {
    padding-left: 0;
    font-weight: 600;
    color: #1d2327;
    width: 150px;
}

.ayzeo-project-info .form-table td {
    padding-left: 0;
}

.ayzeo-project-info code {
    background: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid #d1d9e0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
}

/* Setup Guide */
.ayzeo-setup-guide {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.ayzeo-setup-guide h2 {
    color: #fff;
}

.ayzeo-steps {
    display: grid;
    gap: 20px;
}

.ayzeo-step {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
}

.step-number {
    width: 30px;
    height: 30px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.step-content h3 {
    margin-top: 0;
    margin-bottom: 5px;
    color: #fff;
}

.step-content p {
    margin-bottom: 10px;
    opacity: 0.9;
}

/* Content Generator */
.ayzeo-content-generator {
    display: grid;
    gap: 20px;
}

.ayzeo-content-list {
    margin-top: 15px;
}

.ayzeo-content-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f1;
}

.ayzeo-content-item:last-child {
    border-bottom: none;
}

.content-info {
    flex: 1;
}

.content-query {
    margin-bottom: 5px;
}

.content-meta {
    color: #646970;
    font-size: 13px;
}

.content-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Help Page */
.ayzeo-help-content {
    display: grid;
    gap: 20px;
    max-width: 1000px;
}

.ayzeo-about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    align-items: start;
}

.about-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (max-width: 768px) {
    .ayzeo-about-content {
        grid-template-columns: 1fr;
    }
    
    .about-links {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

/* Responsive Design */
@media (max-width: 782px) {
    .ayzeo-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .ayzeo-result-item,
    .ayzeo-content-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .result-actions,
    .content-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .ayzeo-modal-content {
        width: 95vw;
        margin: 10px;
    }
}

/* Utility Classes */
.ayzeo-text-center {
    text-align: center;
}

.ayzeo-text-muted {
    color: #646970;
}

.ayzeo-mb-0 {
    margin-bottom: 0;
}

.ayzeo-mt-20 {
    margin-top: 20px;
}

/* Copy to Clipboard */
.copy-to-clipboard {
    position: relative;
}

.copy-to-clipboard.copied::after {
    content: "Copied!";
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #1d2327;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
}

/* WordPress Admin Overrides */
.ayzeo-card .button-primary {
    background: #2271b1;
    border-color: #2271b1;
}

.ayzeo-card .button-primary:hover {
    background: #135e96;
    border-color: #135e96;
}

/* Loading Animation */
@keyframes ayzeo-pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.ayzeo-loading {
    animation: ayzeo-pulse 1.5s ease-in-out infinite;
} 