@import "global.css";
@import "glass.css";

html, body {
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    height: 100vh;
    width: 100vw;
    background: linear-gradient(135deg, #fafbfc 0%, #f8fafc 100%);
}

/* Hide scrollbars completely */
::-webkit-scrollbar {
    display: none !important;
}

* {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}

.nicegui-content {
    padding: 0 !important;
    margin: 0 !important;
}

.q-page {
    padding: 0 !important;
    margin: 0 !important;
}

/* ==================== Layout Classes ==================== */

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-end {
    justify-content: flex-end;
}

.flex-1 {
    flex: 1;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.px-6 {
    padding-left: 3rem !important;
    padding-right: 3rem !important;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mt-3 {
    margin-top: 0.75rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.w-full {
    width: 100%;
}

/* ==================== Typography ==================== */

.text-body2 {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-h6 {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.text-h5 {
    font-size: 1.5rem;
    line-height: 2rem;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

.text-grey-7 {
    color: #616161;
}

.text-grey-8 {
    color: #424242;
}

.text-grey-9 {
    color: #212121;
}


/* ==================== Footer Glass ==================== */

.footer-glass {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 150px !important;
    backdrop-filter: blur(200px) saturate(400%) !important;
    -webkit-backdrop-filter: blur(200px) saturate(400%) !important;
    background: linear-gradient(to top,
        rgba(255, 255, 255, 0.92) 0%,
        rgba(255, 255, 255, 0.65) 20%,
        rgba(255, 255, 255, 0.35) 40%,
        rgba(255, 255, 255, 0.12) 60%,
        rgba(255, 255, 255, 0.04) 80%,
        rgba(255, 255, 255, 0) 100%) !important;
    border: none !important;
    z-index: 999 !important;
    pointer-events: none !important;
}

/* ==================== Scroll Button ==================== */

.scroll-bottom-btn {
    position: fixed !important;
    top: 130px !important;
    right: 20px !important;
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    z-index: 1002 !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.scroll-bottom-btn:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18) !important;
    background: rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
}

/* ==================== Record Button ==================== */

.record-btn {
    width: 80px !important;
    height: 80px !important;
    border-radius: 50% !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: fixed !important;
    bottom: 60px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 1001 !important;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.25), 0 4px 16px rgba(118, 75, 162, 0.15) !important;
    pointer-events: auto !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.record-btn:hover:not(:disabled) {
    transform: translateX(-50%) scale(1.08) !important;
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.35), 0 6px 20px rgba(118, 75, 162, 0.25) !important;
}

.record-btn:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

/* Recording pulse animation */
.recording-pulse {
    animation: pulse-recording 2s ease-out infinite;
}

@keyframes pulse-recording {
    0%, 100% {
        box-shadow: 0 8px 32px rgba(239, 68, 68, 0.4), 0 4px 16px rgba(239, 68, 68, 0.2), 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    50% {
        box-shadow: 0 8px 32px rgba(239, 68, 68, 0.4), 0 4px 16px rgba(239, 68, 68, 0.2), 0 0 0 20px rgba(239, 68, 68, 0);
    }
}

/* ==================== Lyrics Container ==================== */

.lyrics-container {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    padding: 130px 20px 170px 20px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scroll-behavior: smooth !important;
    background: transparent !important;
    z-index: 1 !important;
}

/* ==================== Utterances ==================== */

.utterance-item {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px 0;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.utterance-current {
    font-size: 1.4rem;
    font-weight: 500;
    color: #1f2937;
    text-align: center;
    line-height: 1.6;
    padding: 0 20px;
}

.utterance-past {
    font-size: 1.2rem;
    color: #6b7280;
    opacity: 0.6;
    text-align: center;
    line-height: 1.5;
    padding: 0 20px;
}

.utterance-final {
    width: 100%;
    display: flex;
    flex-direction: column;
    padding: 12px 0;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.utterance-final.is-doctor {
    align-items: flex-end;
}

.utterance-final.is-patient {
    align-items: flex-start;
}

.speaker-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #9ca3af;
    margin-bottom: 6px;
    padding: 0 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Chat bubbles */
.bubble-doctor {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px 20px 6px 20px;
    padding: 14px 18px;
    min-width: 120px;
    max-width: min(450px, 75vw);
    word-break: break-word;
    white-space: pre-wrap;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.25), 0 2px 10px rgba(118, 75, 162, 0.15);
    font-size: 15px;
    line-height: 1.5;
    font-weight: 400;
}

.bubble-patient {
    background: #ffffff;
    color: #1f2937;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 20px 20px 20px 6px;
    padding: 14px 18px;
    min-width: 120px;
    max-width: min(450px, 75vw);
    word-break: break-word;
    white-space: pre-wrap;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 2px 10px rgba(0, 0, 0, 0.05);
    font-size: 15px;
    line-height: 1.5;
    font-weight: 400;
}

/* Slide up animation */
.slide-up {
    animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ==================== Clean Input ==================== */

.clean-input .q-field__control {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    height: 48px !important;
}

.clean-input .q-field__native,
.clean-input input,
.clean-input textarea {
    color: #1f2937 !important;
    font-size: 15px !important;
}

.clean-input .q-field__native::placeholder,
.clean-input input::placeholder,
.clean-input textarea::placeholder {
    color: #9ca3af !important;
    opacity: 1 !important;
}

.clean-input .q-field__control:before {
    border: none !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12) !important;
    transition: border-color 0.3s ease !important;
}

.clean-input .q-field__control:hover:before {
    border-bottom-color: rgba(0, 0, 0, 0.2) !important;
}

.clean-input .q-field__control:after {
    border: none !important;
    border-bottom: 2px solid #667eea !important;
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.clean-input.q-field--focused .q-field__control:after {
    transform: scaleX(1);
}

.notes-textarea .q-field__control {
    height: 100px !important;
}

.notes-textarea textarea {
    min-height: 70px !important;
    resize: none !important;
}

/* ==================== Action Button ==================== */

.action-button {
    border-radius: 24px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    letter-spacing: 0.02em !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    min-width: 120px !important;
    text-transform: none !important;
}

.action-button:hover {
    transform: translateY(-2px);
}

.action-button:active {
    transform: translateY(0);
}

.action-button[size="lg"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.25), 0 4px 16px rgba(118, 75, 162, 0.15) !important;
}

.action-button[size="lg"]:hover {
    background: linear-gradient(135deg, #7c8ef0 0%, #8a5db0 100%) !important;
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.35), 0 6px 20px rgba(118, 75, 162, 0.25) !important;
}

/* ==================== Responsive ==================== */

@media (max-width: 1400px) {
    .px-6 {
        padding-left: 2.5rem !important;
        padding-right: 2.5rem !important;
    }
}

@media (max-width: 1024px) {
    .px-6 {
        padding-left: 2rem !important;
        padding-right: 2rem !important;
    }

    .lyrics-container {
        padding: 130px 15px 170px 15px !important;
    }
}
