#outscraper-ui {
    width: 100%;
    max-width: none;
    margin: 20px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

#outscraper-ui h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 24px;
    text-align: center;
}

/* Search form container */
.outscraper-search-form {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    margin-bottom: 20px;
}

/* Display mode selector bar - always visible above output */
.display-mode-selector-bar {
    margin-bottom: 15px;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e1e5e9;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.display-mode-options-bar {
    display: flex;
    gap: 6px;
    align-items: center;
}

.display-mode-option-bar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 4px;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    background: white;
}

.display-mode-option-bar:hover {
    background: rgba(25, 66, 148, 0.08);
    border-color: rgba(25, 66, 148, 0.2);
}

.display-mode-option-bar input[type="radio"] {
    display: none;
}

.display-mode-option-bar .mode-icon {
    width: 20px;
    height: 20px;
    opacity: 0.4;
    transition: opacity 0.2s ease;
}

.display-mode-option-bar:hover .mode-icon {
    opacity: 0.6;
}

.display-mode-option-bar input[type="radio"]:checked+.mode-icon {
    opacity: 1;
}

/* Display mode selector */
.outscraper-display-mode {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e1e5e9;
}

/* When form is hidden, add top margin to display mode selector */
#outscraper-ui h3+.outscraper-display-mode {
    margin-top: 20px;
}

.outscraper-display-mode>label {
    display: inline-block;
    margin-right: 15px;
    margin-bottom: 0;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.display-mode-options {
    display: inline-flex;
    gap: 15px;
}

.display-mode-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
    margin-bottom: 0 !important;
    border: 2px solid transparent;
}

.display-mode-option:hover {
    background: rgba(25, 66, 148, 0.05);
    border-color: rgba(25, 66, 148, 0.2);
}

.display-mode-option input[type="radio"] {
    display: none;
}

.display-mode-option .mode-icon {
    width: 20px;
    height: 20px;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.display-mode-option:hover .mode-icon {
    opacity: 0.7;
}

.display-mode-option input[type="radio"]:checked+.mode-icon {
    opacity: 1;
}

.display-mode-option span {
    font-size: 14px;
    color: #555;
    font-weight: 500;
}

.outscraper-input-group {
    flex: 1;
    padding-bottom: 0px !important;
    margin-bottom: 0px;
}

#outscraper-ui label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-size: 14px;
    font-weight: 400;
}

#outscraper-ui input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
    height: auto;
    margin-bottom: 0px;
}

#outscraper-ui input[type="checkbox"],
#outscraper-ui input[type="radio"] {
    width: auto;
}

#outscraper-ui input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

#outscraper-ui button {
    padding: 12px 20px;
    background: #194294;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    white-space: nowrap;
    min-width: 120px;
    margin: 0px;
}

#outscraper-ui button:hover {
    background: #4cae4c;
}

#outscraper-ui button:active {
    background: #3d8b3d;
}

.outscraper-output {
    display: flex;
    gap: 20px;
    margin-top: 30px;
    height: 500px;
}

/* Full-width mode for all display modes */
.outscraper-output.full-width-mode {
    display: block;
    height: 600px;
}

.outscraper-output.full-width-mode .outscraper-left {
    width: 100%;
    height: 100%;
}

.outscraper-output.full-width-mode .outscraper-right {
    width: 100%;
    height: 100%;
}

.outscraper-output.full-width-mode .outscraper-response-content {
    height: calc(100% - 50px);
    overflow-y: auto;
    overflow-x: auto;
}

/* Table view styles */
.table-view-container {
    width: 100%;
    height: 100%;
    overflow: auto;
    padding: 0;
    background: #fff;
    color: #000;
}

.json-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    color: #000;
    margin: 0;
}

.json-table th {
    background: #194294;
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
    border: 1px solid #0d2454;
}

