/* ==========================================================================
   Results Display Styles
   Consolidated from results-new.css, api_studio.css, report-error.css and results-display.js
   ========================================================================== */

/* --- Output Section Containers --- */
#output {
    padding: 20px;
}

.result-summary {
    background-color: #ecf0f1;
    color: #333;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.result-summary p {
    margin-bottom: 8px;
}

/* --- Check Overview Box (Header of results) --- */
.check-overview-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.overview-left,
.overview-center,
.overview-right {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.overview-center {
    text-align: center;
}

.no-image-placeholder {
    height: 150px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    border-radius: 4px;
}

.small-placeholder {
    width: 50px;
    height: 50px;
    background: #eee;
    border-radius: 4px;
}

/* --- Gauge Styles --- */
.overall-risk-gauge {
    text-align: center;
}

.risk-gauge-svg {
    width: 150px;
    overflow: visible;
}

.gauge-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gauge-svg-container {
    width: 150px;
    height: auto;
    margin: 10px auto;
}

.gauge-svg {
    overflow: visible;
}

/* --- Result Cards --- */
.result-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    position: relative;
    color: #333;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 15px;
    position: relative;
    padding-right: 120px;
}

.result-header h3 {
    margin: 0;
    font-size: 1.25em;
    color: #333;
    font-weight: 700;
}

.card-gauge-container {
    position: absolute;
    margin-top: 40px;
    right: 0px;
    background-color: #fff;
}

/* Risk Indicators */
.risk-circle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.risk-high {
    background-color: rgb(192, 57, 43);
    box-shadow: 0 0 5px rgba(192, 57, 43, 0.5);
}

.risk-medium {
    background-color: rgb(241, 196, 15);
    box-shadow: 0 0 5px rgba(241, 196, 15, 0.5);
}

.risk-low {
    background-color: rgb(46, 204, 113);
    box-shadow: 0 0 5px rgba(46, 204, 113, 0.5);
}

.risk-safe {
    background-color: #28a745;
    position: relative;
    width: 16px;
    height: 16px;
}

.risk-safe::after {
    content: '✓';
    color: white;
    position: absolute;
    left: 3px;
    top: -3px;
    font-size: 12px;
}

.risk-unknown {
    background-color: #6c757d;
}

/* --- Result Page Sections --- */
.result-section {
    margin-bottom: 15px;
}

.result-section h4 {
    margin: 0 0 10px 0;
    font-size: 0.9em;
    text-transform: uppercase;
    color: #6c757d;
    letter-spacing: 0.5px;
}

.matched-ip p,
.litigation-history p {
    margin: 5px 0;
    font-size: 0.95em;
}

.litigation-history {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    border-left: 3px solid #6c757d;
}

/* --- Visual Comparison --- */
.visual-comparison-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.toggle-switch {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.toggle-label {
    font-size: 0.9em;
    margin-right: 8px;
    color: #666;
}

.switch-container {
    position: relative;
    width: 40px;
    height: 20px;
    background: #ccc;
    border-radius: 20px;
}

.switch-container input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 20px;
}

