/* ============================================================
   Case Authoring Widget Styles
   Extracted from style.css without selector renames.
   ============================================================ */

/* --- Markdown Editor Styles --- */
.markdown-editor-container {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.markdown-editor-container.disabled {
    opacity: 0.6;
    background: #f8f9fa;
}

.markdown-editor-container.disabled .markdown-view-container,
.markdown-editor-container.disabled .markdown-edit-container {
    pointer-events: none;
}

.markdown-editor-container.disabled .markdown-toggle-btn {
    display: none;
}

.system-instructions-section .edit-default-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    background-color: #007bff;
    color: white;
    border: 1px solid #007bff;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: var(--font-family);
    pointer-events: auto;
}

.system-instructions-section .edit-default-btn:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.markdown-editor-container.disabled .edit-default-btn {
    background-color: #6c757d;
    border-color: #6c757d;
}

.markdown-editor-container.disabled .edit-default-btn:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

.markdown-editor-toolbar {
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 8px 12px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

.markdown-editor-toolbar-has-title {
    justify-content: space-between;
}

.markdown-editor-toolbar-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #495057;
}

.markdown-editor-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* System instructions toolbar: title on left, buttons on right */
.system-instructions-section .markdown-editor-toolbar,
.system-prompt-section .markdown-editor-toolbar {
    justify-content: space-between;
}

/* Header row above each facilitator guide record (title + delete button) */
.facilitator-guide-section .facilitator-guide-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

/* Each sub-field (Key Concepts / Probing Questions) inside a guide record */
.facilitator-guide-section .facilitator-guide-field {
    margin-bottom: 0.75rem;
}

.facilitator-guide-section .facilitator-guide-field > label {
    display: block;
    font-weight: 500;
    color: #495057;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.facilitator-guide-header .guide-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

.markdown-editor-toolbar .toolbar-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Case description section wrapper */
.case-description-section,
.system-instructions-section,
.debriefing-section {
    margin: 1.5rem 0;
}

.system-prompt-section {
    margin-bottom: 1.5rem;
}

.system-instructions-content {
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 1;
}

.system-instructions-content.collapsed {
    max-height: 0;
    opacity: 0;
    margin-bottom: 0;
}

.collapse-arrow {
    transition: transform 0.3s ease;
    flex-shrink: 0;
    color: #6c757d;
}

.collapse-arrow.collapsed {
    transform: rotate(-90deg);
}

.case-description-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e3f2fd;
}

.case-description-section-header label {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
}

/* Facilitator guide section wrapper */
.facilitator-guide-section {
    margin: 1.5rem 0;
}

.facilitator-guide-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e3f2fd;
}

.facilitator-guide-section-header label {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
}

/* Facilitator guide section styling */
.facilitator-guide-section {
    margin-bottom: 1rem;
}

.facilitator-guide-section:last-child {
    margin-bottom: 0;
}

.markdown-toggle-btn, .markdown-ai-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 11px;
    background: transparent;
    border: 1px solid var(--border-color, #d1d5db);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary, #6b7280);
    cursor: pointer;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
    white-space: nowrap;
}

.markdown-toggle-btn:hover, .markdown-ai-btn:hover {
    background: #f3f4f6;
    color: var(--text-primary, #374151);
    border-color: #9ca3af;
}

.markdown-view-container {
    padding: 16px;
    min-height: 100px;
}

.markdown-edit-container {
    padding: 0;
}

.markdown-edit-container textarea {
    width: 100%;
    min-height: 150px;
    border: none;
    padding: 16px;
    resize: vertical;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

.markdown-edit-container textarea:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px #007bff;
}

.markdown-rendered-content {
    min-height: 60px;
    line-height: 1.6;
    font-size: 16px; /* Set explicit font size for all content */
}

/* Ensure list items in markdown have the same font size as regular text */
.markdown-rendered-content ul,
.markdown-rendered-content ol,
.markdown-rendered-content li,
.markdown-rendered-content p {
    font-size: 16px !important; /* Force consistent font size */
    line-height: 1.6;
}

/* Also apply to rendered-markdown class used in other areas */
.rendered-markdown {
    font-size: 14px; /* Set explicit font size for all content */
}

.rendered-markdown ul,
.rendered-markdown ol,
.rendered-markdown li,
.rendered-markdown p {
    font-size: 14px !important; /* Force consistent font size */
    line-height: 1.6;
}

/* Make h3 the same visual size as h2 in markdown rendered areas */
.markdown-rendered-content h3,
.rendered-markdown h3 {
    font-size: 1.2em;
}

/* Slightly increase h4 and h5 above browser default body size */
.markdown-rendered-content h4,
.rendered-markdown h4 {
    font-size: 1.2em;
}

.markdown-rendered-content h5,
.rendered-markdown h5 {
    font-size: 1.05em;
}

/* Custom File Upload Input in AI Build Modal */
.file-upload-input {
    display: none; /* Hide the default input */
}

.file-upload-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background-color: #f0f2f5;
    border: 2px dashed #d1d9e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    justify-content: center;
    margin-top: 1rem;
}

