/**
 * Clinic Video Frontend Styles
 *
 * @package Tobalt\ClinicVideo
 * @author Tobalt — https://tobalt.lt
 */

/* Variables */
:root {
    --cv-primary: #0066cc;
    --cv-primary-dark: #0052a3;
    --cv-secondary: #6c757d;
    --cv-success: #28a745;
    --cv-error: #dc3545;
    --cv-warning: #ffc107;
    --cv-bg: #f8f9fa;
    --cv-white: #ffffff;
    --cv-text: #212529;
    --cv-text-muted: #6c757d;
    --cv-border: #dee2e6;
    --cv-radius: 8px;
    --cv-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Base */
.tobalt-cv-login,
.tobalt-cv-dashboard,
.tobalt-cv-message {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--cv-text);
    line-height: 1.6;
}

/* Login Page */
.tobalt-cv-login {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 2rem;
}

.tobalt-cv-login__container {
    background: var(--cv-white);
    padding: 2.5rem;
    border-radius: var(--cv-radius);
    box-shadow: var(--cv-shadow);
    max-width: 400px;
    width: 100%;
}

.tobalt-cv-login__title {
    margin: 0 0 0.5rem;
    font-size: 1.75rem;
    text-align: center;
}

.tobalt-cv-login__subtitle {
    margin: 0 0 2rem;
    text-align: center;
    color: var(--cv-text-muted);
}

.tobalt-cv-login__hint {
    margin-top: 1rem;
    text-align: center;
    color: var(--cv-text-muted);
    font-size: 0.875rem;
}

.tobalt-cv-login__success {
    text-align: center;
}

/* Form Elements */
.tobalt-cv-form-group {
    margin-bottom: 1.5rem;
}

.tobalt-cv-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.tobalt-cv-form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--cv-border);
    border-radius: var(--cv-radius);
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.tobalt-cv-form-group input:focus {
    outline: none;
    border-color: var(--cv-primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.15);
}

/* Buttons */
.tobalt-cv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    border-radius: var(--cv-radius);
    cursor: pointer;
    transition: all 0.15s;
}

.tobalt-cv-btn--primary {
    background: var(--cv-primary);
    color: var(--cv-white);
}

.tobalt-cv-btn--primary:hover {
    background: var(--cv-primary-dark);
}

.tobalt-cv-btn--secondary {
    background: var(--cv-bg);
    color: var(--cv-text);
    border: 1px solid var(--cv-border);
}

.tobalt-cv-btn--secondary:hover {
    background: var(--cv-border);
}

.tobalt-cv-btn--small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.tobalt-cv-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.tobalt-cv-login__form .tobalt-cv-btn {
    width: 100%;
}

/* Alerts */
.tobalt-cv-alert {
    padding: 1rem;
    border-radius: var(--cv-radius);
    margin-bottom: 1rem;
}

.tobalt-cv-alert--success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.tobalt-cv-alert--error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Dashboard */
.tobalt-cv-dashboard {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.tobalt-cv-dashboard__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.tobalt-cv-dashboard__header h1 {
    margin: 0;
}

.tobalt-cv-dashboard__nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.tobalt-cv-nav-card {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background: var(--cv-white);
    border-radius: var(--cv-radius);
    box-shadow: var(--cv-shadow);
    text-decoration: none;
    color: var(--cv-text);
    transition: transform 0.15s, box-shadow 0.15s;
}

.tobalt-cv-nav-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tobalt-cv-nav-card__icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.tobalt-cv-nav-card__title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.tobalt-cv-nav-card__desc {
    font-size: 0.875rem;
    color: var(--cv-text-muted);
}

.tobalt-cv-dashboard__section {
    margin-top: 2rem;
}

.tobalt-cv-dashboard__section h2 {
    margin: 0 0 1rem;
    font-size: 1.25rem;
}

/* Visit Cards */
.tobalt-cv-visit-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tobalt-cv-visit-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--cv-white);
    border-radius: var(--cv-radius);
    box-shadow: var(--cv-shadow);
}

