/* Speech Discussion 02 - Main Styles */
#sd02-discussion {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Test Type Selection */
#sd02-test-selection {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007cba;
}

#sd02-test-selection h3 {
    margin-top: 0;
    color: #007cba;
}

#sd02-test-selection label {
    display: block;
    margin: 8px 0;
    padding: 8px 12px;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#sd02-test-selection label:hover {
    background: #e7f3ff;
}

/* Mode Selection */
#sd02-mode-selection {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

#sd02-mode-selection h3 {
    margin-top: 0;
    color: #28a745;
}

#sd02-mode-selection label {
    display: block;
    margin: 8px 0;
    padding: 8px 12px;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#sd02-mode-selection label:hover {
    background: #e7f3ff;
}

#sd02-mode-selection input[disabled] + span {
    color: #6c757d;
    opacity: 0.6;
}

/* User Role Selection */
#sd02-user-role-selection {
    margin: 20px 0;
    padding: 15px;
    background: #fff3cd;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
}

#sd02-user-role-selection h3 {
    margin-top: 0;
    color: #856404;
}

#sd02-user-role-selection label {
    display: block;
    margin: 8px 0;
    padding: 8px 12px;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#sd02-user-role-selection label:hover {
    background: #fff8e1;
}

/* Voice Selection */
#sd02-voice-selection {
    margin: 20px 0;
    padding: 15px;
    background: #e7f3ff;
    border-radius: 8px;
    border-left: 4px solid #17a2b8;
}

#sd02-voice-selection label {
    font-weight: bold;
    color: #17a2b8;
}

#sd02-voice-selection select {
    margin-top: 5px;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: white;
}

/* Voice Status */
#sd02-voice-status {
    margin: 10px 0;
    padding: 10px 15px;
    border-radius: 6px;
    font-weight: 500;
}

.voice-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.voice-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.voice-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.voice-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Arranged Mode Styles */
.sd02-session-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 2px solid #007cba;
}

.sd02-session-info h3 {
    color: white;
    margin-top: 0;
}

.participants-list {
    margin-top: 15px;
}

.participant-item {
    padding: 8px 12px;
    margin: 5px 0;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 6px;
    color: #333;
}

.participant-item.online {
    border-left: 4px solid #28a745;
}

.participant-item.offline {
    border-left: 4px solid #dc3545;
    opacity: 0.7;
}

.sessions-container {
    display: grid;
    gap: 15px;
    margin-top: 15px;
}

.session-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.session-item h4 {
    margin-top: 0;
    color: #007cba;
}

.join-session-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
}

.join-session-btn:hover {
    background: #218838;
}

/* Arranged Section */
#sd02-arranged-section {
    margin: 15px 0;
    padding: 15px;
    background: #e2e3e5;
    border-radius: 6px;
    border: 1px solid #d6d8db;
}

#sd02-arranged-section h4 {
    margin-top: 0;
    color: #383d41;
}

/* User Info Fields */
#sd02-discussion label {
    display: inline-block;
    margin: 5px 15px 5px 0;
    font-weight: 500;
}

#sd02-discussion input[type="text"],
#sd02-discussion input[type="email"] {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    margin-left: 5px;
}

/* Topic and Criteria Selection */
#sd02-discussion input[name="topic_id"],
#sd02-discussion input[name="criteria_id"] {
    margin-right: 8px;
}

#sd02-discussion input[name="topic_id"] + span,
#sd02-discussion input[name="criteria_id"] + span {
    font-weight: 500;
}

/* Buttons */
#sd02-start-test,
#sd02-test-voices,
#sd02-start-mic,
#sd02-send,
#sd02-stop,
#sd02-next-part,
#sd02-restart-test,
#sd02-toggle-text,
#sd02-edit-transcript {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    margin: 5px;
}

#sd02-start-test,
#sd02-next-part,
#sd02-restart-test {
    background: #007cba;
    color: white;
}

#sd02-start-test:hover,
#sd02-next-part:hover,
#sd02-restart-test:hover {
    background: #005a87;
}

