* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: linear-gradient(135deg, #f8fbff 0%, #eef6ff 100%);
    color: #0f172a;
    min-height: 100vh;
    padding: 1rem;
}

.app-shell {
    height: max-content;
    display: grid;
    place-items: center;
    margin-bottom: 24px;
}

/* .app-shell.support-mode {
    align-items: flex-start;
    justify-content: flex-start;
    padding-top: 24px;
} */

.voice-wave {
    height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 2rem;
    opacity: 0;
    transform: translateY(-8px);
    transition: all 0.25s ease;
}

.voice-wave.active {
    opacity: 1;
    transform: translateY(0);
}

.voice-wave span {
    display: block;
    width: 7px;
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(180deg, #60a5fa, #2563eb);
    animation: wave 1s ease-in-out infinite;
    transform-origin: bottom;
}

.voice-wave span:nth-child(2) {
    animation-delay: 0.15s;
}

.voice-wave span:nth-child(3) {
    animation-delay: 0.3s;
}

.voice-wave span:nth-child(4) {
    animation-delay: 0.45s;
}

.agent-container {
    width: 100%;
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: space-evenly;
    align-items: center;
}

.agent-card {
    align-self: start;
    width: min(100%, 520px);
    background: #ffffff;
    border: 1px solid #dbeafe;
    border-radius: 22px;
    padding: 32px;
    box-shadow: 0 14px 34px rgba(37, 99, 235, 0.1);
    transition: padding 0.3s ease, transform 0.3s ease;
}

.agent-card > div:nth-child(1) {
    display: flex;
    flex-direction: column;
}

.collapse-toggle {
    margin-top: 10px;
    width: auto;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    align-self: flex-end;
}

.collapse-toggle:hover {
    transform: none;
}

h1 {
    font-size: 2.1rem;
    margin-bottom: 8px;
    color: #1d4ed8;
}

.subtitle {
    color: #64748b;
    margin-bottom: 22px;
}

.controls {
    display: grid;
    gap: 16px;
}

.field {
    display: grid;
    gap: 6px;
}

.field span {
    font-size: 0.95rem;
    font-weight: 600;
}

select,
button {
    width: 100%;
    padding: 13px 15px;
    border-radius: 10px;
    border: 1px solid #bfdbfe;
    font-size: 1rem;
}

select {
    background: #f8fbff;
    color: #0f172a;
}

button#start-btn {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
    border: none;
}

button:hover {
    transform: translateY(-1px);
}

button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.status-panel {
    margin-top: 22px;
    padding: 18px;
    border-radius: 14px;
    background: #f8fbff;
    border: 1px solid #dbeafe;
}

.status-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
    animation: pulse 1.4s infinite;
}

.status-panel.is-speaking .indicator {
    background: #f59e0b;
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.6);
}

#status-message {
    color: #475569;
    font-size: 0.95rem;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

@keyframes wave {
    0%, 100% {
        transform: scaleY(0.4);
        opacity: 0.7;
    }
    50% {
        transform: scaleY(1.2);
        opacity: 1;
    }
}



.agent-card > * {
    transition: opacity 0.25s ease, max-height 0.3s ease, padding 0.25s ease, margin 0.25s ease;
}

.agent-card.collapse {
    padding: 24px 32px;
}

.agent-card.collapse > :not(:first-child) {
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    pointer-events: none;
}

#update-form,
#payment-form {
    width: max-content;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    display: none;
}

#update-form.active,
#payment-form.active {
    display: flex;
}

#update-form input {
    width: 250px;
    height: 35px;
    padding: 5px;
    border-radius: 5px;
    border: 1px solid #83ade6;
    outline: none;
    font-size: 1rem;
    display: none;
}
#update-form input.active {
    display: inline-block;
}

#update-form button,
#payment-form button {
    width: max-content;
    height: max-content;
    align-self: center;
    padding: 7px 20px;
    border-radius: 5px;
    background-color: #2563eb;
    color: whitesmoke;
    font-weight: bold;
    font-size: 1rem;
}


.customer-support {
    display: none;
    width: min(100%, 860px);
    margin: 0 auto 24px;
}

.customer-support.show {
    display: block;
}

.support-shell {
    background: #ffffff;
    border: 1px solid #dbeafe;
    border-radius: 22px;
    padding: 24px;
    box-shadow: 0 14px 34px rgba(37, 99, 235, 0.08);
}

.support-header {
    margin-bottom: 18px;
}

.support-header h2 {
    font-size: 1.35rem;
    color: #1d4ed8;
    margin-bottom: 6px;
}

.support-header p {
    color: #64748b;
    line-height: 1.5;
}

.support-field {
    display: grid;
    gap: 6px;
    margin-bottom: 16px;
}

.support-field span {
    font-size: 0.95rem;
    font-weight: 600;
}

.support-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.25s ease;
}

.support-tabs.is-ready {
    opacity: 1;
    max-height: 80px;
}

.support-tab {
    width: auto;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid #bfdbfe;
    background: #f8fbff;
    color: #1d4ed8;
    font-weight: 600;
}

.support-tab.active {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #ffffff;
    border-color: #2563eb;
}

.support-content {
    border-top: 1px solid #e2e8f0;
    padding-top: 16px;
}

.support-placeholder {
    color: #64748b;
}

.support-list {
    display: grid;
    gap: 12px;
}

.support-item {
    padding: 14px;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    background: #f8fbff;
}

.support-item-title {
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 4px;
}

.support-item-meta {
    color: #475569;
    font-size: 0.95rem;
    margin-bottom: 6px;
}

.support-item p {
    color: #475569;
    line-height: 1.45;
}