.tobalt-cv-visit-card__info {
    display: flex;
    flex-direction: column;
}

.tobalt-cv-visit-card__info span {
    font-size: 0.875rem;
    color: var(--cv-text-muted);
}

/* Message Page */
.tobalt-cv-message {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 40vh;
    padding: 2rem;
}

.tobalt-cv-message__content {
    text-align: center;
    max-width: 400px;
}

.tobalt-cv-message__content h2 {
    margin: 0 0 1rem;
}

.tobalt-cv-message__content p {
    margin: 0 0 1.5rem;
    color: var(--cv-text-muted);
}

/* Chat Page */
.tobalt-cv-chat {
    max-width: 900px;
    margin: 0 auto;
    padding: 1.5rem;
}

.tobalt-cv-chat__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--cv-border);
}

.tobalt-cv-chat__messages {
    height: 400px;
    overflow-y: auto;
    padding: 1rem;
    background: var(--cv-bg);
    border-radius: var(--cv-radius);
    margin-bottom: 1rem;
}

.tobalt-cv-chat__message {
    max-width: 80%;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    border-radius: var(--cv-radius);
    background: var(--cv-white);
    box-shadow: var(--cv-shadow);
}

.tobalt-cv-chat__message--own {
    margin-left: auto;
    background: var(--cv-primary);
    color: var(--cv-white);
}

.tobalt-cv-chat__message-meta {
    font-size: 0.75rem;
    color: var(--cv-text-muted);
    margin-top: 0.25rem;
}

.tobalt-cv-chat__message--own .tobalt-cv-chat__message-meta {
    color: rgba(255, 255, 255, 0.7);
}

.tobalt-cv-chat__form {
    display: flex;
    gap: 0.5rem;
}

.tobalt-cv-chat__input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--cv-border);
    border-radius: var(--cv-radius);
    font-size: 1rem;
    resize: none;
}

/* Video Call Page */
.tobalt-cv-video-call {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #1a1a2e;
    display: flex;
    flex-direction: column;
}

.tobalt-cv-video-call__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    color: var(--cv-white);
}

.tobalt-cv-video-call__main {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.tobalt-cv-video-call__video {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tobalt-cv-video-call__sidebar {
    width: 320px;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.tobalt-cv-video-call__controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
}

.tobalt-cv-video-call__btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    transition: all 0.15s;
}

.tobalt-cv-video-call__btn--mic,
.tobalt-cv-video-call__btn--camera {
    background: rgba(255, 255, 255, 0.2);
    color: var(--cv-white);
}

.tobalt-cv-video-call__btn--muted {
    background: var(--cv-error);
}

.tobalt-cv-video-call__btn--hangup {
    background: var(--cv-error);
    color: var(--cv-white);
}

.tobalt-cv-video-call__btn--hangup:hover {
    background: #c82333;
}

/* Pre-call device check */
.tobalt-cv-device-check {
    max-width: 500px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--cv-white);
    border-radius: var(--cv-radius);
    text-align: center;
}

.tobalt-cv-device-check__preview {
    width: 100%;
    height: 280px;
    background: #000;
    border-radius: var(--cv-radius);
    margin: 1.5rem 0;
    overflow: hidden;
}

