/**
 * Standalone Scan Styles
Scan-specific CSS for reusable scan popup component
 */

/* Popup Overlay */
.manual-buy-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: none;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
    pointer-events: auto;
}

/* Popup Container */
.manual-buy-popup {
    position: fixed;
    background: var(--surface);
    border-radius: 14px;
    box-shadow: var(--shadow-md);
    width: auto;
    min-width: 400px;
    max-width: 900px;
    height: auto;
    max-height: 90vh;
    overflow: auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: slideUp 0.3s ease-out;
    pointer-events: all;
    z-index: 10001;
    resize: none; /* Disable native resize, use custom handles */
    touch-action: none;
    will-change: transform, left, top;
    transition: none;
    cursor: default;
    display: flex;
    flex-direction: column;
    font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    font-size: 14px;
    color: var(--text);
}

/* Custom resize handles */
.manual-buy-resize-handle {
    position: absolute;
    background: transparent;
    z-index: 10;
    transition: background 0.2s;
}

.manual-buy-resize-handle:hover {
    background: rgba(102, 126, 234, 0.3);
}

/* Popup Header */
.manual-buy-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
}

.manual-buy-popup-header h5 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

/* Popup Body */
.manual-buy-popup-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* Popup Footer */
.manual-buy-popup-footer {
    padding: 8px 16px;
    border-top: 1px solid var(--border);
    background: var(--surface-2);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Close Button */
.manual-buy-close-btn {
    background: var(--surface-3);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.manual-buy-close-btn:hover {
    background: var(--surface-4);
    border-color: var(--border-hover);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Scan Grid Layout */
.scan-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 12px;
}

.scan-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    background: var(--surface-2);
    border-radius: 4px;
    border: 1px solid var(--border);
}

[data-theme="dark"] .scan-item {
    background: var(--surface-2);
    border-color: var(--border);
}

.scan-label {
    font-size: 12px;
    color: var(--muted);
    font-weight: 500;
}

[data-theme="dark"] .scan-label {
    color: var(--muted);
}

.scan-value {
    font-size: 13px;
    color: var(--text);
    font-weight: 600;
}

[data-theme="dark"] .scan-value {
    color: var(--text);
}

.scan-section {
    margin-bottom: 20px;
}

.scan-section h6 {
    color: var(--text);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

[data-theme="dark"] .scan-section h6 {
    color: var(--text);
}

/* AI Badge Styles */
.ai-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.ai-pass {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.ai-fail {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

[data-theme="dark"] .ai-pass {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border-color: rgba(34, 197, 94, 0.4);
}

[data-theme="dark"] .ai-fail {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.4);
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .manual-buy-popup {
        min-width: 90%;
        max-width: 90%;
    }

    .scan-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Custom resize handles - from AVGDN popup */
.manual-buy-resize-handle {
    position: absolute;
    background: transparent;
    z-index: 10;
    transition: background 0.2s;
}

.manual-buy-resize-handle:hover {
    background: rgba(102, 126, 234, 0.3);
}