.input-group {
    display: flex;
    margin: 0 auto 20px;
    max-width: 700px;
    box-shadow: var(--shadow);
    border-radius: 50px;
    overflow: hidden;
    background-color: var(--surface-color);
}

#placeIdInput {
    flex-grow: 1;
    padding: 20px 25px;
    border: none;
    font-size: 1.1em;
    outline: none;
    background-color: transparent;
}

#analyzeBtn {
    padding: 20px 35px;
    border: none;
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 600;
    transition: all 0.3s ease;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

#analyzeBtn:hover {
    background: #0284c7;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.4);
}

.loading {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 20px 0 0 0;
    width: 100%;
    margin: 30px 0 0 0;
    text-align: center;
}

/* Progress Bar */
.progress-container {
    width: 80%;
    background-color: var(--light-gray);
    border-radius: 10px;
    overflow: hidden;
    height: 12px;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--primary-color);
    transition: width 0.3s ease;
    border-radius: 10px;
}

/* Hide old spinner if still present */
.spinner { display: none; }

.comparison-header h3 {
    margin: 0;
    font-size: 1.2em;
    color: var(--primary-color);
}

.comparison-cell.before {
    border-left: 4px solid var(--heritage-orange);
}

.comparison-cell.after {
    border-left: 4px solid var(--heritage-orange);
}

.business-card.stable {
    background-color: var(--surface-color);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border-top: 5px solid var(--primary-color);
}

.before-column {
    border-color: var(--heritage-orange); /* Orange for 'Before' */
}

.after-column {
    border-color: var(--heritage-orange); /* Orange for 'After' */
}

.before-column h2, .after-column h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.business-card {
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 5px;
}

#exportBtn {
    padding: 15px 30px;
    border: 2px solid var(--primary-color);
    background-color: transparent;
    color: var(--primary-color);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s ease;
}

#exportBtn:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Language Tabs */
.language-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.tab-btn {
    padding: 6px 14px;
    border: 1px solid var(--primary-color);
    background-color: white;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s, color 0.2s;
}

.tab-btn.active,
.tab-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.content-section[data-lang="ar"] {
    direction: rtl;
    text-align: right;
    font-family: 'Tajawal', sans-serif;
}

.cultural-notes {
    margin-top: 15px;
    padding: 12px;
    background-color: #f3e5f5;
    border-radius: 8px;
    border-left: 4px solid #9c27b0;
}

.cultural-notes em {
    color: #7b1fa2;
    font-style: italic;
    font-weight: bold;
}

.cultural-notes.placeholder {
    min-height: 58px;
    background-color: var(--sky-light);
    border: 1px dashed rgba(14, 165, 233, 0.2);
    color: var(--deep-sea);
    display: flex;
    align-items: center;
    justify-content: center;
    font-style: italic;
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
}

/* Photo Grid */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.photo-item img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: var(--shadow);
}

.photo-type {
    text-align: center;
    font-size: 0.75em;
    margin-top: 4px;
}

/* Reviews Styling */
.reviews {
    margin-top: 20px;
}

