/* PLuG Playground Styles - Stripe-Inspired Clean Design */

/* Import Google Fonts - Cleaner font stack */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Refined Color System - Stripe-inspired */
:root {
    /* Primary Colors - More subtle */
    --primary-color: #635bff;
    --primary-hover: #5a54e8;
    --primary-light: #f6f5ff;
    --primary-dark: #4c44d4;
    
    /* Success/Error - Stripe colors */
    --success-color: #00d924;
    --success-hover: #00c220;
    --success-light: #f0fdf4;
    
    --warning-color: #ffb946;
    --warning-hover: #f5a623;
    --warning-light: #fffdf0;
    
    --danger-color: #ff5a5f;
    --danger-hover: #e5484d;
    --danger-light: #fef2f2;
    
    --info-color: #0099ff;
    --info-hover: #0080e6;
    --info-light: #f0f9ff;
    
    /* Neutral Colors - Stripe grays */
    --white: #ffffff;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-300: #d4d4d8;
    --gray-400: #a1a1aa;
    --gray-500: #71717a;
    --gray-600: #52525b;
    --gray-700: #3f3f46;
    --gray-800: #27272a;
    --gray-900: #18181b;
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 0.9375rem;
    --font-size-lg: 1.0625rem;
    --font-size-xl: 1.1875rem;
    --font-size-2xl: 1.375rem;
    --font-size-3xl: 1.75rem;
    --font-size-4xl: 2.125rem;
    
    /* Spacing - Tighter, more refined */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    
    /* Border Radius - Subtle */
    --radius-sm: 0.25rem;
    --radius: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Shadows - Much more subtle like Stripe */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px 0 rgba(0, 0, 0, 0.02);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    
    /* Transitions */
    --transition-all: all 0.15s ease;
    --transition-colors: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

/* Global Styles */
body {
    font-family: var(--font-family);
    background: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: var(--font-size-base);
}

/* Clean Header - Stripe-style */
.playground-header {
    background: linear-gradient(180deg, var(--white) 0%, var(--gray-50) 100%);
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-900);
    padding: var(--space-16) 0 var(--space-12) 0;
    text-align: center;
}

.playground-header h1 {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-4);
    letter-spacing: -0.025em;
}

.playground-header .lead {
    font-size: var(--font-size-lg);
    color: var(--gray-600);
    margin-bottom: var(--space-6);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 400;
}

/* Clean Alert */
.playground-header .alert-warning {
    background: var(--warning-light);
    border: 1px solid var(--warning-color);
    color: var(--gray-700);
    border-radius: var(--radius-lg);
    max-width: 600px;
    margin: 0 auto var(--space-6) auto;
    padding: var(--space-4);
    box-shadow: var(--shadow-sm);
}

.playground-header .alert-warning .fas {
    color: var(--warning-color);
    margin-right: var(--space-2);
}

.playground-header .btn-link {
    color: var(--gray-500);
    font-weight: 500;
    text-decoration: none;
    font-size: var(--font-size-sm);
    transition: var(--transition-colors);
}

.playground-header .btn-link:hover {
    color: var(--gray-700);
    text-decoration: underline;
}

/* Main Section */
.playground-section {
    background: var(--gray-50);
    padding: var(--space-12) 0;
    min-height: 70vh;
}

/* Refined Cards */
.card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-all);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow);
    border-color: var(--gray-300);
}

.card-header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: var(--space-5) var(--space-6);
}

.card-header h3 {
    color: var(--gray-900);
    font-weight: 600;
    margin: 0;
    font-size: var(--font-size-lg);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.card-header h3 i {
    color: var(--gray-500);
    font-size: var(--font-size-base);
}

.card-body {
    padding: var(--space-6);
    background: var(--white);
}

/* Refined Buttons - Stripe-style */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1rem;
    font-size: var(--font-size-sm);
    font-weight: 500;
    line-height: 1.4;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-all);
    white-space: nowrap;
    user-select: none;
    gap: var(--space-2);
    min-height: 2.25rem;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Button Variants */