#sd02-test-voices {
    background: #17a2b8;
    color: white;
}

#sd02-test-voices:hover {
    background: #138496;
}

.button-mic {
    background: #28a745 !important;
    color: white !important;
}

.button-mic:hover {
    background: #218838 !important;
}

.button-stop {
    background: #dc3545 !important;
    color: white !important;
}

.button-stop:hover {
    background: #c82333 !important;
}

#sd02-send {
    background: #28a745;
    color: white;
}

#sd02-send:hover {
    background: #218838;
}

#sd02-stop {
    background: #dc3545;
    color: white;
}

#sd02-stop:hover {
    background: #c82333;
}

#sd02-toggle-text,
#sd02-edit-transcript {
    background: #6c757d;
    color: white;
}

#sd02-toggle-text:hover,
#sd02-edit-transcript:hover {
    background: #5a6268;
}

/* Chat Log */
#sd02-chat-log {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #f8f9fa;
    margin: 15px 0;
}

.chat-message {
    padding: 12px 15px;
    border-bottom: 1px solid #e9ecef;
    line-height: 1.5;
}

.chat-message:last-child {
    border-bottom: none;
}

.human-message {
    background: #d1ecf1;
    border-left: 4px solid #17a2b8;
}

.ai-message {
    background: white;
    border-left: 4px solid #6c757d;
}

.chat-message strong {
    color: #495057;
}

.speaking-indicator {
    color: #28a745;
    font-style: italic;
    margin-left: 10px;
    font-size: 0.9em;
}

/* Part B Section */
#sd02-part-b-section {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.part-b-question {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #007cba;
    margin-bottom: 15px;
}

.part-b-question h4 {
    margin-top: 0;
    color: #007cba;
}

.part-b-response {
    background: white;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    margin-bottom: 10px;
}

.part-b-response-detail {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    margin-bottom: 10px;
}

.part-b-response-detail p {
    margin: 5px 0;
}

/* Transcription Controls */
#sd02-transcription-controls {
    background: #e7f3ff;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #b3d7ff;
}

#sd02-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

#sd02-input:focus {
    border-color: #007cba;
    outline: none;
}

#sd02-transcription-help {
    font-style: italic;
}

/* Indicators and Timers */
#sd02-turn-indicator {
    background: #fff3cd;
    padding: 12px 15px;
    border-radius: 6px;
    border: 1px solid #ffeaa7;
    margin: 10px 0;
}

#sd02-mic-status {
    background: #d4edda;
    padding: 10px 15px;
    border-radius: 6px;
    border: 1px solid #c3e6cb;
    margin: 10px 0;
}

#sd02-timer,
#sd02-human-timer {
    background: #f8d7da;
    padding: 10px 15px;
    border-radius: 6px;
    border: 1px solid #f5c6cb;
    margin: 10px 0;
    text-align: center;
    font-size: 16px;
}

/* Scores Display */
#sd02-scores {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin: 20px 0;
}

.final-scores {
    padding: 20px;
}

.final-scores h3 {
    color: #007cba;
    margin-top: 0;
    border-bottom: 2px solid #007cba;
    padding-bottom: 10px;
}

.final-scores h4 {
    color: #495057;
    margin: 20px 0 10px 0;
}

/* Score Summary Table */
.score-summary-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.score-summary-table th {
    background: #007cba;
    color: white;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
}

.score-summary-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #dee2e6;
}

.score-summary-table tr:last-child td {
    border-bottom: none;
}

.score-summary-table tr:hover {
    background: #f8f9fa;
}

.part-a-row {
    background: #f8f9fa;
}

.part-b-row {
    background: #f8f9fa;
}

.overall-row {
    background: #e7f3ff;
    font-weight: bold;
}

.overall-row td {
    font-size: 1.1em;
}

/* Dynamic Scores Styling */
.dynamic-scores {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    margin: 10px 0;
}

.live-scores-container {
    max-height: 300px;
    overflow-y: auto;
}

.live-scores-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.live-scores-table th {
    background: #007cba;
    color: white;
    padding: 10px;
    text-align: left;
}