.json-table td {
    padding: 10px 12px;
    border: 1px solid #e1e5e9;
    vertical-align: top;
    max-width: 300px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.json-table tr:nth-child(even) {
    background: #f8f9fa;
}

.json-table tr:hover {
    background: #e9ecef;
}

.json-table td.nested-object {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 11px;
    color: #666;
    max-width: 300px;
    overflow: auto;
}

/* Truncate long text in table cells */
.json-table td.truncate-text {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Allow wrapping for description-like fields */
.json-table td.wrap-text {
    max-width: 400px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
}

.nested-object-details {
    margin: 0;
}

.nested-object-details summary {
    cursor: pointer;
    user-select: none;
    padding: 4px 0;
    color: #194294;
    font-weight: 500;
}

.nested-object-details summary:hover {
    text-decoration: underline;
    color: #0d2454;
}

.nested-object-details[open] summary {
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid #e1e5e9;
}

.nested-object-details .nested-object {
    margin-top: 5px;
    padding: 8px;
    background: #f8f9fa;
    border-left: 3px solid #194294;
    border-radius: 3px;
    max-height: 300px;
    overflow: auto;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 11px;
    color: #666;
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.5;
}

.table-empty {
    text-align: center;
    padding: 40px;
    color: #999;
    font-style: italic;
}

/* Custom renderer styles */
.custom-renderer {
    padding: 15px;
}

.custom-renderer h2 {
    color: #194294;
    font-size: 18px;
    margin: 20px 0 10px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #194294;
}

.custom-renderer h2:first-child {
    margin-top: 0;
}

.custom-renderer table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 13px;
    table-layout: auto;
}

.custom-renderer table th {
    background: #194294;
    color: white;
    padding: 10px;
    text-align: left;
    font-weight: 600;
}

.custom-renderer table td {
    padding: 8px 10px;
    border: 1px solid #e1e5e9;
    max-width: 300px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    vertical-align: top;
}

.custom-renderer table tr:nth-child(even) {
    background: #f8f9fa;
}

.custom-renderer table tr:hover {
    background: #e9ecef;
}

.custom-renderer a {
    color: #194294;
    text-decoration: none;
}

.custom-renderer a:hover {
    text-decoration: underline;
}

/* Warning/info messages in table view - sticky at top */
.table-view-container>div[style*="background: #fff3cd"],
.table-view-container>div[style*="background: #d1ecf1"] {
    position: sticky;
    top: 0;
    z-index: 5;
    margin: 0;
    border-radius: 0;
}

.outscraper-left {
    width: 60%;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
}

#outscraper-map {
    height: 100%;
}

