/**
 * Frontend Styles for PAGE1 GEO AI Overview Plugin
 * Modern design inspired by Google's AI Overview
 */

.page1-geo-ai-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #fbbf24;
    transition: all 0.3s ease;
}

.page1-geo-ai-box:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.page1-geo-ai-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.page1-geo-ai-icon {
    font-size: 24px;
    line-height: 1;
}

.page1-geo-ai-header strong {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.page1-geo-ai-content {
    color: #ffffff;
    line-height: 1.8;
    font-size: 16px;
}

.page1-geo-ai-content p {
    margin: 0 0 12px 0;
    color: #ffffff;
}

.page1-geo-ai-content p:last-child {
    margin-bottom: 0;
}

.page1-geo-ai-content ul,
.page1-geo-ai-content ol {
    margin: 12px 0;
    padding-left: 24px;
    color: #ffffff;
}

.page1-geo-ai-content li {
    margin-bottom: 8px;
    color: #ffffff;
}

.page1-geo-ai-content strong {
    color: #fbbf24;
    font-weight: 600;
}

.page1-geo-ai-content em {
    color: #fde68a;
}

.page1-geo-ai-content a {
    color: #2563eb;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.page1-geo-ai-content a:hover {
    border-bottom-color: #2563eb;
}

/* AI Icon Trigger in Title */
.page1-geo-ai-icon-trigger {
    display: inline-block;
    margin-left: 8px;
    cursor: pointer;
    font-size: 0.8em;
    opacity: 0.8;
    transition: all 0.3s ease;
    vertical-align: middle;
    z-index: 10;
    position: relative;
}

.page1-geo-ai-icon-trigger:hover {
    opacity: 1;
    transform: scale(1.2);
}

/* Hidden Schema Block */
.page1-geo-ai-schema {
    display: none !important;
}

/* Popup Modal */
.page1-geo-ai-modal {
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    visibility: hidden !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow-y: auto;
}

.page1-geo-ai-modal.page1-geo-ai-modal-show {
    visibility: visible !important;
    opacity: 1 !important;
}

.page1-geo-ai-modal-content {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    margin: 5% auto;
    padding: 0;
    max-width: 800px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.page1-geo-ai-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #ffffff;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1;
    opacity: 0.8;
    transition: opacity 0.2s ease;
    line-height: 1;
}

.page1-geo-ai-close:hover,
.page1-geo-ai-close:focus {
    opacity: 1;
}

.page1-geo-ai-modal .page1-geo-ai-box {
    margin: 0;
    box-shadow: none;
    border-left: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .page1-geo-ai-box {
        padding: 16px 18px;
        margin: 0 0 24px 0;
    }

    .page1-geo-ai-content {
        font-size: 15px;
    }

    .page1-geo-ai-modal-content {
        margin: 10% 5%;
        max-width: 90%;
    }

    .page1-geo-ai-close {
        font-size: 28px;
        top: 10px;
        right: 15px;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    .page1-geo-ai-box {
        background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
        border-left-color: #3b82f6;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    .page1-geo-ai-box:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    }

    .page1-geo-ai-header {
        color: #60a5fa;
    }

    .page1-geo-ai-content {
        color: #e5e7eb;
    }

    .page1-geo-ai-content strong {
        color: #f9fafb;
    }

    .page1-geo-ai-content a {
        color: #60a5fa;
    }

    .page1-geo-ai-content a:hover {
        border-bottom-color: #60a5fa;
    }

    .page1-geo-ai-modal-content {
        background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    }
}

/* Print Styles */
@media print {
    .page1-geo-ai-box {
        background: #fff;
        border: 1px solid #ddd;
        box-shadow: none;
        page-break-inside: avoid;
    }

    .page1-geo-ai-modal {
        display: none !important;
    }

    .page1-geo-ai-icon-trigger {
        display: none !important;
    }
}

/* Loading Indicator for Auto-Generation */
.page1-geo-ai-loading {
    min-height: 120px;
}

.page1-ai-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    gap: 12px;
}

.page1-ai-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: page1-spin 0.8s linear infinite;
}

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

.page1-ai-loader p {
    margin: 0;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
}

/* Dark mode for loader */
@media (prefers-color-scheme: dark) {
    .page1-ai-spinner {
        border-color: #374151;
        border-top-color: #60a5fa;
    }

    .page1-ai-loader p {
        color: #9ca3af;
    }
}