.btn-primary {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-success {
    background: var(--success-color);
    color: var(--white);
    border-color: var(--success-color);
}

.btn-success:hover {
    background: var(--success-hover);
    border-color: var(--success-hover);
}

.btn-secondary {
    background: var(--white);
    color: var(--gray-700);
    border-color: var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.btn-outline-primary {
    background: var(--white);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-secondary {
    background: var(--white);
    color: var(--gray-600);
    border-color: var(--gray-300);
}

.btn-outline-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
    color: var(--gray-700);
}

.btn-outline-danger {
    background: var(--white);
    border-color: var(--danger-color);
    color: var(--danger-color);
}

.btn-outline-danger:hover {
    background: var(--danger-light);
    border-color: var(--danger-color);
    color: var(--danger-color);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: var(--font-size-xs);
    min-height: 1.875rem;
}

/* Clean Form Controls */
.form-label {
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: var(--space-2);
    font-size: var(--font-size-sm);
    display: block;
}

.form-control, .form-select {
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    padding: 0.625rem 0.75rem;
    font-size: var(--font-size-sm);
    color: var(--gray-800);
    transition: var(--transition-all);
    box-shadow: var(--shadow-xs);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.1);
    outline: none;
}

.form-control::placeholder {
    color: var(--gray-400);
}

.form-check {
    margin-bottom: var(--space-3);
}

.form-check-input {
    width: 1rem;
    height: 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    background: var(--white);
    transition: var(--transition-all);
}

.form-check-input:checked {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.1);
}

.form-check-label {
    margin-left: var(--space-2);
    color: var(--gray-700);
    font-weight: 400;
    font-size: var(--font-size-sm);
}

.form-check-label strong {
    font-weight: 500;
    color: var(--gray-900);
}

.form-check-label small {
    color: var(--gray-500);
    font-size: var(--font-size-xs);
}

/* Contact Results */
#contactResults {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.list-group-item {
    background: var(--white);
    border: none;
    border-bottom: 1px solid var(--gray-100);
    padding: var(--space-4);
    transition: var(--transition-colors);
}

.list-group-item:hover {
    background: var(--gray-50);
}

.list-group-item h6 {
    color: var(--gray-900);
    font-weight: 500;
    margin-bottom: var(--space-1);
    font-size: var(--font-size-sm);
}

.list-group-item p {
    color: var(--gray-600);
    margin-bottom: var(--space-1);
    font-size: var(--font-size-xs);
}

.list-group-item small {
    color: var(--gray-500);
    font-size: var(--font-size-xs);
}

/* Current Contact */
#currentContactInfo {
    background: var(--success-light);
    border: 1px solid var(--success-color);
    color: var(--gray-700);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    box-shadow: var(--shadow-xs);
}

#currentContactInfo strong {
    color: var(--success-color);
    font-weight: 500;
}

/* Preview Container */
.preview-container {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    margin-bottom: var(--space-4);
    box-shadow: var(--shadow-xs);
}

.preview-info {
    background: var(--info-light);
    border: 1px solid var(--info-color);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    margin-bottom: var(--space-4);
}

.preview-status {
    text-align: center;
    margin-bottom: var(--space-4);
}

.preview-status .badge {
    font-size: var(--font-size-xs);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius);
    font-weight: 500;
}

.preview-actions {
    display: flex;
    gap: var(--space-2);
    justify-content: center;
    margin-top: var(--space-4);
    flex-wrap: wrap;
}

/* Event Log */
.log-container {
    margin-top: var(--space-6);
}

#eventLog {
    background: var(--gray-900);
    color: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Source Code Pro', monospace;
    font-size: var(--font-size-xs);
    line-height: 1.4;
    max-height: 300px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
    box-shadow: var(--shadow-xs);
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: var(--space-1) var(--space-2);
    font-size: var(--font-size-xs);
    font-weight: 500;
    line-height: 1;
    border-radius: var(--radius);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge-primary {
    background: var(--primary-color);
    color: var(--white);
}

