.fraud-badge-success {
    border-radius: 50%;
    width:         20px;
    height:        20px;
    padding:       8px;
    margin-right:  4px;
    display:       inline-block;
    line-height:   19px;
    box-sizing:    content-box;
    background:    #c6e1c6;
    border:        2px solid #c6e1c6;
    color:         #5b841b;
    text-align:    center;
}

.fraud-badge-warning {
    border-radius: 50%;
    width:         20px;
    height:        20px;
    padding:       8px;
    margin-right:  4px;
    display:       inline-block;
    line-height:   19px;
    box-sizing:    content-box;
    background:    #fff8c4;
    border:        2px solid #fff8c4;
    color:         #e3b000;
    text-align:    center;

}

.fraud-badge-sub {
    border-radius: 50%;
    width:         20px;
    height:        20px;
    padding:       8px;
    margin-right:  4px;
    display:       inline-block;
    line-height:   19px;
    background:    #ccc;
    border:        2px solid #ccc;
    text-align:    center;
    box-sizing:    content-box;

}

.fraud-badge-danger {
    border-radius: 50%;
    width:         20px;
    height:        20px;
    padding:       8px;
    margin-right:  4px;
    display:       inline-block;
    line-height:   19px;
    box-sizing:    content-box;
    background:    #eba3a3;
    border:        2px solid #eba3a3;
    color:         #dc3545;
    text-align:    center;
}

.fraud-tooltip {
    position: relative;
    display:  inline-block;
}

