/* Base styles */
.aysa-admin {
    display: flex;
    min-height: auto;
    background-color: #f8f9fa;
    margin-top: 0;
    padding-top: 0;
}

/* Fix spacing for Research & Analysis page */
.aysa-page-container {
    margin-top: 0 !important;
    padding-top: 10px !important;
}

.aysa-page-container h1 {
    margin-top: 0 !important;
    margin-bottom: 10px !important;
    padding-top: 0 !important;
}

/* Article Tags Styles */
.aysa-article-tags {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007cba;
}

.aysa-article-tags h3 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
}

.aysa-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.aysa-tag {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background-color: #007cba;
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.aysa-tag:hover {
    background-color: #005a87;
    color: white;
    text-decoration: none;
}

/* Sidebar styles */
.aysa-sidebar {
    width: 280px;
    background-color: #fff;
    border-right: 1px solid #e5e7eb;
    padding: 1.5rem;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.aysa-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.aysa-menu li {
    margin-bottom: 0.5rem;
}

.aysa-menu li a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #4b5563;
    text-decoration: none;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.aysa-menu li a:hover {
    background-color: #f3f4f6;
    color: #111827;
}

.aysa-menu li.active a {
    background-color: #e5e7eb;
    color: #111827;
    font-weight: 500;
}

.aysa-menu li a svg {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.75rem;
    color: #6b7280;
}

/* Main content styles */
.aysa-main {
    flex: 1;
    margin-left: 280px;
    padding: 2rem;
}

.aysa-header {
    margin-bottom: 2rem;
}

.aysa-header h1 {
    font-size: 1.875rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

/* Form styles */
.aysa-form {
    max-width: 600px;
    margin: 0 auto;
}

.aysa-form input[type="text"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.aysa-form input[type="text"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.aysa-form button {
    background-color: #3b82f6;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.aysa-form button:hover {
    background-color: #2563eb;
}

/* Card styles */
.aysa-card {
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.aysa-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 1rem;
}

/* Result card styles */
.aysa-result-card {
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.aysa-score {
    font-size: 3rem;
    font-weight: 700;
    color: #3b82f6;
    text-align: center;
    margin: 1rem 0;
}

.aysa-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.aysa-metric {
    text-align: center;
}

.aysa-metric-label {
    display: block;
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.aysa-metric-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
}

/* Loading state */
.aysa-loading {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
}

/* Mobile styles */
@media (max-width: 768px) {
    .aysa-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .aysa-sidebar.active {
        transform: translateX(0);
    }

    .aysa-main {
        margin-left: 0;
    }

    .aysa-menu-toggle {
        display: block;
        position: fixed;
        top: 1rem;
        left: 1rem;
        background-color: #3b82f6;
        color: white;
        padding: 0.5rem 1rem;
        border: none;
        border-radius: 0.375rem;
        cursor: pointer;
    }
}

/* Admin menu styling */
#adminmenu li.menu-icon-aysa div.wp-menu-image:before,
#adminmenu li.toplevel_page_aysa div.wp-menu-image:before {
    color: white;
    content: "\f184"; /* dashicons-chart-line for Aysa.ai main icon */
}

/* Main menu item background */
#adminmenu li.toplevel_page_aysa.wp-has-current-submenu .wp-menu-image,
#adminmenu li.toplevel_page_aysa.current .wp-menu-image {
    background-color: #0073aa;
}

#adminmenu li.toplevel_page_aysa {
    background-color: #0073aa;
}

/* Admin submenu styling */
.admin-color-fresh #adminmenu li.toplevel_page_aysa .wp-submenu {
    background-color: #23282d;
    padding: 0;
    width: 160px !important;
}

/* Prevent submenu text wrapping */
#adminmenu li.toplevel_page_aysa .wp-submenu li a {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    box-sizing: border-box;
    padding: 5px 0 5px 12px;
    margin: 0;
    color: #bbc8d4;
    font-size: 11px;
}

#adminmenu li.toplevel_page_aysa .wp-submenu {
    min-width: 160px; /* Fixed width for submenu */
    width: 160px !important;
    margin-left: 0;
}

