/* Base Styles */
.wrap {
    margin-right: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.wrap h1 {
    font-size: 23px;
    font-weight: 400;
    margin: 0 0 20px 0;
    padding: 9px 0 4px 0;
    line-height: 1.3;
}

.section-title {
    font-size: 18px;
    font-weight: 400;
    margin: 30px 0 15px 0;
    color: #1d2327;
}

.description {
    color: #646970;
    font-size: 13px;
    margin: 8px 0 0 0;
}

/* Usage Stats Card */
.usage-stats-card {
    background: white;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f1;
}

.stats-header h2 {
    font-size: 16px;
    font-weight: 500;
    margin: 0;
    color: #1d2327;
}

.reset-info {
    font-size: 13px;
    color: #646970;
}

.stats-content {
    display: flex;
    gap: 30px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 12px;
    color: #646970;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 20px;
    font-weight: 500;
    color: #1d2327;
}

.stat-value.depleted {
    color: #dc3232;
}

.upgrade-prompt {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f1;
}

.upgrade-prompt p {
    margin: 0;
    font-size: 13px;
    color: #646970;
}

.upgrade-link {
    color: #2271b1;
    text-decoration: none;
    font-weight: 500;
}

.upgrade-link:hover {
    color: #135e96;
}

/* Test Section */
.test-section {
    background: white;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
}

/* Filters Section */
.filters-toggle {
    background: white;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 15px 20px;
    margin-bottom: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.filters-toggle:hover {
    background: #f6f7f7;
}

.filters-toggle-text {
    font-size: 14px;
    font-weight: 500;
    color: #1d2327;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filters-toggle-icon {
    font-size: 18px;
    transition: transform 0.2s;
}

.filters-toggle.active .filters-toggle-icon {
    transform: rotate(180deg);
}

.filters-section {
    background: white;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
}

.filters-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.search-box {
    display: flex;
    gap: 10px;
}

.search-input {
    flex: 1;
    max-width: 400px;
    padding: 6px 12px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    font-size: 13px;
}

.filter-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 6px 12px;
    background: #f6f7f7;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    color: #2c3338;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: #f0f0f1;
}

.filter-btn.active {
    background: #2271b1;
    color: white;
    border-color: #2271b1;
}

.filter-btn .count {
    opacity: 0.7;
}

.active-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #646970;
    flex-wrap: wrap;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #f0f0f1;
    border-radius: 3px;
    font-size: 12px;
}

.filter-tag a {
    color: #646970;
    text-decoration: none;
    font-weight: bold;
    margin-left: 4px;
}

.filter-tag a:hover {
    color: #dc3232;
}

.clear-filters {
    color: #dc3232;
    text-decoration: none;
    font-size: 12px;
    margin-left: 8px;
}

.clear-filters:hover {
    text-decoration: underline;
}

/* No Errors */
.no-errors {
    background: white;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 40px;
    text-align: center;
}

.no-errors p {
    margin: 0;
    font-size: 14px;
    color: #646970;
}

/* Errors Container */
.errors-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Error Card */
.error-card {
    background: white;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 16px;
    transition: box-shadow 0.2s;
}

