/* My AI Agent page — tabs */
.sitestaffr-agent-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #c3c4c7;
    margin: 20px 0 0;
}

.sitestaffr-agent-tab {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #50575e;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.sitestaffr-agent-tab:hover {
    color: #1d2327;
}

.sitestaffr-agent-tab.is-active {
    color: #00838f;
    border-bottom-color: #00838f;
}

.sitestaffr-agent-tabpanel {
    padding: 20px 0 0;
}

.sitestaffr-agent-tabpanel[hidden] {
    display: none;
}

/* Voice & Behavior — card spacing */
.sitestaffr-agent-tabpanel .sitestaffr-settings-card {
    margin-bottom: 20px;
}

.sitestaffr-agent-greeting-field {
    margin-top: 20px;
    border-top: 1px solid #f0ebe0;
    padding-top: 16px;
}

.sitestaffr-agent-greeting-field > label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.sitestaffr-agent-greeting-field .sitestaffr-optional-label {
    font-weight: 400;
    color: #6b7280;
}

.sitestaffr-agent-voice-save-wrap {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Toggle switch */
.sitestaffr-toggle-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #f0f0f1;
}

.sitestaffr-toggle-row:last-child {
    border-bottom: none;
}

.sitestaffr-toggle-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #1d2327;
}

.sitestaffr-toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.sitestaffr-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.sitestaffr-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #b4b9be;
    border-radius: 24px;
    transition: background-color 0.2s ease;
}

.sitestaffr-toggle-slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.sitestaffr-toggle-switch input:checked + .sitestaffr-toggle-slider {
    background-color: #1FB6CC;
}

.sitestaffr-toggle-switch input:checked + .sitestaffr-toggle-slider::before {
    transform: translateX(20px);
}

.sitestaffr-toggle-switch input:focus-visible + .sitestaffr-toggle-slider {
    outline: 2px solid #1FB6CC;
    outline-offset: 2px;
}

.sitestaffr-toggle-status {
    font-size: 12px;
    margin-left: 8px;
    color: #666;
}

/* Custom Instructions */
.sitestaffr-settings-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.sitestaffr-ci-count-badge {
    font-size: 13px;
    font-weight: 400;
    color: #666;
    margin-left: 8px;
}
.sitestaffr-ci-form {
    margin-bottom: 16px;
    padding: 12px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.sitestaffr-ci-textarea {
    width: 100%;
    resize: vertical;
    font-size: 14px;
}
.sitestaffr-ci-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}
.sitestaffr-ci-form-actions {
    display: flex;
    gap: 8px;
}
.sitestaffr-ci-char-count {
    font-size: 12px;
    color: #666;
}
.sitestaffr-ci-char-count.is-over {
    color: #991b1b;
}
.sitestaffr-ci-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 8px;
    background: #fff;
}
.sitestaffr-ci-card.is-disabled {
    opacity: 0.6;
}
.sitestaffr-ci-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
}
.sitestaffr-ci-char-badge {
    font-size: 11px;
    color: #999;
    white-space: nowrap;
}
.sitestaffr-ci-status {
    font-size: 12px;
    white-space: nowrap;
}
.sitestaffr-ci-actions {
    display: flex;
    gap: 4px;
}
.sitestaffr-ci-actions button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    color: #999;
}
.sitestaffr-ci-actions button:hover {
    color: #004D40;
}
.sitestaffr-ci-actions .sitestaffr-ci-delete:hover {
    color: #991b1b;
}
#sitestaffr-add-ci {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
#sitestaffr-add-ci .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 1;
}
#sitestaffr-add-ci:hover .dashicons,
#sitestaffr-add-ci:focus .dashicons {
    color: #fff;
}