.outscraper-right {
    width: 40%;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.outscraper-response-header {
    background: #f8f9fa;
    padding: 12px 15px;
    border-bottom: 2px solid #e1e5e9;
    font-weight: 600;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.response-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Display mode options in header */
.display-mode-options-header {
    display: flex;
    gap: 6px;
    align-items: center;
    padding-right: 8px;
    border-right: 1px solid #d1d5db;
    margin-right: 8px;
}

.display-mode-option-header {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    background: white;
}

.display-mode-option-header:hover {
    background: rgba(25, 66, 148, 0.08);
    border-color: rgba(25, 66, 148, 0.15);
}

.display-mode-option-header input[type="radio"] {
    display: none;
}

.display-mode-option-header .mode-icon {
    width: 18px;
    height: 18px;
    opacity: 0.4;
    transition: opacity 0.2s ease;
}

.display-mode-option-header:hover .mode-icon {
    opacity: 0.6;
}

.display-mode-option-header input[type="radio"]:checked+.mode-icon {
    opacity: 1;
}

.outscraper-response-content {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    overflow-x: hidden;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    line-height: 1.4;
    background: #2d2d2d;
    color: #fff;
}

.outscraper-left iframe {
    width: 100%;
    height: 100%;
    border: none;
    flex: 1;
}

.outscraper-response-content pre {
    background: inherit !important;
    border: none !important;
}

/* JSON Syntax Highlighting with new colors */
.json-key {
    color: #f8c555;
    font-weight: 600;
}

.json-string {
    color: #7ec699;
}

.json-number {
    color: #7ec699;
}

.json-boolean {
    color: #7ec699;
    font-weight: 600;
}

.json-null {
    color: #999999;
    font-style: italic;
}

.json-bracket {
    color: #fff;
    font-weight: bold;
}

/* Loading state */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-style: italic;
}

.loading::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #e1e5e9;
    border-top: 2px solid #5cb85c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Error styling */
.error-message {
    color: #dc3545;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 12px;
    margin: 10px 0;
}

/* Copy button as icon */
.copy-button,
.download-csv-button {
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: auto;
    margin: 0;
    padding: 5px;
    font-size: 12px !important;
    min-width: 50px !important;
    padding: 10px 12px !important;
    text-transform: uppercase;
}

.copy-button:hover,
.download-csv-button:hover {
    background: #5a6268;
}

.copy-button.copied {
    background: #28a745;
}

.download-csv-button {
    background: #194294;
}

.download-csv-button:hover {
    background: #0d2454;
}

.download-csv-button.downloaded {
    background: #28a745;
}

.download-csv-button.disabled {
    background: #6c757d !important;
    cursor: not-allowed !important;
    opacity: 0.6;
}

.download-csv-button.disabled:hover {
    background: #6c757d !important;
}

/* Responsive design */
@media (max-width: 768px) {
    .outscraper-search-form {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    /* Display mode selector bar on mobile */
    .display-mode-selector-bar {
        padding: 8px 12px;
        justify-content: center;
    }

    .display-mode-options-bar {
        gap: 4px;
    }

    .display-mode-option-bar {
        padding: 6px 8px;
    }

    .display-mode-option-bar .mode-icon {
        width: 18px;
        height: 18px;
    }

    .outscraper-display-mode {
        padding: 12px;
    }

    .outscraper-display-mode>label {
        display: block;
        margin-bottom: 10px;
        margin-right: 0;
    }

    .display-mode-options {
        display: flex;
        flex-direction: row;
        gap: 8px;
        justify-content: center;
    }

    .display-mode-option {
        padding: 10px 14px;
    }

    /* Header display mode options on mobile */
    .display-mode-options-header {
        padding-right: 6px;
        margin-right: 6px;
        gap: 4px;
    }

    .display-mode-option-header {
        padding: 5px 6px;
    }

    .display-mode-option-header .mode-icon {
        width: 16px;
        height: 16px;
    }

    .response-actions {
        gap: 6px;
    }

    .outscraper-output {
        flex-direction: column;
        height: auto;
    }

    .outscraper-output.full-width-mode {
        height: 500px;
        /* Smaller height on mobile */
    }

    .outscraper-left,
    .outscraper-right {
        width: 100%;
        min-height: 350px;
        height: 350px;
    }

    .outscraper-left iframe {
        height: 100%;
    }

    #outscraper-ui button {
        width: 100%;
        margin-top: 0;
    }

    .json-table {
        font-size: 11px;
    }

    .json-table th,
    .json-table td {
        padding: 8px;
    }
}

/* Input hint text */
.input-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

/* ============================================
   Security Modal Styles
   ============================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: transparent;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 335px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: none;
    /* display: flex; */
    justify-content: space-between;
    align-items: center;
    padding: 25px 25px 15px;
    border-bottom: 1px solid #e9ecef;
    background: #194294;
    color: white;
    border-radius: 12px 12px 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: white;
    padding: 0;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    background: #fff;
    padding: 10px;
}

.modal-body p {
    margin: 0 0 25px 0;
    color: #495057;
    font-size: 16px;
    line-height: 1.6;
    text-align: center;
    display: none;
}

.modal-captcha {
    margin-bottom: 15px;
    margin-top: 10px;
}

