/* Setup Wizard Styles */
.setup-wizard {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 32px;
    color: white;
}
.setup-wizard h2 {
    color: white;
    margin-bottom: 8px;
}
.setup-wizard p {
    opacity: 0.9;
    margin-bottom: 24px;
}
.setup-steps {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.setup-step {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.15);
    padding: 12px 20px;
    border-radius: var(--radius-md);
    flex: 1;
    min-width: 200px;
}
.setup-step.completed {
    background: rgba(255,255,255,0.25);
}
.setup-step.current {
    background: white;
    color: var(--color-primary);
}
.setup-step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    background: rgba(255,255,255,0.2);
}
.setup-step.completed .setup-step-number {
    background: #48bb78;
}
.setup-step.current .setup-step-number {
    background: var(--color-primary);
    color: white;
}
.setup-step-label {
    font-weight: 500;
    font-size: 14px;
}
.setup-progress {
    background: rgba(255,255,255,0.2);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}
.setup-progress-fill {
    background: white;
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Calendar Connection Cards */
.connected-calendars {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}
.calendar-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--color-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}
.calendar-card.primary {
    border-color: var(--color-primary);
    background: rgba(102, 126, 234, 0.05);
}
.calendar-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}
.calendar-icon.google {
    background: #4285f4;
    color: white;
}
.calendar-icon.calendly {
    background: #006bff;
    color: white;
}
.calendar-info {
    flex: 1;
}
.calendar-name {
    font-weight: 600;
    font-size: 14px;
}
.calendar-email {
    color: var(--color-text-light);
    font-size: 13px;
}
.calendar-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}
.primary-badge {
    background: var(--color-primary);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
}
.availability-badge {
    background: #e6fffa;
    color: #234e52;
    font-size: 11px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
}

/* Twilio Setup */
.twilio-status {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--color-bg);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}
.twilio-status.connected {
    background: #f0fff4;
    border: 1px solid #9ae6b4;
}
.twilio-status.not-connected {
    background: #fff5f5;
    border: 1px solid #feb2b2;
}
.twilio-status-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.twilio-status.connected .twilio-status-icon {
    background: #48bb78;
    color: white;
}
.twilio-status.not-connected .twilio-status-icon {
    background: #fc8181;
    color: white;
}

/* Help tooltip */
.input-with-help {
    position: relative;
}
.help-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: help;
    color: var(--color-text-light);
    font-size: 12px;
    font-weight: 600;
}

/* API Keys Styles */
.api-keys-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.api-key-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    background: var(--color-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}
.api-key-card.test-key {
    background: #fffbeb;
    border-color: #fcd34d;
}
.api-key-info {
    flex: 1;
    min-width: 0;
}
.api-key-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.api-key-value {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.api-key-value code {
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 13px;
    color: var(--color-text-light);
    background: transparent;
}
.api-key-meta {
    font-size: 12px;
    color: var(--color-text-light);
}
.api-key-meta .separator {
    margin: 0 6px;
}
.api-key-usage {
    color: var(--color-primary);
    font-weight: 500;
}
.test-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    background: #fcd34d;
    color: #92400e;
    border-radius: 4px;
}
.btn-icon {
    background: transparent;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--color-text-light);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-icon:hover {
    background: var(--color-border);
    color: var(--color-text);
}

/* Forms List Styles */
.forms-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.form-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    background: var(--color-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}
.form-card-info {
    flex: 1;
    min-width: 0;
}
.form-card-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}
.form-card-meta {
    font-size: 12px;
    color: var(--color-text-light);
}
.form-card-meta .separator {
    margin: 0 6px;
}
.form-status {
    font-weight: 500;
}
.form-status.active {
    color: #059669;
}
.form-status.inactive {
    color: #dc2626;
}
.form-card-actions {
    display: flex;
    gap: 8px;
}

/* Modal for new key display */
.modal-overlay {
    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: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.modal {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}
.modal h3 {
    margin-bottom: 8px;
}
.modal-key-display {
    background: #1e1e1e;
    padding: 16px;
    border-radius: var(--radius-md);
    margin: 16px 0;
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 14px;
    color: #4ade80;
    word-break: break-all;
}
.modal-warning {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    padding: 12px;
    border-radius: var(--radius-md);
    font-size: 13px;
    color: #92400e;
    margin-bottom: 16px;
}
.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* API Endpoint Example */
.api-endpoint-example {
    margin-top: 12px;
    padding: 12px;
    background: #1e1e1e;
    border-radius: var(--radius-sm);
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 12px;
    color: #d4d4d4;
    overflow-x: auto;
}

/* Knowledge Base Styles */
.knowledge-sources-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.knowledge-source-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--color-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}
.knowledge-source-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.knowledge-source-icon.website {
    background: #dbeafe;
    color: #1d4ed8;
}
.knowledge-source-icon.faq {
    background: #fef3c7;
    color: #d97706;
}
.knowledge-source-icon.table {
    background: #dcfce7;
    color: #16a34a;
}
.knowledge-source-icon.document {
    background: #f3e8ff;
    color: #9333ea;
}
.knowledge-source-icon.richtext {
    background: #ffe4e6;
    color: #e11d48;
}
.knowledge-source-info {
    flex: 1;
    min-width: 0;
}
.knowledge-source-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}
.knowledge-source-meta {
    font-size: 12px;
    color: var(--color-text-light);
}
.knowledge-source-meta .separator {
    margin: 0 6px;
}
.knowledge-source-meta .status {
    font-weight: 500;
}
.knowledge-source-meta .status.active {
    color: #059669;
}
.knowledge-source-meta .status.syncing {
    color: #d97706;
}
.knowledge-source-meta .status.error {
    color: #dc2626;
}
.knowledge-source-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* Form Textarea */
.form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    min-height: 100px;
}
.form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
