@font-face {
    font-family: 'Nunito Sans';
    src: url('/static/assets/NunitoSans-VariableFont_YTLC,opsz,wdth,wght.ttf') format('truetype');
    font-weight: 100 1000;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Nunito Sans';
    src: url('/static/assets/NunitoSans-Italic-VariableFont_YTLC,opsz,wdth,wght.ttf') format('truetype');
    font-weight: 100 1000;
    font-style: italic;
    font-display: swap;
}

/* Override Material theme default fonts */
:root {
    --md-text-font: "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --md-code-font: "Roboto Mono", SFMono-Regular, Consolas, Menlo, monospace;
}

body {
    margin: 0;
    line-height: normal;
    font-family: "Nunito Sans", Nunito Sans;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.adk-modal {
    width: 100%;
    position: relative;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    font-size: 20px;
    color: #fff;
    font-family: 'Nunito Sans';
}

.frame-parent {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #000000;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    padding: 20px 24px;
    gap: 0px;
    overflow: hidden;
    z-index: 1000;
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1);
}

.service-agent-parent {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.service-agent {
    position: relative;
    line-height: 24px;
    font-weight: 800;
    font-size: 20px;
}

.you-are-connected {
    position: relative;
    font-size: 14px;
    line-height: 24px;
    font-weight: 500;
}

.frame-group {
    position: fixed;
    top: 50px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0px;
    z-index: 1;
}

.avatar-wrapper {
    position: relative;
    width: 320px;
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wave-background-video {
    position: absolute;
    width: 90%;
    height: 90%;
    top: 5%;
    left: 5%;
    object-fit: cover;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wave-background-video.playing {
    opacity: 1;
}

.avatar-container {
    width: 200px;
    height: 200px;
    position: relative;
    border-radius: 999px;
    overflow: hidden;
    display: flex;
    align-items: end;
    justify-content: center;
    z-index: 1;
}

.header-background-video {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    object-fit: cover;
    z-index: 0;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.header-background-video.playing {
    opacity: 1;
}

.service-agent-dark-bg {
    width: 180px;
    height: 172px;
    position: relative;
    border-radius: 999px;
    object-fit: cover;
    z-index: 1;
}

.frame-container {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 16px;
    gap: 16px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 117px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    /* Smooth scrolling on iOS */
}

.frame-wrapper {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    margin-bottom: 8px;
}

.service-agent-group {
    border-radius: 16px 16px 16px 0px;
    background-color: #f1f3f4;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    gap: 8px;
    max-width: 70%;
    align-self: flex-start;
}

.adk-modal-service-agent {
    align-self: stretch;
    position: relative;
    font-weight: 500;
}

.hello-how-can {
    align-self: stretch;
    position: relative;
    font-size: 16px;
    font-weight: 600;
    color: #000;
}

.customer-parent {
    border-radius: 16px 16px 0px 16px;
    background-color: rgba(77, 166, 72, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    gap: 8px;
    text-align: right;
    align-self: flex-end;
    margin-bottom: 8px;
    max-width: 70%;
}

.frame-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    box-sizing: border-box;
    width: 100%;
    z-index: 999;
}

.talk-to-agent-btn {
    background-color: #22c55e;
    color: white;
    border: none;
    border-radius: 13px;
    padding: 12px 32px;
    font-size: 18px;
    font-weight: 600;
    font-family: 'Nunito Sans', sans-serif;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0px 4px 12px rgba(34, 197, 94, 0.3);
}

.talk-to-agent-btn:hover:not(:disabled) {
    background-color: #16a34a;
    transform: translateY(-2px);
    box-shadow: 0px 6px 20px rgba(34, 197, 94, 0.4);
}

.talk-to-agent-btn:active:not(:disabled) {
    transform: translateY(0);
}

.talk-to-agent-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #94a3b8;
}

.audio-icon {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
}

.end-conversation-btn {
    background-color: #b75626;
    color: white;
    border: none;
    border-radius: 13px;
    padding: 12px 32px;
    font-size: 18px;
    font-weight: 600;
    font-family: 'Nunito Sans', sans-serif;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0px 4px 12px rgba(183, 86, 38, 0.3);
}

.end-conversation-btn:hover {
    background-color: #994520;
    transform: translateY(-2px);
    box-shadow: 0px 6px 20px rgba(183, 86, 38, 0.4);
}

.end-conversation-btn:active {
    transform: translateY(0);
}

.end-conversation-btn .audio-icon {
    display: none;
}

.contact-team-button {
    background-color: #0c2e37;
    color: white;
    border: 2px solid #22c55e;
    border-radius: 16px;
    padding: 14px 28px;
    font-size: 17px;
    font-weight: 700;
    font-family: 'Nunito Sans', sans-serif;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 32px;
    box-shadow: 0px 6px 16px rgba(34, 197, 94, 0.25);
    letter-spacing: 0.3px;
    min-width: 240px;
}

.contact-team-button:hover {
    background-color: #22c55e;
    border-color: #22c55e;
    transform: translateY(-3px);
    box-shadow: 0px 8px 24px rgba(34, 197, 94, 0.5);
}

.contact-team-button:active {
    transform: translateY(-1px);
    box-shadow: 0px 4px 12px rgba(34, 197, 94, 0.4);
}

.contact-team-button.fade-in {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.contact-form-container {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
    padding: 28px 32px;
    background-color: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 20px;
    box-shadow: 0px 8px 24px rgba(12, 46, 55, 0.12);
    min-width: 320px;
    max-width: 400px;
}

.contact-form-container.fade-in {
    animation: fadeInUp 0.6s ease forwards;
}

.form-title {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 700;
    color: #0c2e37;
    font-family: 'Nunito Sans', sans-serif;
    letter-spacing: 0.3px;
}

.form-field-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-input {
    width: 100%;
    padding: 14px 18px;
    font-size: 16px;
    font-weight: 500;
    font-family: 'Nunito Sans', sans-serif;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background-color: #ffffff;
    color: #0c2e37;
    transition: all 0.3s ease;
    box-sizing: border-box;
    outline: none;
}

.form-input:focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.1);
}

.form-input.invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.form-input.typing {
    position: relative;
    animation: typing-blink 0.8s step-end infinite;
}

@keyframes typing-blink {

    0%,
    50% {
        border-right: 2px solid #22c55e;
    }

    51%,
    100% {
        border-right: 2px solid transparent;
    }
}

.form-input::placeholder {
    color: #94a3b8;
    font-weight: 500;
}

.email-error {
    display: none;
    font-size: 13px;
    font-weight: 600;
    color: #ef4444;
    margin-top: -2px;
    margin-left: 4px;
    font-family: 'Nunito Sans', sans-serif;
}

.start-call-button {
    width: 100%;
    background-color: #22c55e;
    color: white;
    border: none;
    border-radius: 13px;
    padding: 14px 32px;
    font-size: 17px;
    font-weight: 700;
    font-family: 'Nunito Sans', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0px 4px 12px rgba(34, 197, 94, 0.3);
    margin-top: 8px;
}

.start-call-button:hover:not(:disabled) {
    background-color: #16a34a;
    transform: translateY(-2px);
    box-shadow: 0px 6px 20px rgba(34, 197, 94, 0.5);
}

.start-call-button:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0px 4px 12px rgba(34, 197, 94, 0.4);
}

.start-call-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #94a3b8;
    box-shadow: 0px 2px 8px rgba(148, 163, 184, 0.2);
}