.live-scores-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #dee2e6;
}

.human-score {
    background: #e7f3ff;
}

.ai-score {
    background: white;
}

.score-value {
    font-weight: bold;
    color: #28a745;
}

.score-feedback {
    font-size: 0.9em;
    color: #6c757d;
}

/* Teacher and Admin Pages */
.sd02-upload-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    margin-bottom: 20px;
}

.sd02-upload-section h3 {
    color: #007cba;
    margin-top: 0;
}

.sd02-existing-criteria,
.sd02-existing-topics {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.sd02-existing-criteria h3,
.sd02-existing-topics h3 {
    color: #28a745;
    margin-top: 0;
}

/* Form Tables */
.form-table {
    width: 100%;
    margin-bottom: 15px;
}

.form-table th {
    text-align: left;
    padding: 10px 15px 10px 0;
    width: 200px;
    vertical-align: top;
}

.form-table td {
    padding: 10px 0;
}

.form-table input[type="text"],
.form-table input[type="email"],
.form-table textarea,
.form-table select {
    width: 100%;
    max-width: 500px;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

.form-table textarea {
    resize: vertical;
    min-height: 100px;
}

/* Admin Tables */
.wp-list-table {
    margin-top: 15px;
}

.wp-list-table th {
    font-weight: 600;
}

.sd02-admin-actions {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    margin-bottom: 15px;
}

.button-danger {
    background: #dc3545 !important;
    color: white !important;
}

.button-danger:hover {
    background: #c82333 !important;
}

/* Part A Complete Section */
.part-a-complete-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    border-radius: 15px;
    border: 3px solid #007cba;
    text-align: center;
    margin: 20px 0;
    color: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.part-a-complete-section h3 {
    color: white;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 28px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.part-a-summary {
    margin-bottom: 25px;
}

.part-a-summary p {
    font-size: 18px;
    margin-bottom: 20px;
    color: white;
    font-weight: 500;
}

.transition-options {
    margin-top: 25px;
}

.transition-options p {
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 20px;
}

#sd02-auto-transition-countdown {
    font-weight: bold;
    color: #ffeb3b;
    font-size: 1.4em;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.transition-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* Button Styles for Transition */
.button-primary {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.button-primary:hover {
    background: linear-gradient(135deg, #218838, #1e9e8a);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.button-secondary {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.button-secondary:hover {
    background: linear-gradient(135deg, #5a6268, #495057);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

/* Part B Section Styling */
#sd02-part-b-section {
    margin: 20px 0;
    padding: 25px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 12px;
    border: 2px solid #dc3545;
    color: white;
}

.part-b-question {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 10px;
    border-left: 5px solid #007cba;
    margin-bottom: 20px;
    color: #333;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.part-b-question h4 {
    margin-top: 0;
    color: #007cba;
    font-size: 20px;
}

.part-b-response {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.part-b-response-detail {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.part-b-response-detail p {
    margin: 8px 0;
}

/* Role-based message styling */
.chat-message.human-message[data-role="User-1"] {
    border-left: 4px solid #007cba;
}

.chat-message.human-message[data-role="User-2"] {
    border-left: 4px solid #28a745;
}

.chat-message.human-message[data-role="User-3"] {
    border-left: 4px solid #dc3545;
}

.chat-message.human-message[data-role="User-4"] {
    border-left: 4px solid #ffc107;
}

/* Session manager public view */
.sd02-session-manager-public {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Calendar Styles */
#sd02-calendar {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    margin-top: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
    #sd02-discussion {
        padding: 10px;
    }
    
    #sd02-voice-selection > div {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-table th,
    .form-table td {
        display: block;
        width: 100%;
    }
    
    .form-table th {
        padding-bottom: 5px;
    }
    
    .score-summary-table {
        font-size: 14px;
    }
    
    .score-summary-table th,
    .score-summary-table td {
        padding: 8px 10px;
    }
    
    .transition-buttons {
        flex-direction: column;
    }
    
    .button-primary,
    .button-secondary {
        width: 100%;
        margin: 5px 0;
    }
    
    .part-a-complete-section {
        padding: 20px 15px;
    }
    
    .part-a-complete-section h3 {
        font-size: 24px;
    }
}

/* Utility Classes */
.sd02-download-criteria,
.sd02-download-topic {
    color: #007cba;
    text-decoration: none;
}

.sd02-download-criteria:hover,
.sd02-download-topic:hover {
    text-decoration: underline;
}

.sd02-copy-criteria,
.sd02-copy-topic {
    background: #6c757d;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    margin-left: 5px;
}

.sd02-copy-criteria:hover,
.sd02-copy-topic:hover {
    background: #5a6268;
}

/* Loading States */
#sd02-next-part:disabled {
    background: #6c757d !important;
    cursor: not-allowed;
}

/* Session Manager Styles */
.sd02-session-manager {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.sd02-create-session {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #dee2e6;
}

.sd02-create-session h2 {
    color: #007cba;
    margin-top: 0;
}

.sd02-sessions-list h2 {
    color: #28a745;
    margin-top: 0;
}

/* Frontend Session Manager Styles */
.sd02-session-manager-public {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.sd02-organizer-view, .sd02-user-view {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    margin-bottom: 20px;
}

.sd02-session-form {
    margin-bottom: 30px;
}

.form-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #007cba;
}

.form-section h4 {
    margin-top: 0;
    color: #007cba;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.participant-assignment {
    background: white;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    border: 1px solid #dee2e6;
}

.participant-assignment h5 {
    margin-top: 0;
    color: #495057;
}

.form-submit {
    text-align: center;
    margin-top: 20px;
}

.sessions-list, .user-sessions-list {
    display: grid;
    gap: 15px;
}

.session-item, .user-session-item {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.session-item h4, .user-session-item h4 {
    margin-top: 0;
    color: #007cba;
}

.session-actions {
    margin-top: 10px;
}

.updated {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 10px;
    border-radius: 4px;
}

.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 10px;
    border-radius: 4px;
}

.button-danger {
    background: #dc3545 !important;
    color: white !important;
    border: none !important;
}

.button-danger:hover {
    background: #c82333 !important;
}

.session-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.session-actions .button {
    margin: 2px;
}

/* ============================================= */
/* TRANSCRIPT AND NOTIFICATION STYLES */
/* ============================================= */

/* Notification Styles */
.sd02-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 6px;
    color: white;
    font-weight: 500;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideIn 0.3s ease;
    max-width: 400px;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-success {
    background: #28a745;
    border-left: 4px solid #218838;
}

.notification-error {
    background: #dc3545;
    border-left: 4px solid #c82333;
}

.notification-warning {
    background: #ffc107;
    color: #212529;
    border-left: 4px solid #e0a800;
}

.notification-info {
    background: #17a2b8;
    border-left: 4px solid #138496;
}

/* Transcript Download Section */
.transcript-download-section {
    border: 2px solid #007cba !important;
}

.download-transcript-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.download-transcript-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.download-transcript-btn.button-primary {
    background: #007cba;
}

.download-transcript-btn.button-primary:hover {
    background: #005a87;
}




/* ============================================= */
/* SPLIT LAYOUT STYLES */
/* ============================================= */

.sd02-split-layout-wrapper {
    margin: 20px 0;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.sd02-split-container {
    display: flex;
    height: 600px;
    background: white;
}

.sd02-left-panel,
.sd02-right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #dee2e6;
    background: #f8f9fa;
}

.sd02-right-panel {
    border-right: none;
}

.sd02-question-paper-header,
.sd02-chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sd02-question-paper-header h3,
.sd02-chat-header h3 {
    margin: 0;
    color: white;
    font-size: 16px;
}

.sd02-question-paper-header .button,
.sd02-chat-header .button {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 5px 15px;
    border-radius: 4px;
    font-size: 12px;
}

.sd02-question-paper-header .button:hover,
.sd02-chat-header .button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.sd02-question-paper-content,
.sd02-chat-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: white;
}

/* Question Paper Content Styles */
.sd02-paper-container {
    font-size: 14px;
    line-height: 1.6;
}

.sd02-paper-container h4 {
    color: #007cba;
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #007cba;
}

.sd02-paper-container h5 {
    color: #28a745;
    margin: 20px 0 10px 0;
    font-size: 16px;
}

.sd02-pdf-viewer iframe {
    width: 100%;
    height: 500px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin-bottom: 15px;
}

.sd02-image-viewer img {
    max-width: 100%;
    height: auto;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin-bottom: 15px;
}

.sd02-text-content,
.sd02-part-b-content {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    border-left: 4px solid #007cba;
}

.sd02-part-b-content {
    border-left-color: #28a745;
}

.sd02-text-wrapper {
    white-space: pre-wrap;
    font-family: 'Courier New', Courier, monospace;
    background: white;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    max-height: 300px;
    overflow-y: auto;
}

.sd02-loading-paper,
.sd02-no-paper {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-style: italic;
}

/* Chat content in split layout */
.sd02-chat-content #sd02-chat-log {
    height: 100%;
    padding: 0;
    border: none;
    background: transparent;
}

.sd02-chat-content .chat-message {
    background: white;
    padding: 10px 15px;
    margin-bottom: 8px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.sd02-chat-content .human-message {
    background: #d1ecf1;
    border-left: 4px solid #17a2b8;
}

.sd02-chat-content .ai-message {
    background: white;
    border-left: 4px solid #6c757d;
}

/* Controls below split layout */
.sd02-controls-below {
    background: #f8f9fa;
    padding: 15px;
    border-top: 1px solid #dee2e6;
}

.sd02-controls-section {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

/* Split layout option checkbox */
#sd02-split-layout-option {
    transition: all 0.3s;
}

#sd02-split-layout-option:hover {
    background: #e7f3ff;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,124,186,0.1);
}

/* Responsive design for split layout */
@media (max-width: 768px) {
    .sd02-split-container {
        flex-direction: column;
        height: auto;
    }
    
    .sd02-left-panel,
    .sd02-right-panel {
        height: 400px;
        border-right: none;
        border-bottom: 1px solid #dee2e6;
    }
    
    .sd02-pdf-viewer iframe {
        height: 300px;
    }
    
    .sd02-text-wrapper {
        max-height: 200px;
    }
}

/* Panel toggle states */
.sd02-left-panel.collapsed,
.sd02-right-panel.collapsed {
    flex: 0;
    overflow: hidden;
}

.sd02-left-panel.collapsed .sd02-question-paper-content,
.sd02-right-panel.collapsed .sd02-chat-content {
    display: none;
}

.sd02-left-panel.collapsed .sd02-question-paper-header,
.sd02-right-panel.collapsed .sd02-chat-header {
    justify-content: center;
}

.sd02-left-panel.collapsed {
    border-right: 1px solid #dee2e6;
}

/* Animation for panel collapse */
.sd02-left-panel,
.sd02-right-panel {
    transition: flex 0.3s ease;
}

/* Fullscreen mode for question paper */
.sd02-paper-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: white;
    padding: 20px;
    overflow-y: auto;
}

.sd02-paper-container.fullscreen .sd02-pdf-viewer iframe {
    height: calc(100vh - 150px);
}

/* Print styles for question paper */
@media print {
    .sd02-question-paper-content {
        background: white !important;
        color: black !important;
    }
    
    .sd02-paper-container h4,
    .sd02-paper-container h5 {
        color: black !important;
    }
    
    .sd02-text-wrapper {
        background: white !important;
        border: 1px solid #ccc !important;
    }
}


/* ============================================= */
/* SPLIT LAYOUT CONTROLS STYLING */
/* ============================================= */

/* Timer styling for split layout */
.sd02-controls-below #sd02-timer {
    background: #dc3545 !important;
    color: white !important;
    padding: 12px 20px !important;
    border-radius: 8px !important;
    text-align: center !important;
    font-size: 18px !important;
    font-weight: bold !important;
    margin: 15px 0 !important;
    border: 2px solid #c82333 !important;
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.2);
    animation: pulse-timer 2s infinite;
}

@keyframes pulse-timer {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Transcription controls styling for split layout */
.sd02-controls-below #sd02-transcription-controls {
    background: #e7f3ff !important;
    padding: 15px !important;
    border-radius: 8px !important;
    border: 1px solid #b3d7ff !important;
    margin: 10px 0 !important;
}

.sd02-controls-below #sd02-input {
    width: 100% !important;
    padding: 12px !important;
    border: 2px solid #dee2e6 !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    margin-bottom: 10px !important;
    transition: border-color 0.2s !important;
}

.sd02-controls-below #sd02-input:focus {
    border-color: #007cba !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1) !important;
}