.file-upload-label:hover {
    background-color: #e9ecef;
    border-color: var(--primary-color);
}

.file-upload-label svg {
    width: 24px;
    height: 24px;
    color: #6c757d;
    transition: color 0.2s ease;
}

.file-upload-label:hover svg {
    color: var(--primary-color);
}

.file-upload-label span {
    font-weight: 600;
    color: #333;
}

#file-upload-filename {
    display: block;
    margin-top: 10px;
    font-style: italic;
    color: #6c757d;
    text-align: center;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

#file-upload-filename.file-selected {
    padding: 15px 20px;
    background-color: #e7f5e9;
    border: 2px solid #4caf50;
    border-radius: 8px;
    font-style: normal;
}

/* File Upload Wrapper for Case Editor */
.file-upload-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0.5rem;
}

.file-input-hidden {
    display: none;
}

.file-upload-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}

.file-upload-btn:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
    color: #111827;
}

.file-upload-btn:active {
    background-color: #f3f4f6;
}

.file-upload-btn svg {
    flex-shrink: 0;
    opacity: 0.7;
}

#profile-picture-input ~ .file-upload-btn {
    gap: 6px;
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 13px;
}

#profile-picture-input ~ .file-upload-btn svg {
    width: 14px;
    height: 14px;
}


/* AI generated profile picture modal */
.ai-picture-modal {
    max-width: 420px !important;
    text-align: left !important;
}

.ai-picture-modal .modal-header {
    margin-bottom: 1rem;
}

.ai-picture-modal .modal-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary, #111827);
}

.ai-picture-modal .modal-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.ai-picture-modal-img {
    width: 100%;
    max-height: 380px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    display: block;
    background: #f9fafb;
}

.ai-picture-modal-hint {
    font-size: 12px;
    color: #6b7280;
    text-align: center;
    margin: 0;
}

.ai-picture-modal .modal-footer {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.file-name-display {
    color: #6b7280;
    font-size: 13px;
    font-style: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Spinner for AI Generation */
#ai-build-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.status-text {
    margin: 0;
    font-weight: 500;
    line-height: 1.5;
}

/* Profile picture upload preview used by case authoring forms. */
.profile-picture-preview-container {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 2px dashed #ccc;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #f8f9fa;
}

.profile-picture-preview-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-picture-preview-container p {
    font-size: 0.8rem;
    color: #6c757d;
    text-align: center;
    padding: 0.5rem;
    margin: 0;
}

/* === PBL PARTICIPANTS EDITOR STYLES === */
.participants-section {
    margin: 1.5rem 0;
}

.participants-section-header,
.facilitator-guide-section-header,
.case-description-section-header,
.system-instructions-section-header,
.debriefing-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e3f2fd;
}

.collapsible-header {
    cursor: pointer;
    user-select: none;
}