.diagnostic-panel {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 280px;
    padding: 16px 18px;
    border-radius: 16px;
    background: rgba(12, 46, 55, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 40px rgba(10, 33, 39, 0.35);
    backdrop-filter: blur(18px);
    color: #f8fafc;
    font-size: 14px;
    display: none;
    flex-direction: column;
    gap: 12px;
    z-index: 2000;
    pointer-events: auto;
}

.diagnostic-panel.visible {
    display: flex;
}

.diagnostic-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    font-size: 12px;
    opacity: 0.7;
}

.diagnostic-title {
    color: #e2f6ff;
}

.diagnostic-hint {
    font-size: 11px;
    font-weight: 500;
    color: rgba(226, 246, 255, 0.6);
}

.diagnostic-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.diagnostic-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.diagnostic-row--toggle {
    justify-content: space-between;
}

.diagnostic-label {
    width: 90px;
    font-weight: 500;
    color: rgba(226, 246, 255, 0.85);
}

.diagnostic-value {
    min-width: 64px;
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: #f1f5f9;
}

.diagnostic-meter {
    position: relative;
    flex: 1;
    height: 6px;
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.25);
    overflow: hidden;
}

.diagnostic-meter-fill {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(90deg, #22c55e 0%, #3b82f6 100%);
    transition: width 80ms linear;
}

.diagnostic-toggle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-weight: 600;
    color: #f1f5f9;
    user-select: none;
}

.diagnostic-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.diagnostic-toggle-track {
    position: relative;
    width: 38px;
    height: 20px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.35);
    transition: background 0.18s ease;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.35);
}

.diagnostic-toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 999px;
    background: #e2f6ff;
    transition: transform 0.18s ease, background 0.18s ease;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.32);
}

.diagnostic-toggle input:checked+.diagnostic-toggle-track {
    background: linear-gradient(90deg, #22c55e 0%, #3b82f6 100%);
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.25);
}

.diagnostic-toggle input:checked+.diagnostic-toggle-track .diagnostic-toggle-thumb {
    transform: translateX(18px);
    background: #f8fafc;
}

.diagnostic-toggle-text {
    font-size: 13px;
    letter-spacing: 0.01em;
    opacity: 0.85;
    font-variant: small-caps;
}