.sd02-controls-below #sd02-send {
    background: #28a745 !important;
    color: white !important;
    border: none !important;
    padding: 12px 25px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-weight: bold !important;
    transition: background 0.2s !important;
    margin-right: 10px !important;
}

.sd02-controls-below #sd02-send:hover {
    background: #218838 !important;
}

.sd02-controls-below #sd02-edit-transcript {
    background: #6c757d !important;
    color: white !important;
    border: none !important;
    padding: 12px 20px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: background 0.2s !important;
}

.sd02-controls-below #sd02-edit-transcript:hover {
    background: #5a6268 !important;
}

/* Controls section styling */
.sd02-controls-section {
    background: white !important;
    padding: 20px !important;
    border-radius: 8px !important;
    border: 1px solid #dee2e6 !important;
    margin-top: 15px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Turn indicator styling */
.sd02-controls-below #sd02-turn-indicator {
    background: #fff3cd !important;
    padding: 12px 15px !important;
    border-radius: 6px !important;
    border: 1px solid #ffeaa7 !important;
    margin: 10px 0 !important;
    font-size: 16px !important;
}

/* Microphone status */
.sd02-controls-below #sd02-mic-status {
    background: #d4edda !important;
    padding: 10px 15px !important;
    border-radius: 6px !important;
    border: 1px solid #c3e6cb !important;
    margin: 10px 0 !important;
}

