/* CTV Debug Panel */
.ctv-debug-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 99999;
    font-family: 'Quicksand', sans-serif;
    transition: all 0.3s ease;
}

.ctv-debug-panel.hidden {
    transform: translateX(400px);
    opacity: 0;
    pointer-events: none;
}

/* Header */
.ctv-debug-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px 12px 0 0;
    color: white;
}

.ctv-debug-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.95rem;
}

.ctv-debug-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ctv-debug-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Body */
.ctv-debug-body {
    padding: 16px;
    max-height: 400px;
    overflow-y: auto;
}

/* Section */
.ctv-debug-section {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.ctv-debug-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.ctv-debug-label {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 4px;
    font-weight: 600;
}

.ctv-debug-value {
    font-size: 0.9rem;
    color: #2c3e50;
    font-weight: 600;
}

/* Status */
.ctv-status-active {
    color: #27ae60;
    font-weight: 700;
}

.ctv-status-inactive {
    color: #95a5a6;
}

/* CTV Info Detail */
.ctv-info-detail {
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.ctv-info-detail strong {
    color: #667eea;
    font-size: 1rem;
}

.ctv-info-detail small {
    color: #666;
    display: block;
    margin-top: 4px;
}

/* Rate & Commission */
.ctv-rate {
    color: #e74c3c;
    font-size: 1.1rem;
    font-weight: 700;
}

.ctv-commission {
    color: #27ae60;
    font-size: 1.1rem;
    font-weight: 700;
}

.ctv-expiry {
    color: #f39c12;
    font-size: 0.85rem;
}

/* Actions */
.ctv-debug-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.ctv-debug-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-family: 'Quicksand', sans-serif;
}

.ctv-debug-btn-refresh {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.ctv-debug-btn-refresh:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.ctv-debug-btn-clear {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: white;
}

.ctv-debug-btn-clear:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
}

.ctv-debug-btn-console {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: white;
}

.ctv-debug-btn-console:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.4);
}

/* Toggle Button */
.ctv-debug-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    z-index: 99998;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    gap: 2px;
}

.ctv-debug-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.ctv-debug-toggle svg {
    width: 20px;
    height: 20px;
}

/* Hide toggle when panel is open */
.ctv-debug-panel:not(.hidden) + .ctv-debug-toggle {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.8);
}

/* Scrollbar */
.ctv-debug-body::-webkit-scrollbar {
    width: 6px;
}

.ctv-debug-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.ctv-debug-body::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.ctv-debug-body::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .ctv-debug-panel {
        width: calc(100% - 40px);
        bottom: 10px;
        right: 10px;
        left: 10px;
    }
    
    .ctv-debug-panel.hidden {
        transform: translateY(500px);
    }
    
    .ctv-debug-toggle {
        bottom: 10px;
        right: 10px;
        width: 48px;
        height: 48px;
    }
    
    .ctv-debug-toggle svg {
        width: 18px;
        height: 18px;
    }
    
    .ctv-debug-actions {
        flex-direction: column;
    }
}