.badge-success {
    background: var(--success-color);
    color: var(--white);
}

.badge-warning {
    background: var(--warning-color);
    color: var(--white);
}

.badge-danger {
    background: var(--danger-color);
    color: var(--white);
}

.badge-info {
    background: var(--info-color);
    color: var(--white);
}

.badge-secondary {
    background: var(--gray-500);
    color: var(--white);
}

/* Test Section - Enhanced */
.test-section {
    margin-top: var(--space-12);
    position: relative;
}

.test-section .card {
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}

.test-section .card-header {
    background: var(--primary-light);
    color: var(--primary-color);
    border-bottom: 1px solid var(--primary-color);
    padding: var(--space-5) var(--space-6);
}

.test-section .card-header h3 {
    color: var(--primary-color);
    margin-bottom: 0;
    font-size: var(--font-size-xl);
    font-weight: 600;
}

.test-section .card-body {
    padding: var(--space-10);
}

/* Section Headers in Test Actions - Enhanced */
.test-section h5 {
    color: var(--gray-900);
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
}

.test-section h6 {
    color: var(--gray-800);
    font-size: var(--font-size-base);
    font-weight: 500;
    margin-bottom: var(--space-4);
    margin-top: var(--space-8);
}

/* Button Grid Layout - Enhanced Spacing */
.test-section .row {
    margin-bottom: var(--space-8);
}

.test-section .row:last-child {
    margin-bottom: 0;
}

/* Better alignment for conversation controls */
.test-section .row.align-items-center {
    align-items: center;
}

.test-section .row.align-items-center .input-group {
    margin-bottom: 0;
}

.test-section .row.align-items-center .input-group .form-control {
    height: calc(2.25rem + 2px); /* Match button height */
}

.test-section .row.align-items-center .input-group .btn {
    height: calc(2.25rem + 2px); /* Match input height */
    white-space: nowrap;
    min-width: 140px;
}

/* Enhanced section spacing for test actions */
.test-section .mb-6 {
    margin-bottom: var(--space-12);
}

.test-section .mb-6:last-child {
    margin-bottom: 0;
}

/* Test Section Button Enhancements */
.test-section .btn {
    width: 100%;
    margin-bottom: var(--space-3);
    font-size: var(--font-size-sm);
    font-weight: 500;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    border: 1px solid;
    cursor: pointer;
    user-select: none;
    /* Remove any tooltip attributes */
    pointer-events: auto;
}

.test-section .btn * {
    pointer-events: none;
}

.test-section .btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.test-section .btn:active {
    transform: translateY(0);
}

.test-section .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Loading state */
.test-section .btn .spinner-border {
    width: 1rem;
    height: 1rem;
    margin-right: var(--space-2);
}