/* Human timer */
.sd02-controls-below #sd02-human-timer {
    background: #f8d7da !important;
    padding: 10px 15px !important;
    border-radius: 6px !important;
    border: 1px solid #f5c6cb !important;
    margin: 10px 0 !important;
    text-align: center !important;
    font-weight: bold !important;
}

/* Button styling */
.sd02-controls-below .button-mic {
    background: #28a745 !important;
    color: white !important;
    border: none !important;
    padding: 12px 25px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    margin-right: 10px !important;
}

.sd02-controls-below .button-mic:hover {
    background: #218838 !important;
}

.sd02-controls-below .button-stop {
    background: #dc3545 !important;
    color: white !important;
    border: none !important;
    padding: 12px 25px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
}

.sd02-controls-below .button-stop:hover {
    background: #c82333 !important;
}

/* Controls layout */
.sd02-controls-below .controls-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 10px 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sd02-controls-below #sd02-timer {
        font-size: 16px !important;
        padding: 10px 15px !important;
    }
    
    .sd02-controls-below .controls-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .sd02-controls-below #sd02-send,
    .sd02-controls-below #sd02-edit-transcript {
        width: 100%;
        margin: 5px 0;
    }
}

/* ============================================= */
/* CRITICAL STYLES FOR ALL USERS (LOGGED-IN AND NON-LOGGED-IN) */
/* ============================================= */