.tobalt-cv-device-check__preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tobalt-cv-device-check__status {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.tobalt-cv-device-check__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tobalt-cv-device-check__item--ok {
    color: var(--cv-success);
}

.tobalt-cv-device-check__item--error {
    color: var(--cv-error);
}

/* Booking Widget */
.tobalt-cv-booking {
    max-width: 700px;
    margin: 0 auto;
    padding: 1.5rem;
}

.tobalt-cv-booking__steps {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.tobalt-cv-booking__step {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    color: var(--cv-text-muted);
    font-size: 0.875rem;
}

.tobalt-cv-booking__step--active {
    color: var(--cv-primary);
    font-weight: 600;
}

.tobalt-cv-booking__step--completed {
    color: var(--cv-success);
}

.tobalt-cv-booking__step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--cv-border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
    font-weight: 600;
}

.tobalt-cv-booking__step--active .tobalt-cv-booking__step-number {
    background: var(--cv-primary);
    color: var(--cv-white);
}

.tobalt-cv-booking__step--completed .tobalt-cv-booking__step-number {
    background: var(--cv-success);
    color: var(--cv-white);
}

.tobalt-cv-booking__content {
    background: var(--cv-white);
    padding: 2rem;
    border-radius: var(--cv-radius);
    box-shadow: var(--cv-shadow);
}

/* Doctor Selection Grid */
.tobalt-cv-doctors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.tobalt-cv-doctor-card {
    padding: 1.5rem;
    border: 2px solid var(--cv-border);
    border-radius: var(--cv-radius);
    cursor: pointer;
    transition: all 0.15s;
}

.tobalt-cv-doctor-card:hover {
    border-color: var(--cv-primary);
}

.tobalt-cv-doctor-card--selected {
    border-color: var(--cv-primary);
    background: rgba(0, 102, 204, 0.05);
}

.tobalt-cv-doctor-card__name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.tobalt-cv-doctor-card__specialty {
    color: var(--cv-text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.tobalt-cv-doctor-card__price {
    font-weight: 600;
    color: var(--cv-primary);
}

/* Time Slots */
.tobalt-cv-calendar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.tobalt-cv-calendar__day {
    flex: 1;
    padding: 1rem;
    text-align: center;
    border: 1px solid var(--cv-border);
    border-radius: var(--cv-radius);
    cursor: pointer;
    transition: all 0.15s;
}

.tobalt-cv-calendar__day:hover {
    border-color: var(--cv-primary);
}

.tobalt-cv-calendar__day--selected {
    background: var(--cv-primary);
    color: var(--cv-white);
    border-color: var(--cv-primary);
}

.tobalt-cv-time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.5rem;
}

.tobalt-cv-time-slot {
    padding: 0.75rem;
    text-align: center;
    border: 1px solid var(--cv-border);
    border-radius: var(--cv-radius);
    cursor: pointer;
    transition: all 0.15s;
}

.tobalt-cv-time-slot:hover {
    border-color: var(--cv-primary);
}

.tobalt-cv-time-slot--selected {
    background: var(--cv-primary);
    color: var(--cv-white);
    border-color: var(--cv-primary);
}

.tobalt-cv-time-slot--unavailable {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Doctor/Manager Panel */
.tobalt-cv-panel {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
}

.tobalt-cv-panel__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.tobalt-cv-panel__tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--cv-border);
    padding-bottom: 0.5rem;
}

.tobalt-cv-panel__tab {
    padding: 0.75rem 1.25rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--cv-text-muted);
    border-radius: var(--cv-radius) var(--cv-radius) 0 0;
    transition: all 0.15s;
}

.tobalt-cv-panel__tab:hover {
    color: var(--cv-text);
    background: var(--cv-bg);
}

.tobalt-cv-panel__tab--active {
    color: var(--cv-primary);
    background: var(--cv-white);
    box-shadow: 0 2px 0 var(--cv-primary);
}

.tobalt-cv-panel__content {
    background: var(--cv-white);
    padding: 1.5rem;
    border-radius: var(--cv-radius);
    box-shadow: var(--cv-shadow);
}

/* Data Tables */
.tobalt-cv-table {
    width: 100%;
    border-collapse: collapse;
}

.tobalt-cv-table th,
.tobalt-cv-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--cv-border);
}

.tobalt-cv-table th {
    background: var(--cv-bg);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--cv-text-muted);
}

.tobalt-cv-table tr:hover td {
    background: var(--cv-bg);
}