/* Style submenu items */
#adminmenu li.toplevel_page_aysa .wp-submenu li {
    margin: 0;
    padding: 0;
}

/* Dashboard icon */
#adminmenu li.toplevel_page_aysa .wp-submenu li a[href="admin.php?page=aysa"]::before {
    content: "\f226"; /* dashicons-dashboard */
    font-family: dashicons;
    display: inline-block;
    margin-right: 5px;
    font-size: 14px;
    vertical-align: middle;
    color: #bbc8d4;
    line-height: 18px;
}

/* Research & Analysis icon */
#adminmenu li.toplevel_page_aysa .wp-submenu li a[href="admin.php?page=aysa-research"]::before {
    content: "\f11b"; /* dashicons-analytics */
    font-family: dashicons;
    display: inline-block;
    margin-right: 5px;
    font-size: 14px;
    vertical-align: middle;
    color: #bbc8d4;
    line-height: 18px;
}

/* Remove fixed '>' from Research & Analysis */
#adminmenu li.toplevel_page_aysa .wp-submenu li a[href="admin.php?page=aysa-research"]::after {
    content: none;
}

/* Add '>' to current/active submenu item */
#adminmenu li.toplevel_page_aysa .wp-submenu li.current a::after {
    content: ">";
    position: absolute;
    right: 6px;
    color: white;
    font-size: 10px;
}

/* Technical Optimization icon */
#adminmenu li.toplevel_page_aysa .wp-submenu li a[href="admin.php?page=aysa-technical-optimization"]::before {
    content: "\f111"; /* dashicons-admin-settings */
    font-family: dashicons;
    display: inline-block;
    margin-right: 5px;
    font-size: 14px;
    vertical-align: middle;
    color: #bbc8d4;
    line-height: 18px;
}

/* On-Page Optimization icon */
#adminmenu li.toplevel_page_aysa .wp-submenu li a[href="admin.php?page=aysa-on-page-optimization"]::before {
    content: "\f177"; /* dashicons-admin-page */
    font-family: dashicons;
    display: inline-block;
    margin-right: 5px;
    font-size: 14px;
    vertical-align: middle;
    color: #bbc8d4;
    line-height: 18px;
}

/* Off-Page Optimization icon */
#adminmenu li.toplevel_page_aysa .wp-submenu li a[href="admin.php?page=aysa-off-page-optimization"]::before {
    content: "\f103"; /* dashicons-admin-links */
    font-family: dashicons;
    display: inline-block;
    margin-right: 5px;
    font-size: 14px;
    vertical-align: middle;
    color: #bbc8d4;
    line-height: 18px;
}

/* Monitoring & Analytics icon */
#adminmenu li.toplevel_page_aysa .wp-submenu li a[href="admin.php?page=aysa-monitoring-analytics"]::before {
    content: "\f238"; /* dashicons-chart-area */
    font-family: dashicons;
    display: inline-block;
    margin-right: 5px;
    font-size: 14px;
    vertical-align: middle;
    color: #bbc8d4;
    line-height: 18px;
}

/* Adjustment & Improvement icon */
#adminmenu li.toplevel_page_aysa .wp-submenu li a[href="admin.php?page=aysa-adjustment-improvement"]::before {
    content: "\f227"; /* dashicons-performance */
    font-family: dashicons;
    display: inline-block;
    margin-right: 5px;
    font-size: 14px;
    vertical-align: middle;
    color: #bbc8d4;
    line-height: 18px;
}

/* Setup SEO profile icon */
#adminmenu li.toplevel_page_aysa .wp-submenu li a[href="admin.php?page=aysa-setup-seo-profile"]::before {
    content: "\f338"; /* dashicons-admin-users */
    font-family: dashicons;
    display: inline-block;
    margin-right: 5px;
    font-size: 14px;
    vertical-align: middle;
    color: #bbc8d4;
    line-height: 18px;
}