/* Force visibility for all users */
#sd02-turn-indicator,
#sd02-timer,
#sd02-transcription-controls,
#sd02-start-mic,
#sd02-stop,
#sd02-send,
#sd02-edit-transcript,
#sd02-mic-status,
#sd02-human-timer,
#sd02-text-toggle {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Force timer styling */
#sd02-timer {
    background: #dc3545 !important;
    color: white !important;
    padding: 12px 20px !important;
    border-radius: 8px !important;
    text-align: center !important;
    font-size: 18px !important;
    font-weight: bold !important;
    margin: 15px 0 !important;
    border: 2px solid #c82333 !important;
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.2) !important;
    animation: pulse-timer 2s infinite !important;
}

/* Force transcription controls styling */
#sd02-transcription-controls {
    background: #e7f3ff !important;
    padding: 15px !important;
    border-radius: 8px !important;
    border: 1px solid #b3d7ff !important;
    margin: 10px 0 !important;
}

#sd02-input {
    display: block !important;
    width: 100% !important;
    padding: 12px !important;
    border: 2px solid #dee2e6 !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    margin-bottom: 10px !important;
}

#sd02-send {
    display: inline-block !important;
    background: #28a745 !important;
    color: white !important;
    padding: 12px 25px !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    margin-right: 10px !important;
    font-weight: bold !important;
}

