/* ========================================================
   INFLUENCY AI ANALYTICS (AI ОБЗОР / АНАЛИТИКА) STYLES
   Exact Typography & UI Match to Site & Figma
   ======================================================== */

.ai-overview-btn,
.ai-modal,
.ai-modal .modal-dialog,
.ai-modal .modal-content,
.ai-modal h1,
.ai-modal h2,
.ai-modal h3,
.ai-modal h4,
.ai-modal h5,
.ai-modal h6,
.ai-modal p,
.ai-modal span,
.ai-modal strong,
.ai-modal li,
.ai-modal button,
.ai-modal div {
    font-family: "Inter Tight", sans-serif !important;
}

/* Outline Pill Button (button.png) */
.ai-overview-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #ffffff;
    color: #6d28d9 !important;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 22px;
    border-radius: 9999px;
    border: 1.5px solid #7c3aed;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(124, 58, 237, 0.08);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    text-decoration: none !important;
    white-space: nowrap;
    z-index: 1;
}

.ai-overview-btn:hover {
    background: #f5f3ff;
    color: #5b21b6 !important;
    border-color: #6d28d9;
    box-shadow: 0 3px 12px rgba(124, 58, 237, 0.18);
    transform: translateY(-1px);
}

.ai-overview-btn:active {
    transform: translateY(0);
}

.ai-sparkle-icon {
    font-size: 15px;
    color: #7c3aed;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ai-pulse-dot {
    display: none;
}

/* ========================================================
   MODAL CONTAINER & LAYOUT (modal.png)
   ======================================================== */

.ai-modal .modal-dialog {
    max-width: 980px;
    margin: 1.75rem auto;
}

.ai-modal .modal-content {
    border-radius: 20px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    background: #ffffff;
    overflow: hidden;
}

/* Modal Header */
.ai-modal-header {
    background: #ffffff;
    padding: 22px 28px 16px 28px;
    border-bottom: 1px solid #f3f4f6;
    position: relative;
}

.ai-modal-header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.ai-modal-title-wrap {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.ai-modal-title-icon {
    font-size: 20px;
    color: #7c3aed;
    margin-top: 2px;
}

.ai-modal-title {
    color: #111827;
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}

.ai-modal-subtitle {
    color: #6b7280;
    font-size: 13px;
    margin: 4px 0 0 0;
    line-height: 1.4;
}

.ai-modal-header .btn-close-custom {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    color: #6b7280;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    flex-shrink: 0;
    padding: 0;
}

.ai-modal-header .btn-close-custom:hover {
    background: #f3f4f6;
    color: #111827;
    border-color: #d1d5db;
}

/* Modal Body */
.ai-modal-body {
    padding: 24px 28px;
    background: #ffffff;
    max-height: calc(85vh - 140px);
    overflow-y: auto;
}

/* Main 2-Column Grid */
.ai-analytics-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 28px;
    align-items: start;
}

@media (max-width: 991px) {
    .ai-analytics-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Left Column Profile Sidebar */
.ai-profile-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-right: 1px solid #f3f4f6;
    padding-right: 24px;
}

@media (max-width: 991px) {
    .ai-profile-sidebar {
        border-right: none;
        border-bottom: 1px solid #f3f4f6;
        padding-right: 0;
        padding-bottom: 20px;
    }
}

.ai-profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #f3f4f6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    margin-bottom: 12px;
}

.ai-profile-name {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 2px 0;
}

.ai-profile-location {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 14px 0;
}

.ai-followers-box {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px 16px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 14px;
    background: #ffffff;
}

.ai-followers-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #111827;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.ai-followers-info {
    text-align: left;
}

.ai-followers-num {
    font-size: 16px;
    font-weight: 800;
    color: #111827;
    line-height: 1.1;
}

.ai-followers-label {
    font-size: 11px;
    color: #6b7280;
    line-height: 1.1;
}

.ai-generated-badge {
    background: #f5f3ff;
    color: #7c3aed;
    font-size: 11px;
    padding: 8px 12px;
    border-radius: 10px;
    width: 100%;
    text-align: center;
    border: 1px solid #ede9fe;
    line-height: 1.3;
}

.ai-generated-badge .gen-title {
    font-weight: 600;
    display: block;
}

.ai-generated-badge .gen-date {
    color: #6b7280;
    font-size: 10px;
    display: block;
    margin-top: 2px;
}

/* Right Column Content Area */
.ai-analytics-content {
    display: flex;
    flex-direction: column;
}

/* Top 4 Metrics Cards */
.ai-metrics-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 18px;
}

@media (max-width: 767px) {
    .ai-metrics-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

.ai-stat-card {
    background: #f9fafb;
    border: 1px solid #f3f4f6;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
}

.ai-stat-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    margin-bottom: 8px;
}