/* Settings icon */
#adminmenu li.toplevel_page_aysa .wp-submenu li a[href="admin.php?page=aysa-settings"]::before {
    content: "\f107"; /* dashicons-admin-generic */
    font-family: dashicons;
    display: inline-block;
    margin-right: 5px;
    font-size: 14px;
    vertical-align: middle;
    color: #bbc8d4;
    line-height: 18px;
}

/* Hover state for submenu items */
#adminmenu li.toplevel_page_aysa .wp-submenu li a:hover {
    color: white;
    background: none;
}

#adminmenu li.toplevel_page_aysa .wp-submenu li a:hover::before {
    color: white;
}

#adminmenu li.toplevel_page_aysa .wp-submenu li a:hover::after {
    color: white;
}

/* Active state for submenu items - make sure they're italic */
#adminmenu li.toplevel_page_aysa .wp-submenu li.current a,
#adminmenu li.toplevel_page_aysa.current > a.menu-top {
    color: white;
    background: none;
    font-weight: 400;
    font-style: italic;
}

#adminmenu li.toplevel_page_aysa .wp-submenu li.current a::before {
    color: white;
}

#adminmenu li.toplevel_page_aysa .wp-submenu li.current a::after {
    color: white;
}

/* Secret Key Login Styles */
.aysa-login-container {
    max-width: 500px;
    margin: 50px auto;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.aysa-login-header {
    text-align: center;
    padding: 30px;
    background-color: #f5f8ff;
    border-bottom: 3px solid #0073aa;
}

/* Secret key input highlight */
#aysa-secret-key {
    border: 2px solid #ddd;
    transition: all 0.3s ease;
}

#aysa-secret-key:focus {
    border-color: #0073aa;
    box-shadow: 0 0 8px rgba(0, 115, 170, 0.3);
}

/* Login button pulse effect */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 115, 170, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(0, 115, 170, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 115, 170, 0); }
}

.aysa-btn-primary {
    animation: pulse 2s infinite;
}

/* Locked page overlay - shown when authentication required */
.aysa-locked-page {
    position: relative;
}

.aysa-locked-page::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.1);
    z-index: 9;
}

.aysa-locked-page::after {
    content: "Authentication Required";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #0073aa;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    z-index: 10;
}

/* ===========================
   CREDIT COST INDICATORS
   =========================== */

/* Credit cost badge for buttons */
.aysa-credit-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    margin-left: 6px;
    border-radius: 3px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

/* Button hover effect for credit badge */
button:hover .aysa-credit-badge {
    opacity: 1;
}

/* Low cost (1-10 credits) - Subtle gray */
.aysa-credit-badge.cost-low {
    background-color: #e8e8e8;
    color: #666;
}

/* Medium cost (11-30 credits) - Light blue */
.aysa-credit-badge.cost-medium {
    background-color: #e3f2fd;
    color: #1976d2;
}

/* High cost (31-50 credits) - Light orange */
.aysa-credit-badge.cost-high {
    background-color: #fff3e0;
    color: #f57c00;
}

/* Very high cost (51+ credits) - Light red */
.aysa-credit-badge.cost-very-high {
    background-color: #ffebee;
    color: #c62828;
}

/* Alternative: Icon-based indicator (optional) */
.aysa-credit-icon {
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    margin-left: 6px;
    opacity: 0.8;
}

.aysa-credit-icon::before {
    content: "💳";
    margin-right: 2px;
    font-size: 11px;
}

/* Tooltip for detailed credit information */
.aysa-credit-tooltip {
    position: relative;
    cursor: help;
}

.aysa-credit-tooltip:hover::after {
    content: attr(data-cost-info);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 5px;
}

.aysa-credit-tooltip:hover::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
    z-index: 1000;
} 