/**
 * NMI Debug Panel Styles
 * Styles for the browser-based debug panel for Apple Pay/Google Pay debugging
 */

/* Main Debug Panel Container */
.nmi-debug-panel {
    background: #1e1e1e;
    border: 2px solid #ffa500;
    border-radius: 8px;
    margin: 20px 0;
    padding: 15px;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 12px;
    color: #e0e0e0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* Panel Header */
.nmi-debug-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #444;
}

.nmi-debug-panel-title {
    font-size: 16px;
    font-weight: bold;
    color: #ffa500;
    margin: 0;
}

.nmi-debug-panel-subtitle {
    font-size: 11px;
    color: #999;
    margin: 5px 0 0 0;
}

/* Panel Buttons */
.nmi-debug-panel-actions {
    display: flex;
    gap: 10px;
}

.nmi-debug-btn {
    background: #444;
    color: #fff;
    border: 1px solid #666;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 11px;
    cursor: pointer;
    font-family: 'Courier New', Consolas, monospace;
    transition: background 0.2s;
}

.nmi-debug-btn:hover {
    background: #555;
}

.nmi-debug-btn:active {
    background: #333;
}

/* System Info Section */
.nmi-debug-section {
    margin-bottom: 15px;
}

.nmi-debug-section-title {
    font-size: 13px;
    font-weight: bold;
    color: #4fc3f7;
    margin: 0 0 8px 0;
    padding-bottom: 5px;
    border-bottom: 1px solid #333;
}

.nmi-debug-system-info {
    background: #2a2a2a;
    padding: 10px;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
}

.nmi-debug-info-item {
    margin: 5px 0;
    line-height: 1.5;
}

.nmi-debug-info-item strong {
    color: #81c784;
    display: inline-block;
    min-width: 200px;
}

.nmi-debug-info-item span {
    color: #e0e0e0;
    word-break: break-all;
}

/* Logs Container */
.nmi-debug-logs-container {
    background: #2a2a2a;
    padding: 10px;
    border-radius: 4px;
    max-height: 300px;
    overflow-y: auto;
    overflow-x: auto;
}

.nmi-debug-no-logs {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 20px 0;
}

/* Log Entry Styles */
.nmi-debug-logs-container > div {
    margin: 3px 0;
    padding: 5px 8px;
    border-radius: 3px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Log Types */
.nmi-debug-log-log {
    background: rgba(76, 175, 80, 0.1);
    border-left: 3px solid #4caf50;
    color: #a5d6a7;
}

.nmi-debug-log-info {
    background: rgba(33, 150, 243, 0.1);
    border-left: 3px solid #2196f3;
    color: #90caf9;
}

.nmi-debug-log-warn {
    background: rgba(255, 152, 0, 0.1);
    border-left: 3px solid #ff9800;
    color: #ffcc80;
}

.nmi-debug-log-error {
    background: rgba(244, 67, 54, 0.1);
    border-left: 3px solid #f44336;
    color: #ef9a9a;
}

/* Log Components */
.nmi-debug-timestamp {
    color: #999;
    font-size: 10px;
}

.nmi-debug-type {
    font-weight: bold;
    display: inline-block;
    min-width: 50px;
}

.nmi-debug-log-log .nmi-debug-type {
    color: #4caf50;
}

.nmi-debug-log-info .nmi-debug-type {
    color: #2196f3;
}

.nmi-debug-log-warn .nmi-debug-type {
    color: #ff9800;
}

.nmi-debug-log-error .nmi-debug-type {
    color: #f44336;
}

.nmi-debug-message {
    color: #e0e0e0;
}

/* Scrollbar Styling for WebKit Browsers */
.nmi-debug-logs-container::-webkit-scrollbar,
.nmi-debug-system-info::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.nmi-debug-logs-container::-webkit-scrollbar-track,
.nmi-debug-system-info::-webkit-scrollbar-track {
    background: #1e1e1e;
    border-radius: 4px;
}

.nmi-debug-logs-container::-webkit-scrollbar-thumb,
.nmi-debug-system-info::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

.nmi-debug-logs-container::-webkit-scrollbar-thumb:hover,
.nmi-debug-system-info::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nmi-debug-panel {
        font-size: 11px;
        padding: 10px;
    }

    .nmi-debug-panel-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .nmi-debug-panel-actions {
        margin-top: 10px;
        width: 100%;
    }

    .nmi-debug-btn {
        flex: 1;
        padding: 8px 10px;
    }

    .nmi-debug-info-item strong {
        display: block;
        min-width: auto;
        margin-bottom: 2px;
    }

    .nmi-debug-logs-container {
        max-height: 250px;
    }

    .nmi-debug-system-info {
        max-height: 150px;
    }
}

/* Print Styles - Hide debug panel when printing */
@media print {
    .nmi-debug-panel {
        display: none !important;
    }
}

/* Collapsible Section (optional for future enhancement) */
.nmi-debug-section.collapsed .nmi-debug-system-info,
.nmi-debug-section.collapsed .nmi-debug-logs-container {
    display: none;
}

/* Loading State */
.nmi-debug-loading {
    text-align: center;
    padding: 20px;
    color: #999;
    font-style: italic;
}

.nmi-debug-loading:after {
    content: '...';
    animation: nmi-debug-dots 1.5s steps(4, end) infinite;
}

@keyframes nmi-debug-dots {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60%, 100% {
        content: '...';
    }
}
