.demo-clinic-page {
    min-height: calc(100vh - 120px);
    background: linear-gradient(180deg, #f0f7ff 0%, #fff 40%);
}

.demo-clinic-header {
    padding: 1.25rem 0 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    background: #fff;
}

.demo-clinic-header-inner {
    max-width: 720px;
}

.demo-clinic-back {
    font-size: 0.875rem;
    color: #64748b;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 0.75rem;
}

.demo-clinic-back:hover {
    color: #0f766e;
}

.demo-clinic-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.demo-clinic-badge {
    font-size: 0.75rem;
    background: #ccfbf1;
    color: #0f766e;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-weight: 600;
}

.demo-clinic-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0;
    color: #0f172a;
}

.demo-clinic-sub {
    margin: 0.35rem 0 0;
    color: #64748b;
    font-size: 0.925rem;
}

.demo-clinic-main {
    max-width: 720px;
    padding: 1rem 1rem 2rem;
}

.demo-clinic-chat {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    min-height: 420px;
    max-height: min(70vh, 640px);
}

.demo-clinic-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.demo-msg {
    display: flex;
    max-width: 88%;
}

.demo-msg-bot {
    align-self: flex-start;
}

.demo-msg-user {
    align-self: flex-end;
}

.demo-msg-bubble {
    padding: 0.65rem 0.85rem;
    border-radius: 14px;
    font-size: 0.95rem;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}

.demo-msg-bot .demo-msg-bubble {
    background: #f1f5f9;
    color: #0f172a;
    border-bottom-right-radius: 4px;
}

.demo-msg-user .demo-msg-bubble {
    background: #0d9488;
    color: #fff;
    border-bottom-left-radius: 4px;
}

.demo-clinic-slots {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0 1rem 0.75rem;
    max-height: min(42vh, 360px);
    overflow-y: auto;
}

.demo-clinic-slots[hidden] {
    display: none !important;
}

.demo-slot-day {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.demo-slot-date {
    align-self: flex-start;
    background: #e2e8f0;
    color: #334155;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
}

.demo-slot-times {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: flex-start;
}

.demo-slot-time-btn {
    border: 1px solid #99f6e4;
    background: #f0fdfa;
    color: #0f766e;
    border-radius: 999px;
    padding: 0.45rem 0.85rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
    min-width: 4.25rem;
}

.demo-slot-time-btn:hover:not(:disabled) {
    background: #ccfbf1;
    border-color: #2dd4bf;
    transform: translateY(-1px);
}

.demo-slot-time-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.demo-clinic-confirm {
    padding: 0 1rem 0.75rem;
}

.demo-clinic-confirm[hidden] {
    display: none !important;
}

.demo-confirm-card {
    border: 1px solid #99f6e4;
    background: linear-gradient(180deg, #f0fdfa 0%, #fff 100%);
    border-radius: 16px;
    padding: 1.25rem 1.15rem;
    min-height: 168px;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.demo-confirm-date {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.45;
}

.demo-confirm-time {
    font-size: 0.925rem;
    color: #0f766e;
    font-weight: 600;
}

.demo-confirm-patient {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.65rem 0.75rem;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid #ccfbf1;
    border-radius: 10px;
    margin-top: 0.15rem;
}

.demo-confirm-patient-row {
    font-size: 0.9rem;
    color: #334155;
    line-height: 1.5;
}

.demo-confirm-label {
    color: #64748b;
    font-weight: 600;
}

.demo-confirm-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.35rem;
}

.demo-confirm-btn {
    border-radius: 999px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.demo-confirm-yes {
    background: #0d9488;
    color: #fff;
    border-color: #0d9488;
}

.demo-confirm-yes:hover:not(:disabled) {
    background: #0f766e;
    transform: translateY(-1px);
}

.demo-confirm-no {
    background: #fff;
    color: #475569;
    border-color: #cbd5e1;
}

.demo-confirm-no:hover:not(:disabled) {
    background: #f8fafc;
    border-color: #94a3b8;
}

.demo-confirm-edit {
    background: #fff;
    color: #0f766e;
    border-color: #99f6e4;
}

.demo-confirm-edit:hover:not(:disabled) {
    background: #f0fdfa;
    border-color: #2dd4bf;
}

.demo-confirm-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.demo-clinic-input-row {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1rem 1rem;
    border-top: 1px solid #e2e8f0;
    background: #fafafa;
    border-radius: 0 0 16px 16px;
}

.demo-clinic-input {
    flex: 1;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
    font-size: 1rem;
    font-family: inherit;
    min-width: 0;
}

.demo-clinic-textarea {
    resize: vertical;
    min-height: 2.75rem;
    max-height: 8rem;
    line-height: 1.5;
}

.demo-clinic-input:focus {
    outline: none;
    border-color: #0d9488;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.demo-clinic-input:disabled {
    background: #f1f5f9;
}

.demo-clinic-send {
    border: none;
    background: #0d9488;
    color: #fff;
    border-radius: 10px;
    padding: 0 1.1rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.demo-clinic-send:hover:not(:disabled) {
    background: #0f766e;
}

.demo-clinic-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.demo-clinic-footnote {
    text-align: center;
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 1rem;
}

.demo-clinic-footnote a {
    color: #0d9488;
}

.demo-clinic-typing {
    align-self: flex-start;
    font-size: 0.8rem;
    color: #94a3b8;
    padding: 0 0.25rem;
}

@media (max-width: 480px) {
    .demo-clinic-chat {
        min-height: 360px;
        max-height: calc(100vh - 200px);
    }

    .demo-clinic-send {
        padding: 0 0.85rem;
        font-size: 0.9rem;
    }

    .demo-slot-times {
        gap: 0.35rem;
    }
}