.switch-knob {
    position: absolute;
    content: '';
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.toggle-switch input:checked+.switch-slider {
    background-color: #2196F3;
}

.toggle-switch input:checked+.switch-slider .switch-knob {
    transform: translateX(20px);
}

.comparison-view-container {
    min-height: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.view-side {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 20px;
    flex-wrap: wrap;
}

.view-overlay {
    width: 100%;
    height: 300px;
}

.comparison-image-box {
    text-align: center;
    flex: 1;
    max-width: 45%;
}

.comparison-image-box .image-label {
    font-weight: bold;
    margin-bottom: 5px;
    color: #555;
}

.comparison-image-box img {
    max-height: 250px;
    max-width: 100%;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.connector-arrow {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* --- Button Styles --- */
#show-more-btn {
    display: block;
    margin: 20px auto;
    padding: 10px 20px;
    font-size: 1em;
    cursor: pointer;
}

.hidden-result {
    display: none;
}

#show-non-results-btn {
    margin-top: 15px;
    background-color: #7f8c8d;
    color: white;
    cursor: pointer;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

#show-non-results-btn:hover {
    background-color: #686f6f;
}

/* --- Non-Results Display --- */
.non-results-container {
    margin-top: 20px;
    border-top: 2px solid #ddd;
    padding-top: 20px;
}

.non-results-container h3 {
    color: #ffffff;
    margin-bottom: 15px;
    font-size: 1.5em;
    font-weight: bold;
}

.non-result-card {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.non-result-info {
    flex: 1;
    min-width: 0;
}

.non-result-info p {
    margin-bottom: 6px;
    font-size: 0.95em;
    line-height: 1.5;
    color: #333;
}

.non-result-info strong {
    font-weight: 600;
    color: #555;
}

.non-result-image {
    flex: 0 0 120px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.non-result-image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    border: 1px solid #ddd;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* --- No Results Message --- */
.no-results-message {
    margin-top: 10px;
}

.no-results-card {
    background-color: #ffffff;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.no-results-card h3,
.no-results-card h4 {
    color: #3498db;
    margin-top: 0;
}

.no-results-card p {
    margin: 10px 0;
}

.no-results-divider {
    border: none;
    border-top: 1px solid #e5e5e5;
    margin: 16px 0;
}

.no-results-bullets {
    margin: 10px 0 10px 0;
    padding-left: 20px;
}

.no-results-bullets li {
    margin: 6px 0;
}

/* --- Utilities --- */
.uniform-img {
    margin-top: 5px;
    margin-right: 10px;
    cursor: pointer;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 4px solid #3498db;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* --- Report Container --- */
.report-container {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    background-color: #fefefe;
    font-size: 1em;
}

.report-text {
    white-space: normal;
    word-wrap: break-word;
    font-family: 'Roboto', sans-serif;
    font-size: 1em;
    color: #333;
    background-color: #fefefe;
    padding: 0;
    margin: 0;
    border: none;
}

.show-report-button {
    padding: 8px 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #f9f9f9;
    cursor: pointer;
    font-size: 0.9em;
    margin-bottom: 10px;
}

.show-report-button:hover {
    background-color: #eee;
}

/* ==========================================================================
   Report Error Overlay Styles (from report-error.css)
   ========================================================================== */

.report-error-btn {
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgb(192, 57, 43);
    background-color: transparent;
    color: rgb(192, 57, 43);
}

.report-error-btn:hover {
    background-color: rgb(192, 57, 43);
    color: white;
}

.report-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.report-modal {
    background: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.report-modal h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid rgb(192, 57, 43);
    padding-bottom: 10px;
}

.report-checkbox-group {
    margin-bottom: 16px;
}

.report-checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
    cursor: pointer;
    color: #000000;
}

.report-checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.report-section {
    margin-left: 26px;
    margin-top: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    display: none;
}

.report-section.visible {
    display: block;
}

.result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    margin-bottom: 8px;
    background: white;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.result-item input[type="checkbox"] {
    width: 16px;
    min-width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin: 0;
    appearance: auto;
    -webkit-appearance: checkbox;
}

.result-item img {
    width: auto;
    max-width: 150px;
    height: 50px;
    object-fit: contain;
    border-radius: 4px;
    flex-shrink: 0;
}

.result-item-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.result-item-info strong {
    display: block;
    font-size: 0.9em;
    color: #333;
}

.result-item-info span {
    font-size: 0.85em;
    color: #666;
}

.missing-form-group {
    margin-bottom: 12px;
}

.missing-form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    font-size: 0.9em;
}

.missing-form-group input,
.missing-form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.95em;
}

.report-comment-group {
    margin-top: 20px;
}

.report-comment-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
}

.report-comment-group textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    resize: vertical;
    font-family: inherit;
}

.report-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

.report-btn-cancel {
    padding: 10px 20px;
    border: 1px solid #ccc;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95em;
}

.report-btn-cancel:hover {
    background: #f5f5f5;
}

.report-btn-submit {
    padding: 10px 20px;
    border: none;
    background: rgb(192, 57, 43);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.95em;
}

.report-btn-submit:hover {
    background: #a93226;
}

.report-btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}