/* Prevent any tooltip or overlay interference */
.test-section .btn[title]:hover::before,
.test-section .btn[title]:hover::after,
.test-section .btn[data-title]:hover::before,
.test-section .btn[data-title]:hover::after {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Additional cleanup for test section */
.test-section .btn-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.test-section .btn-toolbar .btn {
    flex: 1;
    min-width: 0;
}

/* Ensure proper spacing for form elements */
.test-section .form-group {
    margin-bottom: var(--space-4);
}

.test-section .form-group:last-child {
    margin-bottom: 0;
}

.test-section .form-label {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: 500;
    color: var(--gray-700);
    font-size: var(--font-size-sm);
}

.test-section .form-label.text-muted {
    color: var(--gray-500);
    font-weight: 400;
}

/* Clean up any overlapping elements */
.test-section * {
    z-index: auto;
}

.test-section .btn {
    z-index: 1;
}

/* Custom button colors for test actions */
.test-section .btn-outline-primary {
    background: var(--white);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.test-section .btn-outline-primary:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.test-section .btn-outline-secondary {
    background: var(--white);
    border: 1px solid var(--gray-400);
    color: var(--gray-700);
}

.test-section .btn-outline-secondary:hover {
    background: var(--gray-500);
    color: var(--white);
    border-color: var(--gray-500);
}

.test-section .btn-outline-success {
    background: var(--white);
    border: 1px solid var(--success-color);
    color: var(--success-color);
}

.test-section .btn-outline-success:hover {
    background: var(--success-color);
    color: var(--white);
    border-color: var(--success-color);
}

.test-section .btn-outline-warning {
    background: var(--white);
    border: 1px solid var(--warning-color);
    color: var(--warning-color);
}

.test-section .btn-outline-warning:hover {
    background: var(--warning-color);
    color: var(--white);
    border-color: var(--warning-color);
}

.test-section .btn-outline-danger {
    background: var(--white);
    border: 1px solid var(--danger-color);
    color: var(--danger-color);
}

.test-section .btn-outline-danger:hover {
    background: var(--danger-color);
    color: var(--white);
    border-color: var(--danger-color);
}

.test-section .btn-outline-info {
    background: var(--white);
    border: 1px solid var(--info-color);
    color: var(--info-color);
}

.test-section .btn-outline-info:hover {
    background: var(--info-color);
    color: var(--white);
    border-color: var(--info-color);
}

/* Form elements in test section */
.test-section .form-group {
    margin-bottom: var(--space-4);
}

.test-section .form-label {
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: var(--space-2);
    font-size: var(--font-size-sm);
}

.test-section .form-control {
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-300);
    padding: var(--space-3);
    font-size: var(--font-size-sm);
}

.test-section .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.1);
}

.test-section .input-group {
    display: flex;
    align-items: stretch;
}

.test-section .input-group .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
}

.test-section .input-group .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    width: auto;
    min-width: 120px;
}

/* Remove any tooltips or overlays that might be causing issues */
.test-section [title],
.test-section [data-title],
.test-section [data-tooltip] {
    position: relative;
}

/* Prevent any tooltip positioning issues */
.test-section .tooltip,
.test-section .popover {
    display: none !important;
}

/* Ensure buttons don't have conflicting positioning */
.test-section .btn {
    position: relative;
    z-index: 1;
}

/* Clean up any stray tooltip content */
.test-section *::before,
.test-section *::after {
    display: none;
}

/* Responsive improvements for test section */
@media (max-width: 768px) {
    .test-section .card-body {
        padding: var(--space-5);
    }
    
    .test-section .btn {
        font-size: var(--font-size-xs);
        padding: var(--space-2) var(--space-3);
    }
    
    .test-section .row {
        margin-bottom: var(--space-4);
    }
}

@media (max-width: 576px) {
    .test-section .card-body {
        padding: var(--space-4);
    }
    
    .test-section h5 {
        font-size: var(--font-size-base);
    }
    
    .test-section .btn {
        margin-bottom: var(--space-2);
    }
}

/* Docs Section */
.docs-section {
    margin-top: var(--space-12);
}

.docs-section .card-header {
    background: var(--gray-50);
    color: var(--gray-900);
}

.docs-section .card-header h3 {
    color: var(--gray-900);
}

.docs-section ul, .docs-section ol {
    padding-left: var(--space-5);
    margin-bottom: var(--space-4);
}

.docs-section li {
    margin-bottom: var(--space-2);
    color: var(--gray-700);
    line-height: 1.5;
    font-size: var(--font-size-sm);
}

.docs-section strong {
    color: var(--gray-900);
    font-weight: 500;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .playground-header {
        padding: var(--space-12) 0 var(--space-8) 0;
    }
    
    .playground-header h1 {
        font-size: var(--font-size-3xl);
    }
    
    .playground-header .lead {
        font-size: var(--font-size-base);
    }
    
    .card-body {
        padding: var(--space-5);
    }
    
    .btn {
        font-size: var(--font-size-xs);
        padding: 0.5rem 0.75rem;
    }
    
    .preview-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .preview-actions .btn {
        width: 100%;
        max-width: 280px;
    }
    
    .test-section .btn {
        width: 100%;
        margin-right: 0;
        margin-bottom: var(--space-2);
    }
}