.collapsible-header:hover {
    background-color: #f8f9fa;
    margin: 0 -1rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.section-header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.participants-section-header label,
.system-instructions-section-header label,
.debriefing-section-header label {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
}

.participants-editor-container {
    margin-top: 0;
}

.participant-editor {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.participant-editor.inactive {
    opacity: 0.7;
    border-color: #cbd5e1;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    transform: translateY(2px);
}

.participant-editor.inactive .participant-name,
.participant-editor.inactive .participant-profession,
.participant-editor.inactive .participant-prompt {
    color: #6c757d;
    background: #f8f9fa;
}

/* Patient section styling in case editor */
.participant-editor.patient-section {
    border-color: #e2e8f0;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.participant-editor.patient-section h4 {
    color: var(--avatar-patient);
}

.participant-editor.patient-section .patient-description {
    margin: 0.5rem 0 1rem 0;
    padding: 0;
    background: none;
    border: none;
}

.participant-editor.patient-section .patient-description small {
    color: #666;
    line-height: 1.5;
}

.participant-editor.patient-section.inactive {
    opacity: 0.6;
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f5f9 100%);
    border-color: #cbd5e1;
}

.participant-editor.patient-section .patient-profile-prompt {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* IPE Case Editor Styles */
.default-value-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.default-value-field label {
    margin-bottom: 0;
    flex: 1;
}

.edit-default-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    background-color: #f8f9fa;
    color: #495057;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: var(--font-family);
}

.edit-default-btn:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

.edit-default-btn svg {
    flex-shrink: 0;
}

.default-indicator {
    display: block;
    color: #28a745;
    font-size: 0.8rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    font-style: italic;
}


@media (max-width: 768px) {
    .default-value-field {
        flex-direction: column;
        align-items: stretch;
    }
    
    .default-value-field label {
        margin-bottom: 0.5rem;
    }
}

.participant-editor h4 {
    margin: 0;
    color: #1e293b;
    font-weight: 700;
    font-size: 1.1rem;
    border-bottom: 3px solid #3b82f6;
    padding-bottom: 0.75rem;
    flex: 1;
    letter-spacing: -0.025em;
}

.participant-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.reset-participant-btn {
    padding: 0.5rem 1rem;
    background-color: #f8f9fa;
    color: #495057;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-family);
}

.reset-participant-btn:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

.participant-field {
    margin-bottom: 1.5rem;
    padding: 0.75rem;
    background: rgba(59, 130, 246, 0.03);
    border-radius: 8px;
}

.participant-field label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: #374151;
    letter-spacing: 0.025em;
}

.participant-name,
.participant-profession,
.participant-prompt {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    background: #ffffff;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.participant-name:focus,
.participant-profession:focus,
.participant-prompt:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
    background: #ffffff;
}

.participant-prompt {
    resize: vertical;
    font-family: monospace;
    line-height: 1.4;
}

.participant-prompt.facilitator-prompt {
    min-height: 200px;
    height: 200px;
}

.participant-controls-row {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.control-group {
    flex: 1;
    min-width: 220px;
    max-width: 320px;
    min-height: 120px;
    padding: 1rem;
    background: rgba(16, 185, 129, 0.02);
    border-radius: 10px;
    border: 1px solid rgba(16, 185, 129, 0.1);
    display: flex;
    flex-direction: column;
}

.control-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: #1f2937;
    font-size: 0.95rem;
    letter-spacing: 0.025em;
}

.control-group small {
    display: block;
    color: #6c757d;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.toggle-group {
    flex: 0 0 auto;
    min-width: 220px;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.slider-container.compact {
    gap: 0.5rem;
}

.slider-container input[type="range"] {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #3b82f6 0%, #e2e8f0 100%);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.slider-container.compact input[type="range"] {
    flex: 0 0 80px;
    min-width: 80px;
    max-width: 80px;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3), 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.slider-container input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    cursor: pointer;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3), 0 2px 4px rgba(0, 0, 0, 0.1);
}

.slider-value {
    min-width: 40px;
    text-align: center;
    font-weight: 700;
    color: #3b82f6;
    font-size: 0.9rem;
    font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'SF Pro Display', 'Inter', system-ui, sans-serif;
    flex-shrink: 0;
}

/* Slider labels for facilitator probability */
.slider-labels {
    position: relative;
    display: flex;
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 0.5rem;
    height: 1rem;
}

.slider-labels span {
    position: absolute;
    white-space: nowrap;
    transform: translateX(-50%);
}

.slider-labels span:first-child {
    left: 0;
    transform: translateX(0);
}

.slider-labels span:nth-child(2) {
    left: 50%;
    transform: translateX(-50%);
}