.tobalt-cv-table__actions {
    display: flex;
    gap: 0.5rem;
}

/* Status Badges */
.tobalt-cv-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 999px;
    text-transform: uppercase;
}

.tobalt-cv-badge--scheduled {
    background: #e3f2fd;
    color: #1565c0;
}

.tobalt-cv-badge--ready {
    background: #e8f5e9;
    color: #2e7d32;
}

.tobalt-cv-badge--in_progress {
    background: #fff3e0;
    color: #ef6c00;
}

.tobalt-cv-badge--completed {
    background: #e8f5e9;
    color: #2e7d32;
}

.tobalt-cv-badge--cancelled {
    background: #ffebee;
    color: #c62828;
}

.tobalt-cv-badge--no_show {
    background: #fce4ec;
    color: #ad1457;
}

.tobalt-cv-badge--pending_payment {
    background: #fff8e1;
    color: #f57f17;
}

.tobalt-cv-badge--open {
    background: #e3f2fd;
    color: #1565c0;
}

.tobalt-cv-badge--closed {
    background: #eceff1;
    color: #546e7a;
}

.tobalt-cv-badge--paid {
    background: #e8f5e9;
    color: #2e7d32;
}

.tobalt-cv-badge--refunded {
    background: #fff3e0;
    color: #ef6c00;
}

/* Stats Cards */
.tobalt-cv-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.tobalt-cv-stat-card {
    padding: 1.25rem;
    background: var(--cv-white);
    border-radius: var(--cv-radius);
    box-shadow: var(--cv-shadow);
}

.tobalt-cv-stat-card__value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--cv-primary);
}

.tobalt-cv-stat-card__label {
    color: var(--cv-text-muted);
    font-size: 0.875rem;
}

/* Modal */
.tobalt-cv-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.tobalt-cv-modal__content {
    background: var(--cv-white);
    border-radius: var(--cv-radius);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.tobalt-cv-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--cv-border);
}

.tobalt-cv-modal__header h3 {
    margin: 0;
}

.tobalt-cv-modal__close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--cv-text-muted);
}

.tobalt-cv-modal__body {
    padding: 1.5rem;
}

.tobalt-cv-modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--cv-border);
}

/* Loading Spinner */
.tobalt-cv-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.tobalt-cv-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--cv-border);
    border-top-color: var(--cv-primary);
    border-radius: 50%;
    animation: cv-spin 0.8s linear infinite;
}

@keyframes cv-spin {
    to { transform: rotate(360deg); }
}

/* Empty State */
.tobalt-cv-empty {
    text-align: center;
    padding: 3rem;
    color: var(--cv-text-muted);
}

.tobalt-cv-empty__icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 768px) {
    .tobalt-cv-video-call__sidebar {
        position: absolute;
        right: 0;
        top: 60px;
        bottom: 80px;
        transform: translateX(100%);
        transition: transform 0.3s;
    }

    .tobalt-cv-video-call__sidebar--open {
        transform: translateX(0);
    }

    .tobalt-cv-booking__steps {
        flex-wrap: wrap;
    }

    .tobalt-cv-calendar {
        flex-wrap: wrap;
    }

    .tobalt-cv-panel__tabs {
        flex-wrap: wrap;
    }

    .tobalt-cv-table {
        display: block;
        overflow-x: auto;
    }
}