#sd02-edit-transcript {
    display: inline-block !important;
    background: #6c757d !important;
    color: white !important;
    padding: 12px 20px !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
}

/* Force microphone button visibility */
#sd02-start-mic {
    display: inline-block !important;
    background: #28a745 !important;
    color: white !important;
    padding: 12px 25px !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    margin: 10px 0 !important;
}

/* Force stop button visibility */
#sd02-stop {
    display: inline-block !important;
    background: #dc3545 !important;
    color: white !important;
    padding: 12px 25px !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    margin: 10px 0 10px 10px !important;
}

/* Animation for low time warning */
@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

@keyframes pulse-timer {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Override any theme styles for split layout */
.sd02-split-layout-wrapper .sd02-controls-section * {
    display: block !important;
    visibility: visible !important;
}

/* Ensure controls are visible in split layout */
.sd02-controls-below * {
    display: block !important;
    visibility: visible !important;
}

/* Fix for WooCommerce My Account page */
.woocommerce-account .sd02-split-layout-wrapper,
.woocommerce-account #sd02-discussion,
.woocommerce-account .sd02-controls-below,
.woocommerce-account #sd02-turn-indicator,
.woocommerce-account #sd02-timer,
.woocommerce-account #sd02-transcription-controls {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Override any WooCommerce styles */
.woocommerce .sd02-timer,
.woocommerce-account .sd02-timer {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}


/* ============================================= */
/* DOWNLOAD BUTTON STYLES */
/* ============================================= */

/* Question paper download button in split layout */
.sd02-question-paper-header .sd02-download-paper-btn,
.sd02-question-paper-header .sd02-download-marking-scheme-btn {
    background: #28a745;
    color: white;
    border: 1px solid #218838;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.sd02-question-paper-header .sd02-download-paper-btn:hover,
.sd02-question-paper-header .sd02-download-marking-scheme-btn:hover {
    background: #218838;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.sd02-question-paper-header .sd02-download-marking-scheme-btn {
    background: #17a2b8;
    border-color: #138496;
}

.sd02-question-paper-header .sd02-download-marking-scheme-btn:hover {
    background: #138496;
}

/* Download buttons in selection list */
.sd02-download-question-paper,
.sd02-download-marking-scheme {
    background: #6c757d;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s;
}

.sd02-download-question-paper:hover,
.sd02-download-marking-scheme:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

/* WooCommerce compatibility fixes */
.woocommerce-account .sd02-controls-below,
.woocommerce-account #sd02-transcription-controls,
.woocommerce-account #sd02-timer,
.woocommerce-account #sd02-turn-indicator,
.woocommerce-account #sd02-mic-status,
.woocommerce-account #sd02-human-timer {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Override any WooCommerce My Account page styles */
.woocommerce-MyAccount-content #sd02-discussion,
.woocommerce-MyAccount-content .sd02-split-layout-wrapper,
.woocommerce-MyAccount-content .sd02-controls-below {
    display: block !important;
}

/* Force visibility in WooCommerce context */
body.woocommerce-account .sd02-controls-section,
body.woocommerce-account #sd02-input,
body.woocommerce-account #sd02-send,
body.woocommerce-account #sd02-edit-transcript {
    display: block !important;
    visibility: visible !important;
}