@media (max-width: 576px) {
    .playground-header {
        padding: var(--space-10) 0 var(--space-6) 0;
    }
    
    .playground-header h1 {
        font-size: var(--font-size-2xl);
    }
    
    .card-header h3 {
        font-size: var(--font-size-base);
    }
    
    .card-body {
        padding: var(--space-4);
    }
}

/* Enhanced Alert Notifications */
.alert.position-fixed {
    top: 20px;
    right: 20px;
    z-index: 1050;
    max-width: 350px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1rem;
}

.alert.position-fixed .btn-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.25rem;
    background: none;
    border: none;
    font-size: 1.125rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.15s ease;
}

.alert.position-fixed .btn-close:hover {
    opacity: 1;
}

.alert.position-fixed .btn-close::before {
    content: "×";
    font-weight: bold;
    color: currentColor;
}

.alert.alert-success {
    background: var(--success-light);
    border: 1px solid var(--success-color);
    color: var(--gray-700);
}

.alert.alert-danger {
    background: var(--danger-light);
    border: 1px solid var(--danger-color);
    color: var(--gray-700);
}

.alert.alert-warning {
    background: var(--warning-light);
    border: 1px solid var(--warning-color);
    color: var(--gray-700);
}

.alert.alert-info {
    background: var(--info-light);
    border: 1px solid var(--info-color);
    color: var(--gray-700);
}

/* Icon Alignment Fixes */
.fas, .far, .fal, .fab, .fa {
    display: inline-block;
    vertical-align: middle;
    line-height: 1;
}

/* Specific icon spacing for buttons */
.btn .fas, .btn .far, .btn .fal, .btn .fab, .btn .fa {
    margin-right: 0.375rem;
    vertical-align: -0.125em;
}

.btn .fas:last-child, .btn .far:last-child, .btn .fal:last-child, .btn .fab:last-child, .btn .fa:last-child {
    margin-right: 0;
    margin-left: 0.375rem;
}

/* Icon alignment in form labels */
.form-label .fas, .form-label .far, .form-label .fal, .form-label .fab, .form-label .fa {
    margin-right: 0.5rem;
    vertical-align: -0.125em;
}

/* Icon alignment in headers */
h1 .fas, h1 .far, h1 .fal, h1 .fab, h1 .fa,
h2 .fas, h2 .far, h2 .fal, h2 .fab, h2 .fa,
h3 .fas, h3 .far, h3 .fal, h3 .fab, h3 .fa,
h4 .fas, h4 .far, h4 .fal, h4 .fab, h4 .fa,
h5 .fas, h5 .far, h5 .fal, h5 .fab, h5 .fa,
h6 .fas, h6 .far, h6 .fal, h6 .fab, h6 .fa {
    margin-right: 0.5rem;
    vertical-align: -0.125em;
}

/* Icon alignment in card headers */
.card-header .fas, .card-header .far, .card-header .fal, .card-header .fab, .card-header .fa {
    margin-right: 0.5rem;
    vertical-align: -0.125em;
}

/* Icon alignment in alerts */
.alert .fas, .alert .far, .alert .fal, .alert .fab, .alert .fa {
    margin-right: 0.5rem;
    vertical-align: -0.125em;
}

/* Icon alignment in badges */
.badge .fas, .badge .far, .badge .fal, .badge .fab, .badge .fa {
    margin-right: 0.25rem;
    vertical-align: -0.125em;
    font-size: 0.875em;
}

/* Icon alignment in nav items */
.nav-link .fas, .nav-link .far, .nav-link .fal, .nav-link .fab, .nav-link .fa {
    margin-right: 0.5rem;
    vertical-align: -0.125em;
}