.error-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.error-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.error-badges {
    display: flex;
    gap: 8px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-severity {
    background: #f0f0f1;
    color: #646970;
}

.badge-critical {
    background: #dc3232;
    color: white;
}

.badge-error {
    background: #dc3232;
    color: white;
}

.badge-warning {
    background: #dba617;
    color: white;
}

.badge-category {
    background: #f0f0f1;
    color: #646970;
}

/* Error Message */
.error-message {
    color: #1d2327;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
    word-break: break-word;
}

/* Error Meta */
.error-meta {
    display: flex;
    gap: 15px;
    align-items: center;
    font-size: 13px;
    color: #646970;
    padding-top: 12px;
    border-top: 1px solid #f0f0f1;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.meta-item .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Buttons */
.btn-analyze {
    background: #2271b1;
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 3px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-analyze:hover {
    background: #135e96;
}

.btn-copy {
    background: transparent;
    border: none;
    color: #2271b1;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 3px;
    margin-left: auto;
}

.btn-copy:hover {
    background: #f6f7f7;
}

.btn-copy .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.status-analyzed {
    background: #00a32a;
    color: white;
    padding: 6px 14px;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 500;
}

/* Resolve Button */
.btn-resolve {
    background: transparent;
    border: 1px solid #c3c4c7;
    color: #646970;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    transition: all 0.2s;
}

.btn-resolve:hover {
    background: #00a32a;
    color: white;
    border-color: #00a32a;
}

.btn-resolve .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.error-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* AI Section */
.ai-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f1;
}

.ai-toggle {
    background: none;
    border: none;
    padding: 8px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #2271b1;
    font-size: 13px;
    font-weight: 500;
    width: 100%;
    text-align: left;
}

.ai-toggle:hover {
    color: #135e96;
}

.toggle-icon {
    font-size: 16px;
    width: 16px;
    height: 16px;
    transition: transform 0.2s;
}

.ai-toggle.active .toggle-icon {
    transform: rotate(180deg);
}

.ai-content {
    margin-top: 12px;
    padding: 16px;
    background: #f9f9f9;
    border-left: 3px solid #2271b1;
    border-radius: 3px;
    font-size: 13px;
    line-height: 1.7;
    color: #1d2327;
}

/* AI Formatted Content */
.ai-formatted {
    font-size: 14px;
    line-height: 1.8;
}

.ai-greeting {
    font-size: 15px;
    font-weight: 600;
    color: #1d2327;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #2271b1;
}

.ai-section-title {
    font-weight: 600;
    color: #1d2327;
    margin: 20px 0 12px 0;
    font-size: 14px;
}

.ai-steps {
    margin: 12px 0 16px 0;
    padding-left: 24px;
    list-style-type: decimal;
    list-style-position: outside;
}

.ai-steps li {
    margin: 10px 0;
    padding-left: 8px;
    line-height: 1.7;
}

.ai-steps li::marker {
    font-weight: 600;
    color: #2271b1;
}

.ai-text {
    margin: 10px 0;
    line-height: 1.7;
    color: #2c3338;
}

.ai-explanation {
    margin-top: 16px;
    padding: 12px;
    background: #e8f4f8;
    border-left: 3px solid #0073aa;
    border-radius: 3px;
    color: #1d2327;
}

.ai-explanation strong {
    font-weight: 600;
    display: inline;
}

/* Copy Notification */
.copy-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #00a32a;
    color: white;
    padding: 12px 20px;
    border-radius: 4px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.15);
    z-index: 9999;
    animation: slideIn 0.3s ease-out;
    font-size: 13px;
}

@keyframes slideIn {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
/* Modal Base Styles */
.error-analyzer-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow: auto;
    animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #646970;
    cursor: pointer;
    padding: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    transition: all 0.2s;
    z-index: 10;
}

.modal-close:hover {
    background: #f0f0f1;
    color: #1d2327;
}

.modal-icon {
    text-align: center;
    margin: 32px 0 20px 0;
}

.modal-icon .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #2271b1;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #1d2327;
    text-align: center;
    margin: 0 24px 12px 24px;
}

.modal-description {
    font-size: 14px;
    color: #50575e;
    text-align: center;
    margin: 0 24px 24px 24px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #dcdcde;
    justify-content: flex-end;
}

/* Rate Limit Modal */
.rate-limit-modal .modal-icon .dashicons {
    color: #dba617;
}

.limit-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 24px 0;
    padding: 24px;
    background: #f6f7f7;
    border-top: 1px solid #dcdcde;
    border-bottom: 1px solid #dcdcde;
}

.limit-stat {
    text-align: center;
}

.limit-stat-value {
    font-size: 36px;
    font-weight: 600;
    color: #1d2327;
    line-height: 1;
}

.limit-stat-label {
    font-size: 11px;
    color: #646970;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 8px;
}

.limit-stat-divider {
    font-size: 32px;
    color: #dcdcde;
    font-weight: 300;
}

.limit-reset {
    text-align: center;
    padding: 20px 24px;
    font-size: 14px;
    color: #50575e;
}

.limit-reset .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    vertical-align: text-bottom;
    color: #2271b1;
}

.limit-reset strong {
    color: #1d2327;
}

/* Export Modal */
.export-modal .modal-icon .dashicons {
    color: #2271b1;
}

.export-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0 24px 20px 24px;
}

.export-option {
    display: flex;
    align-items: center;
    padding: 16px;
    border: 2px solid #dcdcde;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
}

.export-option:hover {
    border-color: #2271b1;
    background: #f6f7f7;
}

.export-option input[type="radio"] {
    margin: 0 12px 0 0;
}

.export-option input[type="radio"]:checked {
    accent-color: #2271b1;
}

.option-content {
    flex: 1;
}

.option-content strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
    margin-bottom: 4px;
}