.captcha-container {
    /* background: #f8f9fa; */
    /* border: 2px solid #e9ecef; */
    border-radius: 8px;
    /* padding: 20px; */
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 0px;
    background: transparent;
    border: none;
}

.h-captcha {
    display: inline-block;
}

.captcha-status {
    margin-top: 15px;
    font-size: 14px;
    font-weight: 500;
    display: none;
}

#modal-status-inactive {
    color: #856404;
}

#modal-status-active {
    color: #28a745;
}

.modal-actions {
    display: flex;
    gap: 12px;
    /* justify-content: center;
    margin-top: 20px; */
    margin: 0px;
    justify-content: space-between;
}

.modal-button {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    min-width: 120px;
}

.modal-primary {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.modal-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.modal-primary:disabled {
    background: #6c757d;
    cursor: not-allowed;
    box-shadow: none;
}

.modal-secondary {
    background: #6c757d;
    color: white;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.2);
}

.modal-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-loading {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}


/* ============================================
   Left Panel Types Styles
   ============================================ */

/* Full width right panel when left panel is hidden */
.outscraper-right.full-width {
    width: 100%;
}

/* List View */
#outscraper-left-panel {
    height: 100%;
    overflow-y: auto;
    flex: 1;
    position: relative;
}

.outscraper-left-panel-list {
    background: #f8f9fa;
}

.list-container {
    padding: 15px;
}

.list-item {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 12px;
    display: flex;
    gap: 15px;
    transition: all 0.3s ease;
}

.list-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.list-item-number {
    background: #194294;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.list-item-content {
    flex: 1;
}

.list-item-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    font-size: 15px;
}

.list-item-subtitle {
    color: #666;
    font-size: 13px;
    margin-bottom: 5px;
}

.list-item-rating {
    color: #f39c12;
    font-size: 13px;
    margin-bottom: 5px;
}

.list-item-link a {
    color: #194294;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.list-item-link a:hover {
    text-decoration: underline;
}

.list-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-style: italic;
}

/* Preview View */
.outscraper-left-panel-response {
    background: #f8f9fa;
}

.preview-container {
    padding: 20px;
}

.preview-card {
    background: white;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
}

.preview-card h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
}

.preview-card p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.preview-rating {
    color: #f39c12;
    font-size: 14px;
    margin-bottom: 10px;
}

.preview-address,
.preview-phone {
    color: #666;
    font-size: 14px;
    margin-bottom: 8px;
}

.preview-website {
    margin-top: 15px;
}

.preview-website a {
    color: #194294;
    text-decoration: none;
    font-weight: 500;
}

.preview-website a:hover {
    text-decoration: underline;
}

.preview-more {
    text-align: center;
    padding: 15px;
    color: #666;
    font-style: italic;
    background: #f8f9fa;
    border-radius: 6px;
    margin-top: 15px;
}

.preview-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-style: italic;
}

/* Browser View */
.outscraper-left-panel-browser {
    background: #fff;
    height: 100%;
}

#outscraper-browser {
    height: 100%;
    width: 100%;
}

#outscraper-browser iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Map View (existing) */
.outscraper-left-panel-map {
    background: #fff;
    height: 100%;
}

#outscraper-map {
    height: 100%;
    width: 100%;
}

/* Make parent containers position relative for overlay */
#outscraper-map,
#outscraper-browser {
    position: relative;
}

/* Responsive adjustments for left panel types */
@media (max-width: 768px) {
    .list-item {
        flex-direction: column;
        gap: 10px;
    }

    .list-item-number {
        align-self: flex-start;
    }

    .preview-card {
        padding: 15px;
    }

    .preview-card h4 {
        font-size: 16px;
    }
}

/* ============================================
   Progress Bar Styles
   ============================================ */

.progress-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(248, 249, 250, 0.98);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    backdrop-filter: blur(3px);
}

.progress-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 40px;
}