.slider-labels span:last-child {
    left: 100%;
    transform: translateX(-100%);
}

/* Difficulty modifier explanation styles */
.difficulty-modifier-explanation {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #3498db;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.3s ease, max-height 0.3s ease, margin-top 0.3s ease;
}

.control-group.toggle-group:hover .difficulty-modifier-explanation {
    opacity: 1;
    max-height: 300px;
    margin-top: 0.5rem;
}

.difficulty-modifier-explanation small {
    display: block;
    margin-bottom: 0.3rem;
    line-height: 1.3;
    color: #495057;
}

.difficulty-modifier-explanation ul {
    margin: 0.25rem 0 0.5rem 0;
    padding-left: 1.2rem;
}

.difficulty-modifier-explanation li {
    margin-bottom: 0.15rem;
    font-size: 0.8rem;
    color: #6c757d;
}

.difficulty-modifier-explanation em {
    color: #17a2b8;
    font-style: italic;
}

/* Proactive index explanation styles */
.proactive-probability-display {
    font-weight: normal;
    color: #28a745;
    font-size: 0.9em;
    margin-left: 0.25rem;
}

.proactive-index-explanation {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #28a745;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.3s ease, max-height 0.3s ease, margin-top 0.3s ease;
}

.control-group.proactive-index-group:hover .proactive-index-explanation {
    opacity: 1;
    max-height: 200px;
    margin-top: 0.5rem;
}

.proactive-index-explanation small {
    display: block;
    margin-bottom: 0.3rem;
    line-height: 1.3;
    color: #495057;
}

.proactive-index-explanation ul {
    margin: 0.25rem 0 0.5rem 0;
    padding-left: 1.2rem;
}

.proactive-index-explanation li {
    margin-bottom: 0.15rem;
    font-size: 0.8rem;
    color: #6c757d;
}

.proactive-index-explanation em {
    color: #28a745;
    font-style: italic;
}

/* Toggle Switch Styles */
.toggle-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    gap: 0.75rem;
    font-weight: 600;
    margin-bottom: 0 !important;
    line-height: 24px;
    height: 24px;
}

.control-group .toggle-label {
    font-size: 0.9rem;
}

/* Specific alignment fix for toggle label text */
.toggle-label {
    align-items: center !important;
}

.toggle-text {
    line-height: 24px;
    height: 24px;
    font-weight: inherit;
    display: inline-block;
}

/* Activation Toggle Styles */
.activation-toggle-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.activation-toggle {
    opacity: 0;
    width: 0;
    height: 0;
}

.activation-toggle-switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 28px;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    border-radius: 14px;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.activation-toggle-switch::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.activation-toggle:checked + .activation-toggle-switch {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2), inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.activation-toggle:checked + .activation-toggle-switch::before {
    transform: translateX(28px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

.activation-toggle:disabled + .activation-toggle-switch {
    opacity: 0.4;
    cursor: not-allowed;
    background-color: #ccc !important;
}

.activation-toggle:disabled + .activation-toggle-switch::before {
    opacity: 0.6;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    background-color: #ccc;
    border-radius: 24px;
    transition: background-color 0.3s ease;
    flex-shrink: 0;
    vertical-align: middle;
}

.toggle-switch::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-label input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-label input[type="checkbox"]:checked + .toggle-switch {
    background-color: #3498db;
}

.toggle-label input[type="checkbox"]:checked + .toggle-switch::before {
    transform: translateX(26px);
}

.reset-participant-btn {
    padding: 0.4rem 0.8rem;
    border: 1px solid #e74c3c;
    background: white;
    color: #e74c3c;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    white-space: nowrap;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.reset-participant-btn:hover {
    background: #e74c3c;
    color: white;
}

.reset-all-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #e74c3c;
    background: white;
    color: #e74c3c;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.reset-all-btn:hover {
    background: #e74c3c;
    color: white;
}

.prompt-hint {
    display: block;
    color: #6c757d;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    font-style: italic;
}

/* Responsive design for participant controls */
@media (max-width: 768px) {
    .participant-controls-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .control-group,
    .toggle-group {
        min-width: unset;
        max-width: none;
    }
    
    .slider-container.compact input[type="range"] {
        min-width: unset;
    }
}
