/* Results Layout */
.results-section {
    display: none;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2rem;
    margin-top: 2rem;
}

.results-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3748;
}

.status-badge {
    background: #48bb78;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Summary Statistics */
.summary-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-number.blue { color: #667eea; }
.stat-number.green { color: #48bb78; }
.stat-number.purple { color: #9f7aea; }

.stat-label {
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 0.25rem;
}

.stat-stars {
    color: #a0aec0;
    font-size: 0.9rem;
}

/* Key Insights */
.insights-section {
    border-top: 1px solid #e2e8f0;
    padding-top: 1.5rem;
}

.insights-list {
    list-style: none;
    padding: 0;
}

.insights-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.insight-icon {
    flex-shrink: 0;
    font-size: 1.2rem;
}

/* Sentiment Chart */
.sentiment-chart-container {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 2rem;
    align-items: center;
}

.donut-chart {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: conic-gradient(#34a853 0deg 280deg, #fbbc04 280deg 330deg, #ea4335 330deg 360deg);
    position: relative;
    margin: 0 auto;
}

.donut-chart::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
}

.sentiment-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sentiment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sentiment-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sentiment-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.sentiment-dot.positive { background: #34a853; }
.sentiment-dot.neutral { background: #fbbc04; }
.sentiment-dot.negative { background: #ea4335; }

.sentiment-right {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.sentiment-number {
    font-weight: 600;
    color: #2d3748;
}

.sentiment-percent {
    color: #718096;
    font-size: 0.9rem;
}

/* AI Summary */
.ai-summary {
    background: linear-gradient(135deg, #E0E7F8 0%, #F6EDFD 100%);
    border-radius: 12px;
    padding: 1.5rem;
}

.ai-summary-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.ai-summary-badge {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.ai-summary-text {
    line-height: 1.6;
    color: #4a5568;
}

/* Recommendations */
.recommendations-card {
    /* background: linear-gradient(135deg, #f093fb20 0%, #f5576c20 100%); */
    background: #FFFFFF
}

.recommendations-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.ai-rec-badge {
    background: linear-gradient(45deg, #f093fb, #f5576c);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.recommendation-item {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    border-left: 4px solid transparent;
}

.recommendation-item.high-priority {
    border-left-color: #f56565;
    background: #fed7d7;
}

.recommendation-item.medium-priority {
    border-left-color: #ed8936;
    background: #feebc8;
}

.recommendation-item.low-priority {
    border-left-color: #48bb78;
    background: #c6f6d5;
}

.rec-title {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.rec-description {
    color: #4a5568;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.rec-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.priority-tag {
    font-weight: 600;
}

/* Platform Breakdown and Quick Actions */
.platform-breakdown, .quick-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.platform-item, .action-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f7fafc;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-item:hover {
    background: #edf2f7;
    transform: translateX(4px);
}

.platform-left, .action-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.platform-icon, .action-icon {
    font-size: 1.2rem;
}

.platform-right {
    display: flex;
    flex-direction: column;
    align-items: end;
    gap: 0.25rem;
}

.platform-rating {
    font-weight: 600;
    color: #667eea;
    font-size: 1.1rem;
}

.platform-reviews {
    color: #718096;
    font-size: 0.9rem;
}

.action-arrow {
    font-size: 1.5rem;
    color: #a0aec0;
}

/* Restaurant Header Styles */
.restaurant-header {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    color: white;
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3);
}

.restaurant-image-container {
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.restaurant-image-container:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.restaurant-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 16px;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.restaurant-info {
    flex: 1;
}

.restaurant-name {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}
/* address style added */
.restaurant-address {
    font-size: 1rem;
    opacity: 0.85;
    margin: 0 0 0.5rem 0;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.4;
}

.restaurant-address::before {
    content: '📍';
    font-size: 1.1rem;
}
.restaurant-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin: 0;
    font-weight: 500;
}
/* Add to existing restaurant header styles */
.restaurant-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 16px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    transition: opacity 0.3s ease;
}

.restaurant-image.loading {
    opacity: 0.5;
}
/* Hidden state for image container */
.restaurant-image-container.hidden {
    display: none;
}
/* Add a fallback background for loading state */
.restaurant-image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.restaurant-image-container.loading::before {
    opacity: 1;
}

/* --- Pro-Access Gated Feature Styles --- */
.insights-section {
    position: relative; /* Ensure children can be positioned relative to this */
}

/* Container for the blurred content (dynamically added in JS) */
.insight-item-gated {
    position: relative;
    overflow: hidden; /* To contain the blur */
    margin-top: -0.5rem; /* Pull up slightly to visually connect with the unblurred list */
}

/* Apply blur to the list of remaining insights */
.insight-item-gated .insights-list-gated {
    filter: blur(5px);
    pointer-events: none; /* Disable mouse events on blurred content */
    /* Adjust margin/padding to ensure proper layout after blur */
    padding-top: 1.5rem;
    margin-bottom: 0;
}

/* Add an overlay text on top of the blurred content */
.insights-section.pro-gated .insight-item-gated::before {
    content: "Upgrade to unlock all insights";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: #667eea;
    border: 2px solid #667eea;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    white-space: nowrap;
    text-align: center;
}

/* --- Workaround Styles for html2canvas Capture Mode --- */
/* This class is temporarily added to simulate the blur with solid colors */
/* that html2canvas can reliably render. */

.results-section.capture-mode .insight-item-gated {
    margin-top: 0; /* Adjust margin for cleaner block rendering */
}

.results-section.capture-mode .insight-item-gated .insights-list-gated {
    /* REMOVE problematic blur filter and pointer events */
    filter: none !important;
    pointer-events: none; 
    
    /* Simulate a redacted block */
    background: #e9ecef;
    padding: 1.5rem; 
    border-radius: 12px;
    height: 120px; /* Fixed height for the redacted area */
    position: relative;
    /* Ensure the text is not visible */
    color: transparent !important;
}

/* Hide the actual list items' content (text and icons) */
.results-section.capture-mode .insight-item-gated .insights-list-gated li {
    visibility: hidden; 
    margin-bottom: 10px;
    line-height: 1.5;
    /* Create placeholder lines to simulate text */
    background: #dcdfe3; 
    height: 14px;
    border-radius: 4px;
    width: 95%; 
    /* Create a staggered look for the placeholder lines */
    content: none !important; 
}

.results-section.capture-mode .insight-item-gated .insights-list-gated li:nth-child(even) {
    width: 80%;
    background: #cfd3d7;
}

/* Ensure the overlay text is still clearly visible on top of the redaction */
.results-section.capture-mode .insight-item-gated::before {
    background: rgba(255, 255, 255, 0.85); /* Slightly lighter background for better contrast */
    border: 2px solid #667eea;
}