/* Nova Sonic Styles */
.nova-sonic-btn {
    display: inline-block;
    background-color: #ff5500;
    color: white !important;
    font-weight: bold;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    margin-top: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    font-size: 18px;
    text-align: center;
    cursor: pointer;
}

.nova-sonic-btn:hover {
    background-color: #ff7733;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

/* Animation for the button */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.nova-sonic-btn {
    animation: pulse 2s infinite;
}

/* Modal Styles */
.nova-sonic-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nova-sonic-modal.show {
    display: block;
    opacity: 1;
}

.nova-sonic-modal-content {
    position: relative;
    background-color: #fefefe;
    margin: 10% auto;
    padding: 0;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    width: 90%;
    max-width: 600px;
    animation: modalSlideIn 0.3s ease;
    overflow: hidden;
}

@keyframes modalSlideIn {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.nova-sonic-modal-header {
    background-color: #007bff;
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.nova-sonic-modal-header > div {
    margin-left: 10px;
    display: flex;
    align-items: center;
}

.nova-sonic-modal-header label {
    margin-right: 5px;
    font-size: 14px;
}

.nova-sonic-modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: bold;
    color: white !important;
}

.nova-sonic-close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    margin-left: auto;
}

.nova-sonic-close:hover,
.nova-sonic-close:focus {
    color: #f8f9fa;
    text-decoration: none;
}

.nova-sonic-modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

/* Status indicator */
.status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    margin-left: 10px;
}

.status.connected {
    background-color: #28a745;
    color: white;
}

.status.disconnected {
    background-color: #dc3545;
    color: white;
}

/* Chat Messages */
.chat-messages {
    height: 300px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin-bottom: 20px;
    padding: 10px;
    background-color: #f8f9fa;
}

.message {
    margin-bottom: 15px;
    padding: 10px 15px;
    border-radius: 5px;
    max-width: 80%;
    position: relative;
    word-wrap: break-word;
}

.message.user {
    background-color: #e6f2ff;
    margin-left: auto;
}

.message.assistant {
    background-color: #f1f1f1;
    margin-right: auto;
}

.message.system {
    background-color: #fff3cd;
    margin: 0 auto;
    text-align: center;
    width: fit-content;
}

/* Controls */
.chat-input {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.record-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #007bff;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.record-button:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

.record-button.recording {
    background-color: #dc3545;
    animation: pulse 1.5s infinite;
}

.recording-status {
    text-align: center;
    margin-bottom: 15px;
    font-style: italic;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.controls button {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.controls button:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .nova-sonic-modal-content {
        margin: 15% auto;
        width: 95%;
    }
    
    .chat-messages {
        height: 250px;
    }
    
    .nova-sonic-modal-header h2 {
        font-size: 18px;
    }
}

@media screen and (max-width: 480px) {
    .nova-sonic-modal-content {
        margin: 20% auto;
    }
    
    .nova-sonic-modal-header {
        padding: 10px 15px;
    }
    
    .nova-sonic-modal-body {
        padding: 15px;
    }
    
    .chat-messages {
        height: 200px;
    }
    
    .controls button {
        padding: 8px 15px;
        font-size: 14px;
    }
    
    .record-button {
        width: 50px;
        height: 50px;
    }
}

/* Fix for iOS devices */
@supports (-webkit-touch-callout: none) {
    .nova-sonic-modal-content {
        max-height: 85vh;
    }
}

/* Nova Sonic Status, Transcription, and Response elements */
.nova-sonic-status,
.nova-sonic-transcription,
.nova-sonic-response {
    margin: 8px 0;
    padding: 5px;
    border-radius: 4px;
    font-size: 14px;
    display: none;
}

.nova-sonic-status:not(:empty),
.nova-sonic-transcription:not(:empty),
.nova-sonic-response:not(:empty) {
    display: block;
}

.nova-sonic-status {
    color: #555;
    font-style: italic;
}

.nova-sonic-transcription {
    color: #2980b9;
    background-color: #ecf0f1;
}

.nova-sonic-response {
    color: #27ae60;
    background-color: #f0f9f4;
}