/* Admin styles using our design system */

.saiap-context-display {
    margin-top: 24px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.saiap-context-section {
    background-color: #fff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
}

.saiap-context-section h4 {
    margin-top: 0;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--neutral-border);
    color: var(--text-primary);
    font-size: 18px;
}

.saiap-context-content {
    margin-bottom: 16px;
}

.saiap-context-content ul {
    margin-left: 24px;
    list-style-type: disc;
    padding-left: 20px;
}

.saiap-context-content ul ul {
    list-style-type: circle;
    margin-top: 8px;
    margin-bottom: 8px;
}

.saiap-context-content ol {
    margin-left: 24px;
    list-style-type: decimal;
    padding-left: 20px;
}

.saiap-context-content li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.saiap-context-content p:first-child {
    margin-top: 0;
}

.saiap-context-content p:last-child {
    margin-bottom: 0;
}

/* SEO Strategy section - scrollable content */
.saiap-strategy-section .saiap-summary-view {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 8px;
}

/* Custom scrollbar styling for the strategy section */
.saiap-strategy-section .saiap-summary-view::-webkit-scrollbar {
    width: 6px;
}

.saiap-strategy-section .saiap-summary-view::-webkit-scrollbar-track {
    background: var(--neutral-bg, #f1f1f1);
    border-radius: 3px;
}

.saiap-strategy-section .saiap-summary-view::-webkit-scrollbar-thumb {
    background: var(--neutral-border, #ccc);
    border-radius: 3px;
}

.saiap-strategy-section .saiap-summary-view::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.saiap-edit-mode textarea {
    width: 100%;
    min-height: 150px;
    margin-bottom: 16px;
    padding: 8px;
    border: 1px solid var(--neutral-border);
    border-radius: 4px;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .saiap-context-section {
        padding: 12px;
    }

    .saiap-context-section h4 {
        font-size: 16px;
    }
}

/* Business Information Card */
.saiap-business-info-section {
    border: 1px solid var(--neutral-border, #ddd);
}

.saiap-business-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--neutral-border, #ddd);
}

.saiap-business-info-header h4 {
    margin: 0;
    padding: 0;
    border: none;
}

.saiap-business-info-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.saiap-business-info-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.saiap-business-info-label {
    font-weight: 600;
    color: var(--text-secondary, #666);
    min-width: 140px;
}

.saiap-business-info-value {
    color: var(--text-primary, #333);
    flex: 1;
}

.saiap-business-info-value em {
    color: var(--text-muted, #999);
}

@media (max-width: 576px) {
    .saiap-business-info-row {
        flex-direction: column;
        gap: 4px;
    }

    .saiap-business-info-label {
        min-width: auto;
    }
}

/* Form elements */
.saiap-admin-page input[type="text"],
.saiap-admin-page input[type="password"],
.saiap-admin-page select,
.saiap-admin-page textarea {
    border: 1px solid var(--neutral-border);
    border-radius: 4px;
    padding: 8px;
    width: 100%;
    max-width: 100%;
}

.saiap-admin-page input[type="checkbox"] {
    margin-right: 8px;
}

/* Tab navigation */
.saiap-admin-page .nav-tab-wrapper {
    margin-bottom: 0px;
}

.saiap-admin-page .nav-tab {
    background-color: #fff;
    border: 1px solid var(--neutral-border);
    border-bottom: none;
    color: var(--text-primary);
    padding: 8px 16px;
    margin-right: 4px;
    border-radius: 4px 4px 0 0;
    transition: all 0.2s ease-in-out;
}

.saiap-admin-page .nav-tab:hover {
    background-color: var(--neutral-bg);
}

.saiap-admin-page .nav-tab-active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.saiap-admin-page .nav-tab-active:hover {
    background-color: var(--primary-hover);
}

/* Notice styling */
.saiap-admin-page .notice {
    background-color: #fff;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 16px;
    margin: 16px 0;
    border-radius: 0 4px 4px 0;
}

.saiap-admin-page .notice-success {
    border-left-color: var(--success-color);
}

.saiap-admin-page .notice-warning {
    border-left-color: var(--warning-color);
}

/* Loading state */
.saiap-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.saiap-loading::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #E5E7EB 25%, #F9FAFB 50%, #E5E7EB 75%);
    background-size: 200% 100%;
    animation: pulse 1.5s infinite;
    opacity: 0.7;
    border-radius: 12px;
}

.saiap-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 10px 15px;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    z-index: 100000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    opacity: 0.9;
    animation: saiap-fade-in 0.3s ease-out;
}

.saiap-notification.success {
    background-color: #46b450;
}

.saiap-notification.error {
    background-color: #dc3232;
}

@keyframes saiap-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 0.9;
        transform: translateY(0);
    }
}

/* Premium Feature Notice Styles for Site Context */
.saiap-site-context-premium-notice {
    margin: 0 0 20px 0;
}

.saiap-site-context-premium-notice p {
    margin: 8px 0;
}

.saiap-site-context-premium-notice p:last-child {
    margin-bottom: 0;
}

/* Post Map CTA Banner Styles */
.saiap-post-map-cta {
    margin: 16px 0;
    padding: 16px 20px;
    border-left-color: var(--primary-color, #2271b1);
}

.saiap-post-map-cta-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.saiap-post-map-cta-content .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: var(--primary-color, #2271b1);
    flex-shrink: 0;
    margin-top: 2px;
}

.saiap-post-map-cta-text {
    flex: 1;
    min-width: 200px;
}

.saiap-post-map-cta-text strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text-primary, #1d2327);
}

.saiap-post-map-cta-text p {
    margin: 0;
    color: var(--text-secondary, #50575e);
}

.saiap-post-map-cta .button {
    flex-shrink: 0;
    align-self: center;
}

@media (max-width: 782px) {
    .saiap-post-map-cta-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .saiap-post-map-cta .button {
        align-self: flex-start;
    }
}