.fraud-tooltip .fraud-tooltiptext {
    visibility: hidden;
    width: 200px;
    max-width: 200px;
    background-color: #333;
    color: #fff;
    text-align: left;
    padding: 10px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.4;
    position: absolute;
    z-index: 999999999;
    left: -100px;
    top: 25px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* Specific positioning for different badge types */
/* First security check item - any badge type */
.checks-display .fraud-tooltip:first-child .fraud-tooltiptext {
    left: 150px !important;
}

/* Last security check item - any badge type */
.checks-display .fraud-tooltip:last-child .fraud-tooltiptext {
    left: -130px;
}

/* Show the tooltip text when you mouse over the tooltip container */
.fraud-tooltip:hover .fraud-tooltiptext {
    visibility: visible;
}

.fraud-tooltip:hover {
    cursor: pointer;
}

.fraud-message {
    padding-bottom: 10px;
    margin-bottom:  100px;
}

/* New Fraud Check Container Styles */
.fraud-check-container {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.fraud-check-container.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Risk Summary Styles */
.risk-summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.risk-score {
    text-align: center;
    min-width: 80px;
}

.risk-score-tooltip {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.risk-score-tooltip .risk-score-tooltiptext {
    visibility: hidden;
    width: 200px;
    max-width: 200px;
    background-color: #333;
    color: #fff;
    text-align: left;
    padding: 15px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.4;
    position: absolute;
    z-index: 999999999;
    left: -100px;
    top: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.risk-score-tooltip:hover .risk-score-tooltiptext {
    visibility: visible;
    opacity: 1;
}

.risk-score-tooltip:hover {
    cursor: help;
}

.risk-score-number {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.risk-score-label {
    display: block;
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.risk-level {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.risk-level-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.risk-level-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.risk-level-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.liability-shifted-badge {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
}

/* System Error Badge */
.system-error-badge {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
}

.system-error-text {
    color: #721c24;
}

/* Payment Failure Badge */
.payment-failure-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
}

.payment-failure-badge.payment-failure-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.payment-failure-badge.payment-failure-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.payment-failure-badge.payment-failure-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.payment-failure-text {
    font-weight: bold;
}

/* System Error Details */
.system-error-details {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8d7da;
    border-radius: 6px;
    border: 1px solid #f5c6cb;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.system-error-info p {
    margin: 8px 0;
    line-height: 1.4;
}

.system-error-info strong {
    color: #721c24;
}

/* Contact Support Section */
.contact-support-section {
    margin-top: 20px;
    padding: 15px;
    background: #fff3cd;
    border-radius: 6px;
    border: 1px solid #ffeaa7;
    border-left: 4px solid #ffc107;
}

.contact-support-section h5 {
    margin: 0 0 15px 0;
    color: #856404;
    font-size: 16px;
    font-weight: 600;
}

.contact-support-section h6 {
    margin: 15px 0 10px 0;
    color: #856404;
    font-size: 14px;
    font-weight: 600;
}

.contact-support-section p {
    margin: 8px 0;
    line-height: 1.4;
    color: #856404;
}

.contact-support-section strong {
    color: #856404;
}

.support-details {
    margin: 15px 0;
    padding: 12px;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #ffeaa7;
}

.support-details ul {
    margin: 8px 0;
    padding-left: 20px;
}

.support-details li {
    margin: 5px 0;
    line-height: 1.4;
    color: #856404;
}

.support-contact {
    margin-top: 15px;
    padding: 12px;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #ffeaa7;
}

.support-contact ul {
    margin: 8px 0;
    padding-left: 20px;
}

.support-contact li {
    margin: 5px 0;
    line-height: 1.4;
    color: #856404;
}

.support-contact a {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
}

.support-contact a:hover {
    text-decoration: underline;
    color: #005a87;
}

/* Payment Failure Details */
.payment-failure-details {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.payment-failure-info p {
    margin: 8px 0;
    line-height: 1.4;
}

.payment-failure-info strong {
    color: #495057;
}

/* Section Headers */
.fraud-check-container h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Checks Display */
.checks-display {
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Check Details */
.check-details {
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Recommendations */
.recommendations {
    margin-bottom: 20px;
}

.recommendation {
    margin-bottom: 10px;
    padding: 12px;
    border-radius: 6px;
    border-left: 4px solid;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.recommendation:hover {
    transform: translateX(2px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.recommendation-success {
    background: #d4edda;
    border-left-color: #28a745;
}

.recommendation-info {
    background: #d1ecf1;
    border-left-color: #17a2b8;
}

.recommendation-warning {
    background: #fff3cd;
    border-left-color: #ffc107;
}

.recommendation-danger {
    background: #f8d7da;
    border-left-color: #dc3545;
}

.recommendation-message {
    font-weight: 500;
    margin-bottom: 5px;
}

.recommendation-action {
    font-size: 13px;
    margin-bottom: 5px;
}

.recommendation-context {
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.recommendation-causes {
    margin-top: 10px;
    font-size: 12px;
}

.recommendation-causes strong {
    color: #333;
    display: block;
    margin-bottom: 5px;
}

.recommendation-causes ul {
    margin: 5px 0;
    padding-left: 15px;
}

.recommendation-causes li {
    margin-bottom: 3px;
    line-height: 1.3;
    color: #555;
}

/* Additional Info */
.additional-info {
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Help Links */
.help-section {
    margin-bottom: 15px;
}

.help-links h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 14px;
    font-weight: 600;
}

.help-links {
    margin-bottom: 0;
    padding: 12px 15px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.help-links a {
    color: #0073aa;
    text-decoration: none;
    transition: color 0.2s ease;
}

.help-links a:hover {
    text-decoration: underline;
    color: #005a87;
}

/* Check Explanations */
.check-explanations {
    margin-top: 20px;
    padding: 15px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.check-explanation {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.check-explanation:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.check-explanation h5 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.check-explanation p {
    margin: 0 0 10px 0;
    line-height: 1.5;
}

.explanation-results,
.explanation-causes {
    margin: 15px 0;
}

.explanation-results ul,
.explanation-causes ul {
    margin: 10px 0;
    padding-left: 20px;
}

.explanation-results li,
.explanation-causes li {
    margin-bottom: 5px;
    line-height: 1.4;
}

/* Enhanced tooltip styles */
.fraud-tooltip .fraud-tooltiptext {
    visibility: hidden;
    width: 200px;
    max-width: 200px;
    background-color: #333;
    color: #fff;
    text-align: left;
    padding: 12px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.5;
    position: absolute;
    z-index: 999999999;
    top: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fraud-tooltip:hover .fraud-tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Compact Display for Orders List */
.fraud-check-compact {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-start;
}

.liability-status {
    font-size: 11px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.liability-status.protected {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.liability-status.review {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.liability-status.system-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    font-size: 10px;
    padding: 1px 4px;
}

/* Payment Failure Badges */
.liability-status.payment-failure-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    font-size: 10px;
    padding: 1px 4px;
}

.liability-status.payment-failure-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
    font-size: 10px;
    padding: 1px 4px;
}

.liability-status.payment-failure-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    font-size: 10px;
    padding: 1px 4px;
}

.liability-status.payment-failure {
    background: #e2e3e5;
    color: #383d41;
    border: 1px solid #d6d8db;
    font-size: 10px;
    padding: 1px 4px;
}

.risk-score-compact {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 40px;
}

.risk-score-compact .risk-number {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    line-height: 1;
}

.risk-score-compact .risk-label {
    font-size: 8px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.checks-compact {
    display: flex;
    gap: 2px;
}

.checks-compact .fraud-badge-success,
.checks-compact .fraud-badge-warning,
.checks-compact .fraud-badge-danger,
.checks-compact .fraud-badge-sub {
    width: 16px;
    height: 16px;
    padding: 4px;
    font-size: 10px;
    line-height: 16px;
    margin-right: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .risk-summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .fraud-tooltip .fraud-tooltiptext {
        width: 200px;
        font-size: 11px;
    }
    
    .fraud-check-container {
        padding: 10px;
    }
    
    .risk-score-number {
        font-size: 20px;
    }
    
    .risk-level {
        font-size: 12px;
        padding: 6px 12px;
    }

    .fraud-check-compact {
        gap: 3px;
    }
    
    .liability-status {
        font-size: 10px;
        padding: 1px 4px;
    }
    
    .risk-score-compact .risk-number {
        font-size: 14px;
    }
    
    .risk-score-compact .risk-label {
        font-size: 7px;
    }
    
    .checks-compact .fraud-badge-success,
    .checks-compact .fraud-badge-warning,
    .checks-compact .fraud-badge-danger,
    .checks-compact .fraud-badge-sub {
        width: 14px;
        height: 14px;
        padding: 3px;
        font-size: 9px;
        line-height: 14px;
    }
}

.wrapper-info {
    margin:      30px;
    margin-left: 0px;
}

.wrapper-info .ag-notice {
    background-color: #fff;
    padding:          10px 20px;
    border-left:      5px solid #3286e9;
    border-radius:    3px;
    box-shadow:       rgba(149, 157, 165, 0.2) 0px 8px 24px;
}

.wrapper-info .ag-notice .subject {
    margin-right: 0px;
    padding:      20px 0px;
}

.wrapper-info .ag-notice .subject p {
    color: #909092;
}

/* Modal Styles */
.check-explanations-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999999;
    display: none;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(2px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 90%;
    max-height: 90%;
    width: 600px;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e0e0e0;
    background: #f9f9f9;
}

.modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.modal-info {
    padding: 10px 25px;
    border-bottom: 1px solid #e0e0e0;
}

.info-box {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 6px;
    padding: 20px 15px;
    font-size: 13px;
    line-height: 1.5;
    color: #2c5aa0;
}

.info-box strong {
    color: #1a4a8a;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #e0e0e0;
    color: #333;
}

.modal-body {
    padding: 25px;
    max-height: 40vh;
    overflow-y: auto;
}

.modal-body .check-explanation {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-body .check-explanation:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.modal-body .check-explanation h5 {
    color: #333;
    font-size: 16px;
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #0073aa;
}

.modal-body .check-explanation p {
    margin: 10px 0;
    line-height: 1.6;
    color: #555;
}

.modal-body .explanation-results,
.modal-body .explanation-causes {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #0073aa;
}

.modal-body .explanation-results strong,
.modal-body .explanation-causes strong {
    color: #333;
    display: block;
    margin-bottom: 8px;
}

.modal-body .explanation-results ul,
.modal-body .explanation-causes ul {
    margin: 0;
    padding-left: 20px;
}

.modal-body .explanation-results li,
.modal-body .explanation-causes li {
    margin: 5px 0;
    line-height: 1.5;
    color: #555;
}

.modal-body .result-code {
    display: inline-block;
    background: #0073aa;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    margin-right: 8px;
    min-width: 20px;
    text-align: center;
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
}

/* Responsive modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 95%;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-header h3 {
        font-size: 16px;
    }
    
    .modal-body {
        padding: 20px;
        max-height: 80vh;
    }
    
    .modal-body .check-explanation h5 {
        font-size: 14px;
    }
}