.progress-content {
    text-align: center;
    max-width: 300px;
    width: 100%;
}

.progress-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #e1e5e9;
    border-top: 4px solid #194294;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.progress-text {
    color: #495057;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 20px;
    animation: pulse-text 1.5s ease-in-out infinite;
}

@keyframes pulse-text {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

.progress-bar-wrapper {
    width: 100%;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    height: 8px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #194294 0%, #4cae4c 50%, #194294 100%);
    background-size: 200% 100%;
    animation: progress-animation 2s ease-in-out infinite;
    border-radius: 10px;
}

@keyframes progress-animation {
    0% {
        width: 0%;
        background-position: 0% 0%;
    }

    50% {
        width: 70%;
        background-position: 100% 0%;
    }

    100% {
        width: 100%;
        background-position: 200% 0%;
    }
}


/* ============================================
   Iframe Loading Overlay
   ============================================ */

.iframe-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: opacity 0.3s ease;
}

.iframe-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e1e5e9;
    border-top: 3px solid #194294;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Make parent containers position relative for overlay */
#outscraper-map,
#outscraper-browser {
    position: relative;
}

/* Reviews View */
.outscraper-left-panel-reviews {
    background: #fff;
    height: 100%;
}

#outscraper-reviews {
    height: 100%;
    width: 100%;
    overflow-y: auto;
}

.reviews-container {
    padding: 15px;
    height: 100%;
}

.business-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.business-header h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #333;
    text-align: left;
}

.business-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.business-rating .stars {
    color: #ffa500;
    font-size: 16px;
}

.business-rating .rating-number {
    font-weight: bold;
    color: #333;
}

.business-rating .review-count {
    color: #666;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.review-item {
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #007cba;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.reviewer-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.reviewer-name {
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

.reviewer-count {
    font-size: 12px;
    color: #666;
}

.review-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.review-stars {
    color: #ffa500;
    font-size: 14px;
}

.review-date {
    font-size: 12px;
    color: #666;
}

.review-text {
    margin-bottom: 10px;
    line-height: 1.4;
    color: #333;
    font-size: 14px;
}

.review-photos {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.owner-response {
    margin-top: 10px;
    padding: 10px;
    background: #e8f4f8;
    border-radius: 6px;
    border-left: 3px solid #007cba;
}

.owner-response-label {
    font-weight: bold;
    font-size: 12px;
    color: #007cba;
    margin-bottom: 5px;
}

.owner-response-text {
    font-size: 13px;
    color: #333;
    line-height: 1.3;
}

.reviews-empty {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px 20px;
}

/* Reviews Tabs */
.reviews-tabs {
    display: flex;
    margin-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.tab-button {
    flex: 1;
    padding: 12px 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab-button:hover {
    color: #007cba;
    background-color: #f8f9fa;
}

.tab-button.active {
    color: #007cba;
    border-bottom-color: #007cba;
    background-color: #f8f9fa;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Google Embed Styles */
.google-embed-container {
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 15px;
}

.embed-notice {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    text-align: center;
    font-weight: 500;
}

.google-embed-container iframe {
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.embed-fallback {
    padding: 40px 20px;
    text-align: center;
    color: #666;
}

.embed-fallback p {
    margin-bottom: 15px;
    font-style: italic;
}

.view-reviews-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #007cba;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.view-reviews-btn:hover {
    background-color: #005a87;
    color: white;
    text-decoration: none;
}

/* Responsive adjustments for tabs */
@media (max-width: 768px) {
    .reviews-tabs {
        flex-direction: column;
    }

    .tab-button {
        border-bottom: 1px solid #e0e0e0;
        border-right: none;
    }

    .tab-button.active {
        border-bottom-color: #007cba;
    }
}

/* Custom Reviews Panel */
.outscraper-left-panel-custom_reviews {
    background: #fff;
    height: 100%;
}

#outscraper-custom-reviews {
    height: 100%;
    width: 100%;
    overflow-y: auto;
}

.custom-reviews-container {
    padding: 15px;
    height: 100%;
}

/* Google Reviews Panel */
.outscraper-left-panel-google_reviews {
    background: #fff;
    height: 100%;
}

#outscraper-google-reviews {
    height: 100%;
    width: 100%;
    overflow-y: auto;
}

.google-reviews-container {
    padding: 15px;
    height: 100%;
}

/* Google Info Section */
.google-info-section {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.google-info-section h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
    border-bottom: 2px solid #007cba;
    padding-bottom: 8px;
}

.info-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 500;
    color: #666;
    min-width: 80px;
    font-size: 14px;
}

.info-value {
    color: #333;
    font-size: 14px;
}

.info-value a {
    color: #007cba;
    text-decoration: none;
}

.info-value a:hover {
    text-decoration: underline;
}

/* Enhanced Google Embed Container */
.google-reviews-container .google-embed-container {
    margin-bottom: 20px;
}

.google-reviews-container .embed-notice {
    font-size: 14px;
    font-weight: 500;
    color: #007cba;
    margin-bottom: 12px;
    text-align: center;
    padding: 8px;
    background: #e8f4f8;
    border-radius: 6px;
    border: 1px solid #b8dce8;
}

/* Responsive adjustments for separated panels */
@media (max-width: 768px) {

    .custom-reviews-container,
    .google-reviews-container {
        padding: 10px;
    }

    .google-embed-container iframe {
        height: 300px;
    }

    .info-grid {
        gap: 8px;
    }

    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .info-label {
        min-width: auto;
    }
}

/* Review Photos Styles */
.review-photos {
    margin: 10px 0;
}

.photos-header {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, 150px);
    gap: 8px;
    max-width: 100%;
}

.photo-thumbnail {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.photo-thumbnail:hover {
    transform: scale(1.05);
}

.photo-thumbnail img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid #e0e0e0;
    transition: border-color 0.2s ease;
}

.photo-thumbnail img:hover {
    border-color: #007cba;
}

.more-photos {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 150px;
    height: 150px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border: 2px solid #e0e0e0;
}

.more-photos:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: #007cba;
}

