/* Scoped to .review-ui-container to prevent conflicts */
.review-ui-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #333;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding: 0 5px; /* Tighter padding */
}

/* Sections */
.review-ui-container .section {
    margin-bottom: 12px; /* Reduced margin */
}

/* Company Reply Box (Task 1: Increase space from header) */
.review-ui-container .company-reply-box {
    margin-top: 15px; /* Added top margin */
    margin-bottom: 20px; /* Increased bottom margin */
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    color: #333;
    border-left: 4px solid #d88ea3;
    line-height: 1.4;
    font-size: 1.2rem;
    font-weight: 500;
    min-height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

/* Task 2: Line under topic with distance */
.review-ui-container .section-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #222;
    margin-bottom: 0;
    border-bottom: 2px solid #fce4ec; /* Pinkish line from image */
    padding-bottom: 8px; /* Space between text and line */
    margin-bottom: 12px; /* Space between line and content below */
    display: block; /* Ensure full width for border */
    width: 100%;
}

/* Language Selector */
.review-ui-container select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
    background-color: #fff;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
}

/* Tags Container */
.review-ui-container .tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px; /* Tighter gap */
}

.review-ui-container .tag {
    padding: 6px 14px;
    border: 1px solid #eee;
    border-radius: 18px;
    background-color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    color: #444;
}

.review-ui-container .tag:hover {
    background-color: #f5f5f5;
    border-color: #ddd;
}

.review-ui-container .tag.selected {
    background-color: #d88ea3; /* Pink color */
    color: white;
    border-color: #d88ea3;
}

/* Textarea */
.review-ui-container textarea {
    width: 100%;
    min-height: 100px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
    resize: vertical;
    font-family: inherit;
    box-sizing: border-box;
    margin-bottom: 8px;
}

.review-ui-container textarea:focus {
    outline: none;
    border-color: #d88ea3;
}

/* Action Row (Copy + QR) */
.review-ui-container .review-actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

/* Copy Button */
.review-ui-container .copy-btn {
    flex-grow: 1; /* Take up remaining space */
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 16px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
    height: 48px; /* Match height with QR container approx */
}

.review-ui-container .copy-btn:hover {
    background-color: #218838;
}

.review-ui-container .copy-btn svg {
    width: 18px;
    height: 18px;
    fill: white;
}

/* QR Code Container (Integrated) */
#review-qrcode-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: white;
    padding: 4px;
    border-radius: 4px;
    border: 1px solid #eee;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    height: 48px;
    min-width: 48px;
}

#review-qrcode-container:hover {
    transform: scale(1.05);
    border-color: #d88ea3;
}

#review-qrcode-container img {
    display: block;
    width: 29px !important; /* Fixed small size */
    height: 29px !important;
}

#review-qrcode-container .scan-label {
    font-size: 8px;
    color: #666;
    font-weight: 600;
    line-height: 1;
    margin-top: 2px;
    text-transform: uppercase;
}


/* Action Buttons (Google/Facebook) */
/* Task 3: Reduce gap between Copy/QR and Review buttons */
.review-ui-container .action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 5px; /* Reduced from 12px */
    flex-direction: row; /* Force row layout even on mobile for compactness if possible */
}

.review-ui-container .action-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    transition: opacity 0.2s;
    text-decoration: none;
    position: relative;
}

.review-ui-container .action-btn:hover {
    opacity: 0.9;
}

.review-ui-container .google-btn {
    background-color: #4285f4;
}

.review-ui-container .facebook-btn {
    background-color: #1877f2;
}

.review-ui-container .action-btn svg {
    width: 18px;
    height: 18px;
    fill: white;
}

/* Footer (Review specific) */
/* Task 4: Increase distance from footer to bottom */
.review-ui-container .review-footer {
    margin-top: 25px; /* Increased from 12px */
    margin-bottom: 10px; /* Add some bottom margin */
    color: #666;
    font-size: 0.8rem;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.3;
}

.review-ui-container .review-footer svg {
    width: 14px;
    height: 14px;
    fill: #666;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Toast Notification (Scoped) */
.review-ui-container .toast {
    visibility: hidden;
    min-width: auto;
    background-color: #00C853;
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 8px 16px;
    position: absolute;
    z-index: 1000;
    right: 20px;
    top: 10px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.review-ui-container .toast.show {
    visibility: visible;
    opacity: 1;
}

/* Inline Toast Notification */
.review-ui-container .inline-toast {
    color: #00C853;
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s;
}

.review-ui-container .inline-toast.show {
    opacity: 1;
}