@media (max-width: 600px) {
    .tobalt-cv-login__container,
    .tobalt-cv-dashboard {
        padding: 1.5rem;
    }

    .tobalt-cv-dashboard__header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .tobalt-cv-visit-card {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .tobalt-cv-doctors-grid {
        grid-template-columns: 1fr;
    }

    .tobalt-cv-time-slots {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================================
   DEMO MODE
   ============================================================ */

.tobalt-cv-demo {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--cv-text);
    max-width: 960px;
    margin: 0 auto;
}

/* Banner */
.tobalt-cv-demo__banner {
    background: linear-gradient(135deg, #fef3cd, #fff3cd);
    border: 1px solid #ffc107;
    border-radius: var(--cv-radius);
    padding: 12px 20px;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 14px;
    color: #856404;
}

.tobalt-cv-demo__banner strong {
    letter-spacing: 1px;
    margin-right: 6px;
}

/* View container */
.tobalt-cv-demo__view {
    min-height: 400px;
    padding-bottom: 80px;
}

/* Navigation tabs */
.tobalt-cv-demo__nav {
    display: flex;
    gap: 4px;
    background: var(--cv-bg);
    border-radius: var(--cv-radius);
    padding: 4px;
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.tobalt-cv-demo__nav button {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--cv-text-muted);
    transition: all 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.tobalt-cv-demo__nav button:hover {
    color: var(--cv-text);
    background: var(--cv-white);
}

.tobalt-cv-demo__nav button.is-active {
    background: var(--cv-white);
    color: var(--cv-primary);
    box-shadow: var(--cv-shadow);
    font-weight: 600;
}

/* Doctor header */
.tobalt-cv-demo__doctor-header {
    margin-bottom: 1rem;
}

.tobalt-cv-demo__doctor-header h2 {
    margin: 0;
}

.tobalt-cv-demo__doctor-header span {
    font-size: 14px;
}

/* Booking preview */
.tobalt-cv-demo__booking-preview {
    background: var(--cv-bg);
    border: 1px solid var(--cv-border);
    border-radius: var(--cv-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.tobalt-cv-demo__doctors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 1rem;
}

.tobalt-cv-demo__doctor-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: var(--cv-white);
    border: 2px solid var(--cv-border);
    border-radius: var(--cv-radius);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    gap: 4px;
}

.tobalt-cv-demo__doctor-card:hover {
    border-color: var(--cv-primary);
}

.tobalt-cv-demo__doctor-card.is-selected {
    border-color: var(--cv-primary);
    background: #f0f7ff;
}

.tobalt-cv-demo__doctor-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--cv-primary);
    color: var(--cv-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}

.tobalt-cv-demo__doctor-price {
    font-weight: 700;
    color: var(--cv-primary);
    font-size: 16px;
    margin-top: 4px;
}

/* Video call mock */
.tobalt-cv-demo__call {
    max-width: 700px;
    margin: 0 auto;
}

.tobalt-cv-demo__call-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
}

.tobalt-cv-demo__call-header h2 {
    margin: 0;
}

.tobalt-cv-demo__call-info {
    background: var(--cv-bg);
    border-radius: var(--cv-radius);
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}

.tobalt-cv-demo__call-info p {
    margin: 4px 0;
}

.tobalt-cv-demo__call-preview {
    text-align: center;
}

.tobalt-cv-demo__call-placeholder {
    background: #1a1a2e;
    color: #8888aa;
    border-radius: var(--cv-radius);
    padding: 4rem 2rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.tobalt-cv-demo__call-checks {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 1.5rem;
}

.tobalt-cv-demo__check {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.tobalt-cv-demo__check-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-block;
}

.tobalt-cv-demo__check-icon--ok {
    background: var(--cv-success);
}

/* Role Switcher (floating) */
.tobalt-cv-demo__switcher {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.tobalt-cv-demo__switcher-pills {
    display: flex;
    background: var(--cv-white);
    border-radius: 999px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    border: 1px solid var(--cv-border);
}

.tobalt-cv-demo__switcher-pills button {
    padding: 10px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--cv-text-muted);
    transition: all 0.2s;
}

.tobalt-cv-demo__switcher-pills button.is-active {
    background: var(--cv-primary);
    color: var(--cv-white);
}

.tobalt-cv-demo__switcher-pills button:hover:not(.is-active) {
    background: var(--cv-bg);
}

.tobalt-cv-demo__tour-start {
    padding: 8px 16px;
    background: var(--cv-white);
    border: 1px solid var(--cv-primary);
    color: var(--cv-primary);
    border-radius: 999px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.tobalt-cv-demo__tour-start:hover {
    background: var(--cv-primary);
    color: var(--cv-white);
}

/* Tour Overlay */
.tobalt-cv-demo__tour-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tobalt-cv-demo__tour-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.tobalt-cv-demo__tour-tooltip {
    position: relative;
    background: var(--cv-white);
    border-radius: 12px;
    padding: 24px;
    max-width: 440px;
    width: calc(100% - 32px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.tobalt-cv-demo__tour-tooltip h3 {
    margin: 0 0 8px;
    font-size: 18px;
    color: var(--cv-primary);
}

.tobalt-cv-demo__tour-tooltip p {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--cv-text-muted);
}

.tobalt-cv-demo__tour-step-counter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.tobalt-cv-demo__tour-step-counter span {
    font-size: 12px;
    color: var(--cv-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tobalt-cv-demo__tour-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--cv-text-muted);
    padding: 0 4px;
    line-height: 1;
}

.tobalt-cv-demo__tour-close:hover {
    color: var(--cv-text);
}

.tobalt-cv-demo__tour-actions {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.tobalt-cv-demo__tour-actions button:only-child {
    margin-left: auto;
}

/* Table responsive */
.tobalt-cv-table-responsive {
    overflow-x: auto;
}

/* Text muted helper */
.tobalt-cv-text-muted {
    color: var(--cv-text-muted);
    font-size: 13px;
}

/* Dashboard cards */
.tobalt-cv-dashboard__cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.tobalt-cv-dashboard__card {
    background: var(--cv-white);
    border: 1px solid var(--cv-border);
    border-radius: var(--cv-radius);
    padding: 1.25rem;
    transition: box-shadow 0.2s;
}

.tobalt-cv-dashboard__card:hover {
    box-shadow: var(--cv-shadow);
}

.tobalt-cv-dashboard__card h3 {
    margin: 0 0 4px;
    font-size: 14px;
    color: var(--cv-text-muted);
}

.tobalt-cv-dashboard__card-count {
    font-size: 32px;
    font-weight: 700;
    margin: 4px 0;
    color: var(--cv-primary);
}

.tobalt-cv-dashboard__card-desc {
    font-size: 13px;
    color: var(--cv-primary);
    margin: 0;
}

.tobalt-cv-dashboard__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

/* Visit card */
.tobalt-cv-visit-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--cv-white);
    border: 1px solid var(--cv-border);
    border-radius: var(--cv-radius);
    margin-bottom: 8px;
}

.tobalt-cv-visit-card__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tobalt-cv-visit-card__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Chat layout */
.tobalt-cv-chat {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
    border: 1px solid var(--cv-border);
    border-radius: var(--cv-radius);
    overflow: hidden;
    min-height: 400px;
}

.tobalt-cv-chat__sidebar {
    background: var(--cv-bg);
    border-right: 1px solid var(--cv-border);
    padding: 1rem;
    overflow-y: auto;
}

.tobalt-cv-chat__sidebar h3 {
    margin: 0 0 12px;
    font-size: 14px;
}

.tobalt-cv-chat__topic {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 4px;
    position: relative;
    transition: background 0.15s;
}

.tobalt-cv-chat__topic:hover {
    background: var(--cv-white);
}

.tobalt-cv-chat__topic.is-active {
    background: var(--cv-white);
    box-shadow: var(--cv-shadow);
}

.tobalt-cv-chat__topic .tobalt-cv-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 11px;
    padding: 1px 6px;
}

.tobalt-cv-chat__main {
    display: flex;
    flex-direction: column;
    background: var(--cv-white);
}

.tobalt-cv-chat__messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tobalt-cv-chat__input {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid var(--cv-border);
}

.tobalt-cv-chat__input input {
    flex: 1;
}

.tobalt-cv-chat__empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--cv-text-muted);
}

/* Messages */
.tobalt-cv-message {
    display: flex;
    flex-direction: column;
    max-width: 75%;
}

.tobalt-cv-message--patient {
    align-self: flex-end;
    align-items: flex-end;
}

.tobalt-cv-message--doctor {
    align-self: flex-start;
    align-items: flex-start;
}

.tobalt-cv-message__bubble {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.tobalt-cv-message--patient .tobalt-cv-message__bubble {
    background: var(--cv-primary);
    color: var(--cv-white);
    border-bottom-right-radius: 4px;
}

.tobalt-cv-message--doctor .tobalt-cv-message__bubble {
    background: var(--cv-bg);
    color: var(--cv-text);
    border-bottom-left-radius: 4px;
}

.tobalt-cv-message__time {
    font-size: 11px;
    color: var(--cv-text-muted);
    margin-top: 2px;
}

/* Demo responsive */
@media (max-width: 768px) {
    .tobalt-cv-demo__nav {
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    .tobalt-cv-demo__nav button {
        flex: 0 0 auto;
        padding: 8px 12px;
        font-size: 13px;
    }

    .tobalt-cv-chat {
        grid-template-columns: 1fr;
    }

    .tobalt-cv-chat__sidebar {
        border-right: none;
        border-bottom: 1px solid var(--cv-border);
        max-height: 200px;
    }

    .tobalt-cv-demo__switcher {
        bottom: 12px;
        right: 12px;
    }

    .tobalt-cv-demo__doctors-grid {
        grid-template-columns: 1fr;
    }
}

/* Demo: form card */
.tobalt-cv-demo__form-card {
    background: var(--cv-white);
    border: 1px solid var(--cv-border);
    border-radius: var(--cv-radius);
    padding: 1.5rem;
    max-width: 500px;
}

/* Demo: payment mock */
.tobalt-cv-demo__payment-summary {
    background: var(--cv-bg);
    border-radius: var(--cv-radius);
    padding: 1rem;
    margin-bottom: 1rem;
}

.tobalt-cv-demo__payment-summary p {
    margin: 4px 0;
}

.tobalt-cv-demo__stripe-mock {
    background: var(--cv-white);
    border: 1px solid var(--cv-border);
    border-radius: var(--cv-radius);
    padding: 1rem;
}

/* Demo: file badge in messages */
.tobalt-cv-demo__file-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 12px;
    margin-top: 4px;
}

.tobalt-cv-message--doctor .tobalt-cv-demo__file-badge {
    background: rgba(0, 0, 0, 0.05);
}

/* Demo: internal note badge */
.tobalt-cv-demo__internal-badge {
    display: inline-block;
    background: #fef3cd;
    color: #856404;
    font-size: 11px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 3px;
    margin-bottom: 4px;
}

/* Demo: topic actions bar */
.tobalt-cv-demo__topic-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--cv-border);
    background: var(--cv-bg);
}

/* Badge variants */
.tobalt-cv-badge--primary {
    background: var(--cv-primary);
    color: var(--cv-white);
}

.tobalt-cv-badge--warning {
    background: #fef3cd;
    color: #856404;
}

.tobalt-cv-badge--scheduled {
    background: #e0e7ff;
    color: #3730a3;
}

.tobalt-cv-badge--ready {
    background: #d1fae5;
    color: #065f46;
}

.tobalt-cv-badge--in_progress {
    background: #dbeafe;
    color: #1e40af;
}

.tobalt-cv-badge--completed {
    background: #d1fae5;
    color: #065f46;
}

.tobalt-cv-badge--cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.tobalt-cv-badge--no_show {
    background: #f3f4f6;
    color: #6b7280;
}

/* Button error variant */
.tobalt-cv-btn--error {
    background: var(--cv-error);
    color: var(--cv-white);
    border-color: var(--cv-error);
}

.tobalt-cv-btn--error:hover {
    background: #c82333;
}