.reviews h4 {
    margin-bottom: 15px;
    color: var(--text-color);
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.review-item {
    padding: 15px;
    background-color: var(--sky-light);
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.review-author {
    font-weight: 600;
    color: var(--text-color);
}

.review-rating {
    color: #ffa500;
    font-size: 0.9em;
}

.review-text {
    margin: 8px 0;
    line-height: 1.5;
    color: var(--text-color);
    font-size: 0.95em;
}

.review-time {
    font-size: 0.8em;
    color: var(--deep-sea);
    font-style: italic;
}

/* Business Card Enhanced Styles */
.business-header {
    border-bottom: 1px solid rgba(14, 165, 233, 0.1);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.business-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.rating-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.price-level {
    background-color: var(--secondary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: bold;
}

.status {
    color: var(--deep-sea);
    font-size: 0.9em;
    text-transform: capitalize;
    margin: 0;
}

/* Contact Info */
.contact-info {
    padding: 10px;
    background-color: var(--sky-light);
    border-radius: 8px;
}

.contact-item {
    font-size: 0.9em;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.contact-item a:hover {
    text-decoration: underline;
}

/* Business Attributes */
.business-attributes {
    margin: 0;
}

.attributes-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.attribute-tag {
    background-color: #e8f4fd;
    color: #1976d2;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.85em;
    border: 1px solid #bbdefb;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Business Hours */
.business-hours {
    margin: 0;
}

.business-hours h4 {
    margin-bottom: 15px;
}

.hours-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 5px;
    margin-top: 10px;
    padding: 15px;
    background-color: var(--sky-light);
    border-radius: 8px;
}

.hour-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.9em;
}

.day {
    font-weight: 600;
    color: var(--text-color);
    flex-basis: 40%;
}

.time {
    color: var(--deep-sea);
    flex-basis: 60%;
    text-align: right;
}

.hour-item:last-child {
    border-bottom: none;
}

/* Keywords Tags */
.keywords-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    margin: 8px 0;
    color: var(--deep-sea);
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.keyword-tag {
    background-color: #fff3e0;
    color: #f57c00;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.85em;
    border: 1px solid #ffcc02;
    font-weight: 500;
}

/* CTA Styling */
.cta-text {
    background-color: #e8f5e8;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #4caf50;
    font-weight: 500;
    color: #2e7d32;
}

.cta-section.placeholder {
    min-height: 86px;
    background-color: var(--sky-light);
    border: 1px dashed rgba(14, 165, 233, 0.2);
    color: var(--deep-sea);
    display: flex;
    align-items: center;
    justify-content: center;
    font-style: italic;
    border-radius: 8px;
}

/* Scores Section */
.scores-section {
    background: var(--primary-color);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 1px solid rgba(14, 165, 233, 0.1);
}

.scores-section h4 {
    color: white;
    margin-bottom: 20px;
    text-align: center;
}

.scores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

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

.score-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0 auto 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 3px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.score-circle.seo {
    background: rgba(76, 175, 80, 0.2);
    border-color: #4caf50;
}

.score-circle.readability {
    background: rgba(33, 150, 243, 0.2);
    border-color: #2196f3;
}

.score-number {
    font-size: 2em;
    font-weight: bold;
    line-height: 1;
}

.score-label {
    font-size: 0.9em;
    margin-top: 2px;
    opacity: 0.9;
}

.score-explanation {
    font-size: 0.9em;
    line-height: 1.4;
    opacity: 0.9;
    text-align: left;
}

.seo-keywords.placeholder {
    min-height: 70px;
    background-color: var(--sky-light);
    border: 1px dashed rgba(14, 165, 233, 0.2);
    color: var(--deep-sea);
    display: flex;
    align-items: center;
    justify-content: center;
    font-style: italic;
    border-radius: 8px;
    margin: 8px 0;
}

/* Analysis Section */
.analysis-section {
    background-color: #fafafa;
    border-radius: 12px;
    padding: 20px;
    margin: 25px 0;
    border: 1px solid rgba(14, 165, 233, 0.1);
}

.analysis-section h4 {
    text-align: center;
    margin-bottom: 25px;
    color: var(--text-color);
}

.analysis-item {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid;
}

.analysis-item.strengths {
    background-color: #e8f5e8;
    border-left-color: #4caf50;
}

.analysis-item.weaknesses {
    background-color: #fff3e0;
    border-left-color: #ff9800;
}

.analysis-item.opportunities {
    background-color: #e3f2fd;
    border-left-color: #2196f3;
}

.analysis-item h5 {
    margin-bottom: 10px;
    color: var(--text-color);
}

.analysis-item ul {
    margin: 0;
    padding-left: 20px;
}

.analysis-item li {
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Recommendations Section */
.recommendations-section {
    background-color: var(--sky-light);
    border-radius: 12px;
    padding: 20px;
    margin: 25px 0;
    border: 1px solid rgba(14, 165, 233, 0.1);
}

.recommendations-section h4 {
    text-align: center;
    margin-bottom: 25px;
    color: var(--text-color);
}

.recommendation-category {
    margin-bottom: 20px;
    padding: 15px;
    background-color: white;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.recommendation-category h5 {
    margin-bottom: 12px;
    color: var(--text-color);
}

.recommendation-category ul {
    margin: 0;
    padding-left: 20px;
}

.recommendation-category li {
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Reviews Note */
.reviews-note {
    text-align: center;
    font-style: italic;
    color: var(--deep-sea);
    margin-top: 10px;
    font-size: 0.9em;
}

/* Comprehensive Content Styling */
.business-categories, .location-details {
    margin: 0;
    padding: 12px;
    background-color: var(--sky-light);
    border-radius: 8px;
    border: 1px solid rgba(14, 165, 233, 0.1);
}

.business-categories h4, .location-details h4 {
    margin-bottom: 10px;
    color: var(--text-color);
    font-size: 1em;
}

.categories-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.category-tag {
    background-color: #e3f2fd;
    color: #1976d2;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8em;
    border: 1px solid #bbdefb;
    text-transform: capitalize;
}

.coordinates, .nearby-areas {
    margin: 8px 0;
    color: var(--deep-sea);
    font-size: 0.9em;
}

.status-info {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-top: 8px;
    flex-wrap: wrap;
}

.open-status {
    font-weight: 600;
    font-size: 0.9em;
    margin: 0;
}

.open-status.open {
    color: var(--primary-color);
}

.open-status.closed {
    color: var(--heritage-orange);
}

.contact-info h4 {
    margin-bottom: 10px;
    color: var(--text-color);
}

.contact-items {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

/* Comprehensive Photo Styling */
.photo-item.comprehensive {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.photo-item.comprehensive img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.photo-details {
    padding: 8px;
}

.photo-attribution {
    font-size: 0.75em;
    color: var(--deep-sea);
    margin: 0 0 4px 0;
}

.photo-dimensions {
    font-size: 0.7em;
    color: var(--text-color);
    margin: 0;
}

.photo-details.enhanced .photo-enhancement {
    font-size: 0.7em;
    color: var(--primary-color);
    margin: 4px 0 0 0;
    font-weight: 500;
}

/* Comprehensive Review Styling */
.review-item.comprehensive {
    padding: 15px;
    background-color: var(--sky-light);
    border-radius: 8px;
    border-left: 3px solid rgba(14, 165, 233, 0.2);
    margin-bottom: 12px;
}

.review-item.comprehensive .review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.reviewer-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.review-timestamp {
    font-size: 0.75em;
    color: var(--text-color);
    margin: 8px 0 0 0;
}

/* Optimized Reviews Styling */
.review-item.optimized {
    background: var(--sky-light);
    border-left: 4px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.review-item.optimized::before {
    content: '';
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.2em;
    opacity: 0.7;
}

.review-item.optimized .review-author {
    color: #155724;
    font-weight: 600;
}

.review-item.optimized .review-text {
    color: #155724;
    line-height: 1.5;
    margin: 10px 0;
    font-weight: 500;
}

.review-item.optimized .review-time {
    color: var(--deep-sea);
    font-size: 0.85em;
}

/* Original card styling */
.business-card.original {
    border-left: 4px solid var(--heritage-orange);
}

.business-card.original .no-features,
.business-card.original .no-reviews,
.business-card.original .no-seo {
    color: var(--deep-sea);
    font-style: italic;
    background-color: var(--sky-light);
    padding: 10px;
    border-radius: 6px;
    border: 1px dashed rgba(14, 165, 233, 0.2);
}

/* Optimized card styling */
.business-card.optimized {
    border-left: 4px solid var(--primary-color);
}

.business-card.optimized .description-text.optimized-text {
    background: var(--sky-light);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    font-weight: 500;
    color: #155724;
}

.business-card.optimized .features-list {
    background-color: #e8f5e8;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.business-card.optimized .features-list li {
    color: #155724;
    margin-bottom: 8px;
    font-weight: 500;
}

.business-card.optimized .photo-note {
    background-color: #e8f5e8;
    color: #155724;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9em;
    text-align: center;
    margin-top: 10px;
    border: 1px solid rgba(14, 165, 233, 0.2);
}

.business-card.optimized .cta-section {
    background: var(--primary-color);
    color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    margin-top: 20px;
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

.business-card.optimized .cta-section h4 {
    color: white;
    margin-bottom: 10px;
}

.business-card.optimized .cta-text {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.1em;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Generated Reviews Styling */
.generated-reviews {
    background: var(--heritage-orange);
    color: white;
    border-radius: 12px;
    padding: 20px;
    margin: 25px 0;
    position: relative;
    overflow: hidden;
}

.generated-reviews::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    z-index: 1;
}

.generated-reviews > * {
    position: relative;
    z-index: 2;
}

.generated-reviews h4 {
    color: white;
    text-align: center;
    margin-bottom: 10px;
    font-size: 1.3em;
}

.reviews-description {
    text-align: center;
    margin-bottom: 20px;
    opacity: 0.9;
    font-style: italic;
}

.generated-reviews .reviews-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.review-item.generated {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 15px;
    backdrop-filter: blur(5px);
}

.review-item.generated .review-header {
    color: white;
}

.review-item.generated .review-author {
    font-weight: 600;
    color: white;
}

.review-item.generated .review-rating {
    color: #ffd700;
    text-shadow: 0 0 3px rgba(255, 215, 0, 0.5);
}

.review-item.generated .review-text {
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.5;
    margin: 10px 0;
}

.review-item.generated .review-time {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85em;
}

.reviews-disclaimer {
    text-align: center;
    margin-top: 20px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    font-size: 0.9em;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.reviews-disclaimer em {
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
}

.hidden {
    display: none !important;
} 