/* Icon alignment in list items */
li .fas, li .far, li .fal, li .fab, li .fa {
    margin-right: 0.5rem;
    vertical-align: -0.125em;
}

/* Icon alignment in input groups */
.input-group .btn .fas, .input-group .btn .far, .input-group .btn .fal, .input-group .btn .fab, .input-group .btn .fa {
    margin-right: 0.25rem;
    vertical-align: -0.125em;
}

/* Icon alignment in small text */
.small .fas, .small .far, .small .fal, .small .fab, .small .fa,
small .fas, small .far, small .fal, small .fab, small .fa {
    margin-right: 0.25rem;
    vertical-align: -0.125em;
}

/* Icon alignment in text links */
a .fas, a .far, a .fal, a .fab, a .fa {
    margin-right: 0.25rem;
    vertical-align: -0.125em;
}

/* Specific alignment for warning exclamation */
.fa-exclamation-triangle {
    vertical-align: -0.125em;
}

/* Specific alignment for common icons */
.fa-cog, .fa-cogs, .fa-key, .fa-cube, .fa-puzzle-piece,
.fa-user, .fa-palette, .fa-toggle-on, .fa-arrows-alt,
.fa-trash, .fa-undo, .fa-check, .fa-eye, .fa-list,
.fa-flask, .fa-comments, .fa-record-vinyl, .fa-bolt,
.fa-book, .fa-question-circle, .fa-info-circle,
.fa-external-link-alt, .fa-comment, .fa-power-off,
.fa-info, .fa-search, .fa-times, .fa-user-circle {
    vertical-align: -0.125em;
}

/* Global Tooltip Prevention */
.tooltip, .popover {
    display: none !important;
}

/* Prevent browser tooltip on buttons */
button[title] {
    pointer-events: auto;
}

button[title]:hover::before,
button[title]:hover::after {
    display: none !important;
}

/* Clean button interactions */
.btn {
    position: relative;
    z-index: 1;
}

.btn:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.1);
}

/* Ensure no pseudo-elements interfere */
.btn::before,
.btn::after {
    display: none;
}

/* Remove any native browser tooltips */
[title] {
    position: relative;
}

[title]:hover::before,
[title]:hover::after {
    display: none !important;
}

/* Scrollbar */
#eventLog::-webkit-scrollbar {
    width: 6px;
}

#eventLog::-webkit-scrollbar-track {
    background: var(--gray-800);
}

#eventLog::-webkit-scrollbar-thumb {
    background: var(--gray-600);
    border-radius: var(--radius-sm);
}

#eventLog::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* Focus States */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Form text */
.form-text {
    margin-top: var(--space-1);
    font-size: var(--font-size-xs);
    color: var(--gray-500);
}

/* Input groups */
.input-group > .form-control:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: 0;
}

.input-group > .btn:not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Clean spacing */
.mb-6 { margin-bottom: var(--space-12); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-2 { margin-bottom: var(--space-2); }
.mt-5 { margin-top: var(--space-10); }
.mt-4 { margin-top: var(--space-4); }
.mt-3 { margin-top: var(--space-3); }
.mt-2 { margin-top: var(--space-2); }
.me-2 { margin-right: var(--space-2); }
.me-1 { margin-right: var(--space-1); }
.ms-2 { margin-left: var(--space-2); }

/* Typography improvements */
h5 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: var(--space-3);
    color: var(--gray-900);
}

h6 {
    font-size: var(--font-size-base);
    font-weight: 500;
    margin-bottom: var(--space-2);
    color: var(--gray-800);
}

.border-bottom {
    border-bottom: 1px solid var(--gray-200);
}

.pb-2 {
    padding-bottom: var(--space-2);
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-colors);
}

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Print styles */
@media print {
    .playground-header,
    .preview-actions,
    .test-section,
    .log-container {
        display: none;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid var(--gray-300);
        break-inside: avoid;
    }
} 