.ai-stat-icon.purple { background: #ede9fe; color: #7c3aed; }
.ai-stat-icon.blue   { background: #dbeafe; color: #2563eb; }
.ai-stat-icon.green  { background: #d1fae5; color: #059669; }
.ai-stat-icon.yellow { background: #fef3c7; color: #d97706; }

.ai-stat-title {
    font-size: 11px;
    color: #6b7280;
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 4px;
    min-height: 24px;
}

.ai-stat-value {
    font-size: 18px;
    font-weight: 800;
    color: #111827;
    line-height: 1.1;
    margin-bottom: 4px;
}

.ai-stat-rating {
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.ai-stat-rating.green { color: #059669; }
.ai-stat-rating.gray  { color: #6b7280; }

.ai-stat-rating .info-dot {
    font-size: 10px;
    color: #9ca3af;
}

/* Two Details Cards */
.ai-details-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

@media (max-width: 767px) {
    .ai-details-row {
        grid-template-columns: 1fr;
    }
}

.ai-card-box {
    background: #f9fafb;
    border: 1px solid #f3f4f6;
    border-radius: 12px;
    padding: 14px 16px;
}

.ai-card-box-title {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 10px 0;
}

.ai-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ai-info-list li {
    font-size: 12.5px;
    color: #374151;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.4;
}

.ai-info-list li i.list-icon {
    font-size: 13px;
    margin-top: 2px;
    flex-shrink: 0;
}

.ai-info-list li i.fa-check-circle {
    color: #10b981;
}

.ai-recommendation-box {
    background: #f9fafb;
    border: 1px solid #f3f4f6;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 12px;
}

.ai-recommendation-title {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 4px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ai-recommendation-text {
    font-size: 12.5px;
    color: #4b5563;
    margin: 0;
    line-height: 1.4;
}

/* Custom AI Summary Box */
.ai-custom-summary-box {
    background: #f5f3ff;
    border: 1px solid #ede9fe;
    border-radius: 12px;
    padding: 14px 16px;
    margin-top: 8px;
}

.ai-custom-summary-title {
    font-size: 13px;
    font-weight: 700;
    color: #6d28d9;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ai-custom-summary-body {
    font-size: 13px;
    color: #374151;
    line-height: 1.6;
}

.ai-custom-summary-body p:last-child {
    margin-bottom: 0;
}

/* Modal Footer */
.ai-modal-footer {
    padding: 14px 28px;
    background: #ffffff;
    border-top: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

@media (max-width: 767px) {
    .ai-modal-footer {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
}

.ai-footer-note {
    font-size: 11.5px;
    color: #9ca3af;
    margin: 0;
    line-height: 1.3;
    display: flex;
    align-items: center;
}

.ai-footer-center {
    font-size: 11.5px;
    color: #9ca3af;
    margin: 0;
    line-height: 1.3;
    text-align: right;
    display: flex;
    align-items: center;
}

@media (max-width: 767px) {
    .ai-footer-center {
        text-align: center;
        justify-content: center;
    }
}

/* Learning State */
.ai-learning-state {
    text-align: center;
    padding: 30px 20px;
}

.ai-radar-wrapper {
    position: relative;
    width: 90px;
    height: 90px;
    margin: 0 auto 20px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-radar-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgba(124, 58, 237, 0.25);
}

.ai-radar-ring.ring-1 {
    width: 100%;
    height: 100%;
    animation: radarPulse 2.4s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}

.ai-radar-ring.ring-2 {
    width: 70%;
    height: 70%;
    animation: radarPulse 2.4s infinite cubic-bezier(0.215, 0.61, 0.355, 1) 0.6s;
}

@keyframes radarPulse {
    0% {
        transform: scale(0.6);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

.ai-radar-core {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.4);
    z-index: 2;
}

.ai-learning-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}

.ai-learning-desc {
    color: #6b7280;
    font-size: 13.5px;
    max-width: 520px;
    margin: 0 auto 20px auto;
    line-height: 1.5;
}

.ai-scanning-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 480px;
    margin: 0 auto 20px auto;
    text-align: left;
}

.ai-scan-step {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
}

.ai-scan-step .step-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
}

.ai-scan-step .step-badge.processing {
    background: #ede9fe;
    color: #7c3aed;
}

.ai-scan-step .step-badge.waiting {
    background: #f3f4f6;
    color: #6b7280;
}

.ai-progress-wrapper {
    max-width: 480px;
    margin: 0 auto;
}

.ai-progress-bar-container {
    height: 6px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.ai-progress-bar-fill {
    height: 100%;
    width: 78%;
    background: linear-gradient(90deg, #7c3aed, #a855f7);
    border-radius: 999px;
}

.ai-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #6b7280;
    margin-top: 6px;
}
