/* digital.human.audio.css */ /* Reset and Base Styles */ #voice * { box-sizing: border-box; font-family: Arial, sans-serif; } /* Card Styling */ .voice-card { display: flex; flex-direction: column; /* Ensure column layout */ gap: 20px; background: linear-gradient(135deg, #ffffff, #f1f8e9); border-radius: 16px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05); padding: 25px; margin: 25px auto; transition: transform 0.3s, box-shadow 0.3s, background 0.3s; } .voice-card:hover { transform: translateY(-5px); box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1); background: linear-gradient(135deg, #e0f7fa, #ffffff); } /* Flex Layout for Voice Options */ .voice-options { display: flex; flex-direction: row; /* Arrange items in a row */ flex-wrap: wrap; /* Allow items to wrap to the next line on smaller screens */ gap: 20px; /* Space between option sections */ align-items: flex-start; /* Align items to the top */ } /* Option Sections Styling */ .option-section { background-color: #ffffff; padding: 15px; border-radius: 12px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); transition: background 0.3s, box-shadow 0.3s; flex: 1 1 250px; /* Grow and shrink with a base width of 250px */ min-width: 200px; /* Prevent the section from becoming too small */ } .option-section:hover { background-color: #f9f9f9; } /* Button Styling (Reused from Original) */ #voice button { background: linear-gradient(135deg, #00796B, #004D40); border: none; color: white; padding: 12px 20px; font-size: 1em; border-radius: 8px; cursor: pointer; transition: background 0.3s, transform 0.2s, box-shadow 0.3s; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); } #voice button:hover:not(:disabled) { background: linear-gradient(135deg, #005D56, #00332E); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); } #voice button:disabled { background: linear-gradient(135deg, #A5D6A7, #81C784); cursor: not-allowed; box-shadow: none; } /* Select Dropdown Styling (Reused from Original) */ #voice select { width: 100%; padding: 10px 15px; border: 1px solid #cccccc; border-radius: 8px; font-size: 1em; background-color: #ffffff; transition: border-color 0.3s, box-shadow 0.3s; margin-bottom: 15px; } #voice select:focus { border-color: #00796B; box-shadow: 0 0 5px rgba(0, 121, 107, 0.5); outline: none; } /* Speech Controls Styling */ #voice-speech-controls label { display: block; margin-bottom: 5px; color: #555555; font-weight: 500; } #voice-speech-controls input[type="range"] { width: 100%; margin-bottom: 15px; } /* Logs Container Styling */ #voice-logs-container { display: flex; flex-direction: column; gap: 10px; max-height: 150px; /* Set a maximum height for the logs container */ overflow: hidden; /* Hide any overflow to prevent the container from expanding */ } #voice-logs { flex: 1; max-height: 200px; /* Adjust as needed */ border: 1px solid #e0e0e0; border-radius: 12px; overflow-y: auto; /* Enable vertical scrolling */ padding: 10px; background-color: #f9f9f9; font-size: 0.85em; box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05); } #voice-clear-logs { align-self: flex-end; background: linear-gradient(135deg, #FF5252, #E53935); border: none; color: white; padding: 8px 16px; font-size: 0.9em; cursor: pointer; border-radius: 8px; transition: background 0.3s, transform 0.2s, box-shadow 0.3s; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); } #voice-clear-logs:hover { background: linear-gradient(135deg, #E53935, #D32F2F); transform: scale(1.02); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); } /* Chat Box Styling */ #voice-chat-box { height: 500px; border: 1px solid #e0e0e0; border-radius: 12px; overflow-y: auto; padding: 20px; background-color: #ffffff; position: relative; box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05); margin-bottom: 20px; } /* Message Styling */ #voice .message-container { margin-bottom: 20px; display: flex; } #voice .message { padding: 12px 18px; border-radius: 20px; max-width: 75%; position: relative; word-wrap: break-word; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); font-size: 0.95em; line-height: 1.4; background-color: #f1f8e9; transition: background-color 0.3s, box-shadow 0.3s; } #voice .user .message { background: #DCF8C6; border-bottom-right-radius: 0; } #voice .assistant .message { background: #e3f2fd; border-bottom-left-radius: 0; } /* Chat Input Container Styling */ #voice-text-input-container { display: flex; gap: 10px; } #voice-text-input { flex: 1; padding: 10px 15px; border: 1px solid #cccccc; border-radius: 8px; font-size: 1em; background-color: #ffffff; transition: border-color 0.3s, box-shadow 0.3s; } #voice-text-input:focus { border-color: #00796B; box-shadow: 0 0 5px rgba(0, 121, 107, 0.5); outline: none; } #voice-submit-button { background: linear-gradient(135deg, #00796B, #004D40); border: none; color: white; padding: 10px 20px; font-size: 1em; border-radius: 8px; cursor: pointer; transition: background 0.3s, transform 0.2s, box-shadow 0.3s; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); } #voice-submit-button:hover:not(:disabled) { background: linear-gradient(135deg, #005D56, #00332E); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); } #voice-submit-button:disabled { background: linear-gradient(135deg, #A5D6A7, #81C784); cursor: not-allowed; box-shadow: none; } /* Microphone and Stop Buttons Styling */ #voice-mic-container { display: flex; justify-content: center; gap: 15px; margin-top: 20px; } #voice-start_button, #voice-stop_button { background: linear-gradient(135deg, #00796B, #004D40); border: none; color: white; padding: 15px; border-radius: 50%; cursor: pointer; transition: background 0.3s, transform 0.2s, box-shadow 0.3s; width: 60px; height: 60px; display: flex; justify-content: center; align-items: center; position: relative; overflow: hidden; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); } #voice-stop_button { background: linear-gradient(135deg, #E53935, #D32F2F); } #voice-start_button::before, #voice-stop_button::before { content: ''; position: absolute; width: 200%; height: 200%; background: rgba(255, 255, 255, 0.3); top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0); border-radius: 50%; transition: transform 0.5s ease-out; } #voice-start_button:active::before, #voice-stop_button:active::before { transform: translate(-50%, -50%) scale(1); } #voice-start_button:disabled, #voice-stop_button:disabled { background: linear-gradient(135deg, #A5D6A7, #81C784); cursor: not-allowed; box-shadow: none; } #voice-start_button:hover:not(:disabled), #voice-stop_button:hover:not(:disabled) { transform: scale(1.05); box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15); } #voice-stop_button:hover:not(:disabled) { background: linear-gradient(135deg, #D32F2F, #C62828); } /* Icon Styling */ #voice .mic-icon, #voice .stop-icon { width: 30px; height: 30px; transition: transform 0.3s; fill: #ffffff; } /* Animation for Mic Icon */ #voice .mic-animate { animation: pulse 2s infinite; } @keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.2); } 100% { transform: scale(1); } } /* Chat Stats */ #voice-chat-stats { font-size: 0.85em; color: #555555; text-align: center; margin-top: 10px; } /* Hidden Class */ #voice .hidden { display: none; } /* Scrollbar Styling */ #voice-chat-box::-webkit-scrollbar, #voice-logs::-webkit-scrollbar { width: 8px; } #voice-chat-box::-webkit-scrollbar-track, #voice-logs::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 4px; } #voice-chat-box::-webkit-scrollbar-thumb, #voice-logs::-webkit-scrollbar-thumb { background: #cccccc; border-radius: 4px; } #voice-chat-box::-webkit-scrollbar-thumb:hover, #voice-logs::-webkit-scrollbar-thumb:hover { background: #a8a8a8; } /* Initialize Button Styling (Reused from Original) */ #voice-download { flex: 0 0 auto; background: linear-gradient(135deg, #00796B, #004D40); border: none; color: white; padding: 10px 20px; font-size: 1em; border-radius: 8px; cursor: pointer; transition: background 0.3s, transform 0.2s, box-shadow 0.3s; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); } #voice-download:hover:not(:disabled) { background: linear-gradient(135deg, #005D56, #00332E); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); } #voice-download:disabled { background: linear-gradient(135deg, #A5D6A7, #81C784); cursor: not-allowed; box-shadow: none; } /* Configuration Info Styling */ #voice-configuration { margin-top: 15px; font-size: 0.9em; color: #555555; } /* Responsive Grid Adjustments */ @media (max-width: 1200px) { .voice-options { flex-direction: row; flex-wrap: wrap; } .option-section { flex: 1 1 45%; /* Two items per row */ } } @media (max-width: 800px) { .voice-options { flex-direction: column; /* Stack vertically on very small screens */ } .option-section { flex: 1 1 100%; /* Full width */ } }