.more-photos-text {
    font-size: 12px;
    font-weight: 500;
    text-align: center;
}

/* Photo Modal Styles */
.photo-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.photo-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.photo-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.photo-modal-header h4 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.photo-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.photo-modal-close:hover {
    background-color: #e0e0e0;
    color: #333;
}

.photo-modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    padding: 20px;
    overflow-y: auto;
    max-height: calc(90vh - 80px);
}

.photo-modal-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.photo-modal-item:hover {
    transform: scale(1.02);
}

.photo-modal-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    transition: border-color 0.2s ease;
}

.photo-modal-item img:hover {
    border-color: #007cba;
}

/* Prevent body scroll when modal is open */
body.photo-modal-open {
    overflow: hidden;
}

/* Responsive adjustments for photos */
@media (max-width: 768px) {
    .photos-grid {
        grid-template-columns: repeat(auto-fit, 120px);
        gap: 6px;
    }

    .photo-thumbnail {
        width: 120px;
        height: 120px;
    }

    .photo-thumbnail img {
        width: 120px;
        height: 120px;
    }

    .more-photos {
        width: 120px;
        height: 120px;
    }

    .photo-modal-overlay {
        padding: 10px;
    }

    .photo-modal-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
        padding: 15px;
    }

    .photo-modal-header {
        padding: 12px 15px;
    }

    .photo-modal-header h4 {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .photos-grid {
        grid-template-columns: repeat(auto-fit, 100px);
    }

    .photo-thumbnail {
        width: 100px;
        height: 100px;
    }

    .photo-thumbnail img {
        width: 100px;
        height: 100px;
    }

    .more-photos {
        width: 100px;
        height: 100px;
    }

    .photo-modal-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        padding: 10px;
    }
}