.option-desc {
    font-size: 13px;
    color: #646970;
}

.export-filters {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 24px;
    background: #f6f7f7;
    border-top: 1px solid #dcdcde;
    border-bottom: 1px solid #dcdcde;
}

.export-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #1d2327;
}

.export-filter input[type="checkbox"] {
    margin: 0;
    accent-color: #2271b1;
}

/* Settings Page */
.settings-container {
    max-width: 800px;
    margin-top: 20px;
}

.settings-card {
    background: white;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 24px;
    margin-bottom: 20px;
}

.settings-card h2 {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 600;
}

.settings-card p.description {
    margin: 0 0 20px 0;
    color: #646970;
}

.settings-card .button .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    vertical-align: text-bottom;
    margin-right: 6px;
}
.export-modal .modal-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 32px auto 20px auto;
}

.export-modal .modal-icon .dashicons {
    margin: 0;
    display: block;
}

#confirm-export {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#confirm-export .dashicons {
    margin-right: 6px;
    margin-top: 0;
    vertical-align: middle;
}
.filter-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #f6f7f7;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-checkbox:hover {
    background: #f0f0f1;
}

.filter-checkbox input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

/* Resolved Error Card */
.error-card.resolved {
    opacity: 0.6;
    background: #f9f9f9;
    border-left: 3px solid #00a32a;
}

.error-card.resolved .error-header::after {
    content: "✓ Resolved";
    background: #00a32a;
    color: white;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
    margin-left: auto;
}

/* Export Modal Icon Centered */
.export-modal .modal-icon {
    display: flex;
    justify-content: center;
    align-items: center;
}

.export-modal .modal-icon .dashicons {
    margin: 0 auto;
}

#confirm-export {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#confirm-export .dashicons {
    margin-right: 6px;
    vertical-align: middle;
}
.help-container {
    max-width: 900px;
    margin: 20px 0;
}

.help-card {
    background: white;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 24px;
    margin-bottom: 20px;
}

.help-card h2 {
    font-size: 18px;
    font-weight: 600;
    color: #1d2327;
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid #dcdcde;
}

.help-card h3 {
    font-size: 15px;
    font-weight: 600;
    color: #1d2327;
    margin: 24px 0 12px 0;
}

.help-card ul,
.help-card ol {
    line-height: 1.8;
    margin: 12px 0 12px 24px;
}

.help-card li {
    margin-bottom: 8px;
}

.help-card p {
    line-height: 1.6;
    margin: 12px 0;
}

.help-card strong {
    color: #1d2327;
    font-weight: 600;
}

.help-card a {
    color: #2271b1;
    text-decoration: none;
}

.help-card a:hover {
    text-decoration: underline;
}

/* FAQ Styling */
.faq-item {
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f1;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
    margin: 0 0 8px 0;
}

.faq-answer {
    font-size: 13px;
    color: #50575e;
    line-height: 1.6;
}

.faq-answer p {
    margin: 0;
}
.confirm-modal .modal-icon .dashicons {
    color: #dba617;
}

.success-modal .modal-icon.success .dashicons {
    color: #00a32a;
}

.error-modal .modal-icon.error .dashicons {
    color: #d63638;
}

.button-danger {
    background: #d63638;
    border-color: #d63638;
    color: #fff;
}

.button-danger:hover {
    background: #b32d2e;
    border-color: #b32d2e;
}

.modal-ok {
    min-width: 120px;
}
.service-unavailable-modal .modal-content {
    max-width: 500px;
}

.service-unavailable-modal .modal-description {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.service-unavailable-modal .modal-info-box {
    background: #f0f6fc;
    border-left: 4px solid #2271b1;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

.service-unavailable-modal .modal-info-box p {
    margin: 0 0 10px 0;
    font-weight: 600;
    color: #2271b1;
}

.service-unavailable-modal .modal-info-box ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.service-unavailable-modal .modal-info-box li {
    padding: 5px 0;
    color: #2c3338;
}

.service-unavailable-modal .modal-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff8e5;
    border: 1px solid #f0b849;
    border-radius: 4px;
    padding: 12px;
    margin-top: 20px;
    font-size: 13px;
    color: #8a6d3b;
}

.service-unavailable-modal .modal-hint .dashicons {
    color: #f0b849;
    flex-shrink: 0;
}

/* Success Notification */
.success-notification {
    background: #00a32a !important;
}

/* Modal Animations */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.error-analyzer-modal .modal-content {
    animation: modalFadeIn 0.3s ease-out;
}